Can not attach new Tentacle. CryptographicException: Key not valid for use in specified state

yoorikan's Avatar

yoorikan

09 Oct, 2017 01:00 PM

Hi!
We have Octopus server with about 50 connected Tentacle agents. But when I try to add new one agent, I received error message:

Saving instance: Tentacle
Setting home directory to: C:\Octopus
Error: ===============================================================================
Error: Key not valid for use in specified state.
Error:
Error: System.Security.Cryptography.CryptographicException
Error: at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
Error: at Octopus.Shared.Configuration.FlatDictionaryKeyValueStore.Get[TData](String name, TData defaultValue, Nullable`1 protectionScope)
Error: at Octopus.Tentacle.Configuration.TentacleConfiguration.get_TentacleCertificate()
Error: at Octopus.Tentacle.Commands.NewCertificateCommand.Start()
Error: at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
Error: at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 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:\Octopus\Logs
Error: C:\Users\15SOF\AppData\Local\Octopus\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: "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" new-certificate --instance "Tentacle" --if-blank
Deleted instance: Tentacle

Logs are attached.

  1. Support Staff 1 Posted by Shane Gill on 10 Oct, 2017 12:37 AM

    Shane Gill's Avatar

    Hi,

    Thanks for getting in touch.

    Are you configuring the Tentacle based on an existing Tentacle.config? It looks like Tentacle is trying to load an existing certificate but is unable to. Try deleting Tentacle.config from C:\Octopus.

    Cheers,
    Shane

  2. 2 Posted by yoorikan on 12 Oct, 2017 10:57 AM

    yoorikan's Avatar

    Thank you! This approach fixed the issue!

    Best regards,
    Yuriy Gavrishov

    >Вторник, 10 октября 2017, 3:38 +03:00 от Shane Gill <[email blocked]>:
    >
    >// Please reply above this line
    >==================================================
    >From : Shane Gill (Support staff)
    >Hi,
    >Thanks for getting in touch.
    >Are you configuring the Tentacle based on an existing Tentacle.config? It looks like Tentacle is trying to load an existing certificate but is unable to. Try deleting Tentacle.config from C:\Octopus.
    >Cheers,
    >Shane
    >On Mon, Oct 09 at 06:00 AM PDT, yoorikan wrote:
    >>Hi!
    >>We have Octopus server with about 50 connected Tentacle agents. But when I try to add new one agent, I received error message:
    >>Saving instance: Tentacle
    >>Setting home directory to: C:\Octopus

  3. Paul Stovell closed this discussion on 24 Jan, 2018 02:02 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac