Error Creating default Octopus Server certificate

When trying to set up the default instance of Octopus Server, I keep getting an error creating the default certificate. I have tried deleting the database instances from previous (failed) installs as well as the complete C:\Octopus directory (instance folder)

Please advise…

Error Logs:

2016-04-14 11:59:02.7844 1 INFO Creating empty configuration file: C:\Octopus\OctopusServer.config
2016-04-14 11:59:02.8524 1 INFO Saving instance: OctopusServer
2016-04-14 11:59:03.4904 1 INFO Home directory set to: C:\Octopus
2016-04-14 11:59:03.5484 1 INFO Generating a new Master Key for this Octopus Server…
2016-04-14 11:59:03.6684 1 INFO Master Key saved; use the Octopus Administration tool to back the key up.
2016-04-14 11:59:03.6684 1 INFO Storage connection string set to: Data Source=(local);Initial Catalog=OctopusServer;Integrated Security=True
2016-04-14 11:59:03.7034 1 INFO Allow checking for upgrades: True
2016-04-14 11:59:03.7054 1 INFO Include usage statistics: True
2016-04-14 11:59:03.7054 1 INFO Web authentication mode: UsernamePassword
2016-04-14 11:59:03.7054 1 INFO Web force SSL: False
2016-04-14 11:59:03.7214 1 INFO Web listen prefixes: http://localhost:80/Octopus
2016-04-14 11:59:03.7214 1 INFO Comms listen port: 10943
2016-04-14 11:59:03.7214 1 INFO Server Node name set to: DMZ-MYMACHINE
2016-04-14 11:59:03.7364 1 INFO Master key set
2016-04-14 11:59:05.3176 1 INFO Database already exists
2016-04-14 11:59:06.7366 1 INFO Creating or modifying administrator 'BuildAdmin’
2016-04-14 11:59:07.7981 1 INFO Beginning database upgrade
2016-04-14 11:59:07.7981 1 INFO Fetching list of already executed scripts.
2016-04-14 11:59:07.7981 1 INFO The [SchemaVersions] table could not be found. The database is assumed to be at version 0.
2016-04-14 11:59:07.8141 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0001 - Initial schema.sql’
2016-04-14 11:59:07.8671 1 INFO Creating the [SchemaVersions] table
2016-04-14 11:59:07.8671 1 INFO The [SchemaVersions] table has been created
2016-04-14 11:59:07.8671 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0002 - Views.sql’
2016-04-14 11:59:07.8671 1 INFO Creating views
2016-04-14 11:59:07.8771 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0003 - Initial indexes.sql’
2016-04-14 11:59:07.8771 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0004 - Database options.sql’
2016-04-14 11:59:10.9108 1 INFO Enabling read committed snapshot isolation on OctopusServer
2016-04-14 11:59:10.9108 1 INFO Nonqualified transactions are being rolled back. Estimated rollback completion: 0%.
2016-04-14 11:59:10.9108 1 INFO Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.
2016-04-14 11:59:10.9108 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0005 - Key allocation.sql’
2016-04-14 11:59:10.9108 1 INFO Executing SQL Server script ‘Octopus.Core.UpgradeScripts.Script0006 - DeploymentSummary.sql’

2016-04-14 11:59:11.1258 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0035DefaultAzureUseChecksum.cs’
2016-04-14 11:59:11.1258 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0036- FixCasingOfUseChecksum.sql’
2016-04-14 11:59:11.1258 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0037 - Remove RunOnServer from ScriptTemplates.sql’
2016-04-14 11:59:11.1258 1 INFO Upgrade successful
2016-04-14 11:59:11.1828 1 INFO Creating default maintenance mode configuration
2016-04-14 11:59:11.3318 1 INFO Creating built-in role Project viewer
2016-04-14 11:59:11.3718 1 INFO Creating built-in role Project contributor
2016-04-14 11:59:11.3718 1 INFO Creating built-in role Project lead
2016-04-14 11:59:11.3718 1 INFO Creating built-in role Project deployer
2016-04-14 11:59:11.3758 1 INFO Creating built-in role Project initiator
2016-04-14 11:59:11.3758 1 INFO Creating built-in role Environment viewer
2016-04-14 11:59:11.3758 1 INFO Creating built-in role Environment manager
2016-04-14 11:59:11.3758 1 INFO Creating built-in role Package publisher
2016-04-14 11:59:11.3758 1 INFO Creating built-in role System administrator
2016-04-14 11:59:11.3758 1 INFO Creating default team Octopus Administrators
2016-04-14 11:59:11.3938 1 INFO Creating default team Everyone
2016-04-14 11:59:11.3938 1 INFO Creating default Octopus Server certificate
2016-04-14 11:59:11.4658 1 ERROR ===============================================================================
2016-04-14 11:59:11.4658 1 FATAL The specified key is not a valid size for this algorithm.
System.Security.Cryptography.CryptographicException: The specified key is not a valid size for this algorithm.
at System.Security.Cryptography.AesCryptoServiceProvider.set_Key(Byte[] value)
at Octopus.Shared.Security.MasterKey.MasterKeyEncryption.CreateAlgorithm(Byte[] key, Boolean generateSalt) in Y:\work\refs\tags\3.3.6\source\Octopus.Shared\Security\MasterKey\MasterKeyEncryption.cs:line 32
at Octopus.Shared.Security.MasterKey.MasterKeyEncryption.ToCiphertext(Byte[] masterKey, Byte[] plaintext, Boolean generateSalt) in Y:\work\refs\tags\3.3.6\source\Octopus.Shared\Security\MasterKey\MasterKeyEncryption.cs:line 52
at Octopus.Core.RelationalStorage.EncryptedValueConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer) in Y:\work\refs\tags\3.3.6\source\Octopus.Core\RelationalStorage\EncryptedValueConverter.cs:line 42
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Octopus.Core.RelationalStorage.RelationalTransaction.InstanceToParameters(Object instance, DocumentMap mapping) in Y:\work\refs\tags\3.3.6\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 333
at Octopus.Core.RelationalStorage.RelationalTransaction.Insert[TDocument](String tableName, TDocument instance, String customAssignedId) in Y:\work\refs\tags\3.3.6\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 114
at Octopus.Core.RelationalStorage.RelationalTransaction.Insert[TDocument](TDocument instance, String customAssignedId) in Y:\work\refs\tags\3.3.6\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 101
at Octopus.Core.Initialization.BuiltIn.OctopusCertificateInitializer.Initialize(IRelationalStore store) in Y:\work\refs\tags\3.3.6\source\Octopus.Core\Initialization\BuiltIn\OctopusCertificateInitializer.cs:line 41
at Octopus.Core.Initialization.StoreInitializer.Initialize() in Y:\work\refs\tags\3.3.6\source\Octopus.Core\Initialization\StoreInitializer.cs:line 22
at Octopus.Server.Commands.AdminCommand.Start() in Y:\work\refs\tags\3.3.6\source\Octopus.Server\Commands\AdminCommand.cs:line 65
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.3.6\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in Y:\work\refs\tags\3.3.6\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\work\refs\tags\3.3.6\source\Octopus.Shared\Startup\OctopusProgram.cs:line 87
2016-04-14 11:59:12.9782 1 INFO Deregistered OctopusServer from the database
2016-04-14 11:59:13.0382 1 INFO Deleted instance: OctopusServer

I uninstalled the setup tool. Deleted everything again. Reinstalled it.

It worked.

I think what happened is I tried installing yesterday and had an error using Domain Authentication. When I re-tried today I think things just got messed up somewhere… One of the things that was frustrating is that yesterday’s install failed. I closed out of the installer to go home (don’t want to stay logged into the server overnight) and when I re-tried it asked for my master key… sorry, but the install didn’t even work.

Hi Eve,

Thanks for getting in touch! Sorry that you had such a bad experience installing Octopus. It sounds like the install partially succeeded.
But you seem to have sorted it out well! Again sorry for the troubles.

Regards,
Daniel