I originally tried using the service account that was included in the restore process. I deleted that login user, and added it back from active directory and reapplied the permissions but that did not work.
I deleted the Octopus database and tried to create a new instance but was getting some errors relating to file paths when creating the new database files. I created the necessary folders and that allowed the wizard to go further but it still failed to completely create the new instance.
I decided to delete the VM and start again from scratch. This is in azure, previsouly I used an image which had SQL pre-installed so this time I created a blank Server 2019 machine and manually installed SQL Server 2019 Enterprise. Restored the database, recreated the service accounts and re-applied the permissions, installed the same octopus version, and again still could not enter the master key.
I then deleted the Octopus database again, tried to create a new instance, and got this errorâŚ
Now using your new license. Happy deployments!
Process F:\OctopusDeploy\Octopus.Server.exe in C:\Users.âŚ\Downloads exited with code 0
Error: SQL Error -2146893019 - A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
The certificate chain was issued by an authority that is not trusted.
Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
â> System.ComponentModel.Win32Exception (0x80090325): The certificate chain was issued by an authority that is not trusted.
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParserStateObject.SNIWritePacket(PacketHandle packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock) at Microsoft.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate) at Microsoft.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate) at Microsoft.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec, FeatureExtension requestedFeatures, SessionData recoverySessionData, FederatedAuthenticationFeatureExtensionData fedAuthFeatureExtensionData) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.Login(ServerInfo server, TimeoutTimer timeout, String newPassword, SecureString newSecurePassword) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool) at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
1 retry, SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at Octopus.Manager.Server.OctopusConfiguration.SetupWizard.SqlServerExpressConfigurer.TryParseLocalSqlServerServiceName(SqlConnectionStringBuilder connectionString, String& sqlServerServiceName) in ./source/Octopus.Manager.Server/OctopusConfiguration/SetupWizard/SqlServerExpressConfigurer.cs:line 276
at Octopus.Manager.Server.OctopusConfiguration.SetupWizard.InitialSetupWizardModel.GenerateScript()+MoveNext() in ./source/Octopus.Manager.Server/OctopusConfiguration/SetupWizard/InitialSetupWizardModel.cs:line 118
at Octopus.Shared.Util.CommandLineRunner.Execute(IEnumerable1 commandLineInvocations, Action
1 debug, Action1 info, Action
1 error, Action2 exception) at Octopus.Shared.Util.CommandLineRunner.Execute(IEnumerable
1 commandLineInvocations, ILog log)
at Octopus.Manager.Server.Shared.CommonTabs.InstallTab.b__25_0(Object ) in ./source/Octopus.Manager.Server/Shared/CommonTabs/InstallTab.cs:line 79
ClientConnectionId:fdf98699-81d5-4170-a16a-623f6ef65a7d
Error Number:-2146893019,State:0,Class:20
Executable directory is F:\OctopusDeploy
Executable name or full path: F:\OctopusDeploy\Octopus.Server.exe
No user context provided. Running as current user.
Starting F:\OctopusDeploy\Octopus.Server.exe in working directory âC:\Users.âŚ\Downloadsâ using âOEM United Statesâ encoding running as âDOMAIN_ADMINâ with the same environment variables as the launching process
Deregistered OctopusServer from the database.
Deleted instance: OctopusServer
Process F:\OctopusDeploy\Octopus.Server.exe in C:\Users.âŚ\Downloads exited with code 0
My acccount is a sysadmin in SQL Server and Windows Server Administrator.
Its strange i can restore the database from backup and it seems to connect to it when setting up the instance as its asking for the master key thats in the restored database, however the same user account cannot create a new database or intance.
Happy to have a call about this whenever possible.
Thanks
Grant