Polling Tentical v2019.4.4 Registration exception

My diagnosis is the Octopus Server is returning malformed json on the polling registration API

Details
Version v2019.4.4
Followed Directions on Redirecting to https://octopus.com/docs/infrastructure/deployment-targets/tentacle/windows/polling-tentacles-web-sockets

Confirmed: Test Page received

Octopus Server configured successfully
If you can view this page, your Octopus Server is configured and ready to accept requests from Polling Tentacles.
This landing page is displayed when no X509 certificate is provided. Only Octopus Tentacles with a trusted certificate can connect to this Octopus Server.

Used a API key to register the windows polling target.

When Installing tentical get the following message

Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
Octopus.Client.Exceptions.OctopusDeserializationException: Unable to process response from server: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.. Response content: 
<!doctype html>
<html>
<head>
    <meta charset='utf8'>
    <meta http-equiv='x-ua-compatible' content='ie=edge'>
    <title>Octopus Server</title>
    <style type='text/css'>
        body {
            font-family: 'Segoe UI', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            font-size: 10pt;
        }

        h1 {
            font-size: 15pt;
            font-weight: 400;
            margin-top: 7pt;
            margin-bottom: 7pt;
        }
    </style>
</head>
<body>
    <h1>Octopus Server configured successfully</h1>
    <p>If you can view this page, your Octopus Server is configured and ready to accept requests from Polling Tentacles.</p>
    <p>This landing page is displayed when no X509 certificate is provided. Only Octopus Tentacles with a trusted certificate can connect to this Octopus Server.</p>
</body>
</html>
 ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Octopus.Client.OctopusAsyncClient.<ReadResponse>d__58`1.MoveNext()
   --- End of inner exception stack trace ---
   at Octopus.Client.OctopusAsyncClient.<ReadResponse>d__58`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<DispatchRequest>d__56`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Get>d__35`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncRepository.<LoadRootDocumentInner>d__165.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Create>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Create>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Manager.Tentacle.TentacleConfiguration.SetupWizard.TentacleSetupWizardModel.<VerifyCredentials>d__198.MoveNext() in C:\buildAgent\work\e5cfddd118f4e691\source\Octopus.Manager.Tentacle\TentacleConfiguration\SetupWizard\TentacleSetupWizardModel.cs:line 563

Hi Rob,

Thanks for getting in touch!

It very much looks like your Octopus Server is returning the test page when you are attempting to connect your Tentacle over websockets. So that I can try and work out why (and what may have gone wrong) are you able to provide the command that you are using to register your Tentacle.

It’s also possible that you don’t have a certificate configured on the port you are using, if you can confirm that (instructions here) that would be greatly appreciated.

Thanks Rob, hopefully we can get this sorted quickly for you.

Regards,
Alex

Thanks for the reply. I followed the directions from the site

Installed an enterprise wild card X509 server authentication certificate.
Import-PfxCertificate -FilePath \\server\Release\Staging\SSL-Cert\2018-wildcard.pfx -CertStoreLocation Cert:\LocalMachine\My\ -Exportable -Password (ConvertTo-SecureString '*********' -AsPlainText -Force).

Configured HTTPSYS
netsh http add sslcert ipport=0.0.0.0:443 certhash=ED84F5A212181E5AE03B7CF03804F0EF756C24ED appid='{00112233-4455-6677-8899-AABBCCDDEEFF}' certstorename=My

Configure Octopus Server Default Instance with web socket
cd ‘C:\Program Files\Octopus Deploy\Octopus’
.\Octopus.Server.exe service --instance OctopusServer --stop
.\Octopus.Server.exe configure --instance OctopusServer --commsListenWebSocket https://+:443/OctopusComms
.\Octopus.Server.exe service --instance OctopusServer --start

Confrimed Test Page worked

On Tentical Server
msiexec -i https://download.octopusdeploy.com/octopus/Octopus.Tentacle.4.0.1-x64.msi

Then I just filled in the form built into the Installer. Error happens when it is in the register section.

Figured out the problem.
When entering the Octopus Server I was entering the endpoint for the web hook; rather it was supposed to be the dashboard’s server address.

I interpreted the documentation as the polling tentical URI was using the web hook, I just configured, and that was what was supposed to be entered in the Octopus Server URI.

Hi Rob,

Thanks for the update and glad to hear that you have it all sorted.

If there’s anything else I can assist with please let me know!

Regards,
Alex

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