Register tentacle - Unable to connect to the Octopus Deploy server

I’ve been trying to configure an Octopus worker within a Kubernetes Cluster(EKS) following the process in this blog (Creating workers on a Kubernetes cluster - Octopus Deploy). But “Unable to connect to the Octopus Deploy server” when registering tentacle with octopus server.
This is the error message:

===============================================
Configuring Octopus Deploy Tentacle
 - server endpoint 'https://a783c43b8d4eb422a90077e1a6d84002-253818829.us-east-2.elb.amazonaws.com'
 - api key '##########'
 - communication mode 'Polling' (Active)
 - server port 10943
 - worker pool 'Default Worker Pool'
 - host 'ComputerName'
 - space 'Default'
===============================================
Creating empty configuration file: /etc/octopus/tentacle.config
Setting home directory to: /etc/octopus
Saving instance: Tentacle
Setting directory paths ...
Application directory set to: /home/Octopus/Applications
These changes require a restart of the Tentacle.
Configuring communication type ...
Tentacle will not listen on a port
These changes require a restart of the Tentacle.
Updating trust ...
Removing all trusted Octopus Servers...
These changes require a restart of the Tentacle.
Creating certificate ...
A new certificate has been generated and installed. Thumbprint:
AF0AA00FEB1CCFBFA22FDFCEE75E5DBEEDDE5B34
These changes require a restart of the Tentacle.
Registering with server ...
Registering Tentacle with API key
Checking connectivity on the server communications port 10943...
Connected successfully
Registering the tentacle with the server at https://a783c43b8d4eb422a90077e1a6d84002-253818829.us-east-2.elb.amazonaws.com/
Detected automation environment: NoneOrUnknown
===============================================================================
Unable to connect to the Octopus Deploy server. See the inner exception for details.
System.Exception
   at Octopus.Client.OctopusAsyncRepository.LoadRootDocumentInner()
   at Octopus.Client.OctopusAsyncClient.Create(OctopusServerEndpoint serverEndpoint, OctopusClientOptions options, Boolean addHandler, String requestingTool)
   at Octopus.Client.OctopusAsyncClient.Create(OctopusServerEndpoint serverEndpoint, OctopusClientOptions options)
   at Octopus.Tentacle.Commands.OptionSets.OctopusClientInitializer.CreateClient(ApiEndpointOptions apiEndpointOptions, IWebProxy overrideProxy, Boolean useDefaultProxy) in OctopusClientInitializer.cs:line 24
   at Octopus.Tentacle.Commands.OptionSets.OctopusClientInitializer.CreateClient(ApiEndpointOptions apiEndpointOptions, Boolean useDefaultProxy) in OctopusClientInitializer.cs:line 15
   at Octopus.Tentacle.Commands.RegisterMachineCommandBase`1.StartAsync() in RegisterMachineCommandBase.cs:line 114
   at Octopus.Tentacle.Commands.RegisterMachineCommandBase`1.Start() in RegisterMachineCommandBase.cs:line 80
   at Octopus.Tentacle.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in AbstractCommand.cs:line 80
   at Octopus.Tentacle.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) in OctopusProgram.cs:line 545
   at Octopus.Tentacle.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in ConsoleHost.cs:line 34
   at Octopus.Tentacle.Startup.OctopusProgram.RunHost(ICommandHost host) in OctopusProgram.cs:line 221
   at Octopus.Tentacle.Startup.OctopusProgram.Run() in OctopusProgram.cs:line 155

--Inner Exception--
Connection timed out
System.Net.Http.HttpRequestException
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at Octopus.Client.OctopusAsyncClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse)
   at Octopus.Client.OctopusAsyncClient.Get[TResource](String path, Object pathParameters)
   at Octopus.Client.OctopusAsyncRepository.LoadRootDocumentInner()

--Inner Exception--
Connection timed out
System.Net.Sockets.SocketException
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
-------------------------------------------------------------------------------
Terminating process with exit code 100
Full error details are available in the log files at:
/etc/octopus/Logs
Octopus/Logs
If you need help, please send these log files to https://octopus.com/support
  1. Attached is the log file from /etc/octopus/Tentacle/Logs/OctopusTentacle.txt
    OctopusTentacle.txt (6.0 KB)
  2. The octopus server was deployed on Kubernetes using Octopus Helm charts and the server is reporting no errors, just seems to be a problem when trying to register a worker on the server.
  3. Curl to the 10943 endpoint from tentacle container looks OK as far as getting to the octopus server.
  4. The environment is using the Free license option for the Proof Of Concept testing.

Can you please advise on this? Thanks.

Hi @florence
Welcome to Octopus forum!

At first glance the System.Net.Sockets.SocketException leads me to believe its a network error, most likely in a firewall rule. Is this something you can rule out at your end?

We have docs on some ports that need to be exposed for Octopus server here:

We need port 443 as well as port 10943 open from tentacle to server for registration.

We have a pretty comprehensive guide to troubleshooting tentacle setup here:

If none of the above apply I would definitely try the troubleshooting tips in the docs above as it covers a lot of scenarios that would take a long time to work through on the ticket here.

Let us know how you get on and if we need to dive a bit deeper for you.

Kind regards,
Paraic

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