Octopus server won't start due to invalid license

Hi,

Our OTA server won’t start, since we forgot to install the new license on it. Sadly enough i can’t start it now to install the new license since it won’t start because of the old one.

I am in a bit of an impase here;

Octopus.Shared.ControlledFailureException: One of the pre-conditions to safely upgrade your database has failed, and the upgrade cannot continue.
- PASS: All columns use the default collation.
- FAIL: Your Octopus Server would not be compliant with your license if we allowed the upgrade to continue. Here is the summary of the license check: Your Octopus Server subscription expired on Wednesday, 25 May 2022 (89 days ago) and has not been renewed. You will be prevented from performing key activities, like creating and deploying releases. Please visit Octopus Deploy Licensing & Purchasing FAQ - Octopus Deploy for more information.
- PASS: The version of your SQL Server satisfies Octopus Server installation requirements.
- PASS: There aren’t any unexpected indexes in the database.

How can i install the new license when Octopus won’t start because of the old one?

Please help!

Best regards,
Jeffrey

Hey @jeffreywels,

Thanks for reaching out.

We have a solution for upgrading the registered license without requiring the Octopus service to be up and running. You can achieve this by using the Octopus Server Command Line arguments.

The guide is available here:

Please let me know if you have any troubles running those commands and I can guide you through to solving this issue.

Regards,

Dane

Hi Dane,

I tried to do that by using the following command-line;
octopus.server license --instance=“OctopusServer” --licenseFile=“E:\Octopus\license.xml”

But for some reason, it throws me an error;

2022-08-22 14:31:13.5545 816 1 INFO CommandLine: E:\Octopus Deploy\Octopus\Octopus.Server.dll license --licenseFile=E:\Octopus\license.xml
2022-08-22 14:31:14.8552 816 1 FATAL Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.

I have no idea what the instance name should be…and where to find it.

That might be the problem?

Best regards,
Jeffrey

Hi Jeffrey,

You can often leave out the --instance flag and if there is only one instance configured it will use the default one.
Otherwise, you can run octopus.server list-instances to retrieve the required information.

Regards,
Paul

Hi Paul,

Listing the instances showed me the one-and-only instance which is the same as in the documentation (OctopusServer).

Sadly, when using this instance it still won’t budge;

E:\Octopus Deploy\Octopus>octopus.server license --instance=“OctopusServer” --licenseFile=“E:\Octopus\license.xml”
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Data.SqlClient.TdsParser.SendFedAuthToken(SqlFedAuthToken fedAuthToken)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)

Best regards,
Jeffrey

Interesting.
Another possibility here is that SQL permissions may be getting in the way.
When the license command is run, it will attempt to modify the license entry within the DB and will authenticate with the user of the current command prompt session.

It may be worth checking that your current user has the required SQL permissions on the Octopus database or checking which user the Octopus service currently runs as and trying to run this command as that user.

Hi Paul,

That did the trick. I ran the command promt using the logged in user, instead of the serviceaccount the service was running under.

The license has been added and the environment is up and running again.

Thanks for the quick replies!

Best regards,
Jeffrey

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.