The specified key is not a valid size for this algorithm

I have a new trial of Octopus that I am trying to set up. I had a few issues and needed to reinstall it. However, the install script is throwing the above error. Another post seemed to suggest it had to do with the license. How do I fix this?

Here is the rest of the error from the log:

2017-05-31 15:08:59.1561 1 INFO Beginning database upgrade
2017-05-31 15:08:59.2091 1 INFO Executing SQL Server script 'Octopus.Core.UpgradeScriptsRepeatable.Script0000 - Refresh Views.sql’
2017-05-31 15:08:59.4291 1 INFO Upgrade successful
2017-05-31 15:09:00.1431 1 INFO Creating default Octopus Server certificate
2017-05-31 15:09:00.4411 1 ERROR ===============================================================================
2017-05-31 15:09:00.5001 1 FATAL The specified key is not a valid size for this algorithm.
at System.Security.Cryptography.AesCryptoServiceProvider.set_Key(Byte[] value)
at Octopus.Core.Security.MasterKey.MasterKeyEncryption.CreateAlgorithm(Byte[] key, Boolean generateSalt)
at Octopus.Core.Security.MasterKey.MasterKeyEncryption.ToCiphertext(Byte[] masterKey, Byte[] plaintext, Boolean generateSalt)
at Octopus.Core.RelationalStorage.EncryptedValueConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
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 Nevermore.RelationalTransaction.InstanceToParameters(Object instance, DocumentMap mapping, String prefix)
at Nevermore.RelationalTransaction.Insert[TDocument](String tableName, TDocument instance, String customAssignedId, String tableHint, Nullable1 commandTimeoutSeconds) at Nevermore.RelationalTransaction.Insert[TDocument](TDocument instance, String customAssignedId) at Octopus.Core.Initialization.BuiltIn.OctopusCertificateInitializer.Initialize(IRelationalStore store) at Nevermore.StoreInitializer.Initialize() at Octopus.Server.Commands.AdminCommand.Start() at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions, String displayName, String version, String informationalVersion, String[] environmentInformation, String instanceName) at Octopus.Shared.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) at Octopus.Shared.Startup.ConsoleHost.Run(Action1 start, Action shutdown)
at Octopus.Shared.Startup.OctopusProgram.Run()
2017-05-31 15:09:04.3781 1 INFO Deregistered OctopusServer from the database
2017-05-31 15:09:04.3952 1 INFO Deleted instance: OctopusServer

I was able to get this installed to a new instance of octopus instead of the default. This doesn’t seem like expected behavior though.


Hi Mark,

Thanks for getting in touch! Sorry you have had some issues around setup. That error generally means that it cannot connect the encrypted master key to the installation. It generally occurs when the service is deleted and reinstalled in the same location with an existing config file and database or either. You correctly remedied the situation by installing the new instance.

Please let me know if you have any further issues or have any questions around your setup.