"Creating built-in role System manager" failure

During an update to the latest version of Octopus in a DEV environment, I receive the following, can you please explain where the error originates from?

Saving instance: OctopusServer
Setting home directory to: E:\Data\Octopus_Data
Overriding master key
Setting database connection string to: data source=(local)\APPTCS;initial catalog=Octopus;integrated security=True
========== SQL Database Connection Details ========
SQL Server: (local)\APPTCS
SQL Database: Octopus
Authentication Type: Windows Integrated Security
User: PII\ParkerS

===================================================
Processing user account ‘PII\SVC_PIOctupus_PP’…
Adding ‘PII\SVC_PIOctupus_PP’ as a member of the ‘db_owner’ role…
Ensuring the database principal mapped to PII\SVC_PIOctupus_PP belongs to the role db_owner…
Checking the Octopus Master Key has been configured.
Making sure it’s safe to upgrade the database schema…
Checking to see if database schema upgrade is required…
Database already has the expected schema. No changes are required.
Creating built-in role System manager
Error: ===============================================================================
Error: A user role with this name already exists. Please choose a different name.
Error: Nevermore.UniqueConstraintViolationException
Error: at Nevermore.RelationalTransaction.DetectAndThrowIfKnownException(SqlException ex, DocumentMap mapping)
Error: at Nevermore.RelationalTransaction.Insert[TDocument](String tableName, TDocument instance, String customAssignedId, String tableHint, Nullable1 commandTimeoutSeconds) Error: at Nevermore.RelationalTransaction.Insert[TDocument](TDocument instance, String customAssignedId) Error: at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.EnsureRoleExists(IRelationalTransaction transaction, BuiltInRole builtInRole) Error: at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.EnsureBuiltInRolesExist(IRelationalTransaction transaction) Error: at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.Initialize(IRelationalStore store) Error: at Nevermore.StoreInitializer.Initialize() Error: at Octopus.Server.Commands.DatabaseCommand.Start() Error: at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) Error: at Octopus.Shared.Startup.ConsoleHost.Run(Action1 start, Action shutdown)
Error: at Octopus.Shared.Startup.OctopusProgram.Run()
Error: -------------------------------------------------------------------------------
Error: Terminating process with exit code 100
Error: Full error details are available in the log files at:
Error: C:\Users\ParkerS\AppData\Local\Octopus\Logs
Error: E:\Data\Octopus_Data\Logs
Error: If you need help, please send these log files to https://octopus.com/support
Error: -------------------------------------------------------------------------------
Error:
Error: The previous command returned a non-zero exit code of: 100
Error: The command that failed was: “E:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe” database --instance “OctopusServer” --connectionString “Data Source=(local)\APPTCS;Initial Catalog=Octopus;Integrated Security=True” --masterKey “xxx” --grant “PII\SVC_PIOctupus_PP”
Deregistered OctopusServer from the database
Deleted instance: OctopusServer

Hi Simon,

Thanks for getting in touch! I’m terribly sorry to hear you’re hitting this issue when upgrading. The cause of this issue is due to the introduction of the built-in user role System manager, which is attempting to create during the upgrade, and a user role with this same name already exists. You should be able to work around this by simply renaming your existing System manager role, then performing the upgrade. Would you be able to give that a try and let me know if that fixes the upgrade issue for you?

Side note: Your master key was displayed in the log snippet you’ve provided, so I’ve scrubbed that. :slight_smile:

Let me know how you go or if you have any further questions!

Best regards,

Kenny

Hi Kenneth,

Thank you so much, this has moved our upgrade process one step closer.

The upgrade indicates success but starting the application now throws the following errors:

FATAL An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ServerLogStorage (ReflectionActivator), Services = [Octopus.Core.Model.Logging.IServerLogStorage], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope —> An exception was thrown while invoking the constructor ‘Void .ctor(Octopus.Time.IClock, Nevermore.IRelationalStore, Octopus.Core.Model.Logging.ILogEncoder, Octopus.Shared.Util.IOctopusFileSystem, Octopus.Core.Threading.IMachineWideMutex, Octopus.Server.Orchestration.Logging.IServerLogService)’ on type ‘ServerLogStorage’. —> The specified network name is no longer available

For information, we have cloned our current DEV Octopus to test our code base prior to upgrading the real DEV and then PROD environments. This was decided based on our reliance on PowerShell and Azure so a full cloned copy was the way to test without risk.

Is there anything in the attached log that may give us an idea of what is incorrect at the moment?

Regards,

Simon

Simon Parker

Senior Systems Engineer, IT Enterprise Infrastructure

PAREXEL International

T +44 (0) 115.937.0149

M +44 (0) 793.633.5046

This communication, including any attachments, is intended only for the person or entity to which it is addressed and may contain confidential material. Any review, retransmission, distribution or other use of this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer. Thank you.

OctopusServer.txt (16.6 KB)

Hi Simon,

Thanks for following up! That’s great to hear we’ve made a bit of progress so far. :slight_smile:

Based on this new error you’ve hit, it looks like the path to your server logs isn’t accessible. You can see where the logs are being saved with the following Octopus.Server.exe command: Octopus.Server.exe show-configuration

I hope this helps get you going!

Best regards,

Kenny

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