Tentacle version 2.6.5.1010 disregards --server-comms-port flag

When attempting to register an active tentacle, the client seems to disregard the --server-comms-port. Details below. Notice the logs claims to check for connectivity to the default port while the exception thrown shows the port for the Octopus server.

Am I missing some configuration for the Tentacle or it this a (known) issue with the client?

Tentacle.exe register-with --instance Tentacle --server https://<HOST>:51981 --name <NAME> --apiKey <KEY> --force --console --comms-style TentacleActive --server-comms-port 10943 --environment <ENV> --role <ROLE>
2015-08-24 09:20:46.8845      1  INFO  Checking connectivity on the server communications port 10943...
2015-08-24 09:21:53.1567      1 FATAL  System.Exception: Unable to connect to the Octopus Deploy server. See the inner exception for details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <some-ip>:51981
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse) in y:\work\refs\heads\master\source\Octopus.Client\OctopusClient.cs:line 445
   at Octopus.Client.OctopusClient.EstablishSession() in y:\work\refs\heads\master\source\Octopus.Client\OctopusClient.cs:line 286
   --- End of inner exception stack trace ---
   at Octopus.Client.OctopusClient.EstablishSession() in y:\work\refs\heads\master\source\Octopus.Client\OctopusClient.cs:line 308
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Octopus.Client.OctopusClient.get_RootDocument() in y:\work\refs\heads\master\source\Octopus.Client\OctopusClient.cs:line 58
   at Octopus.Client.OctopusRepository.CertificateRepository.GetOctopusCertificate() in y:\work\refs\heads\master\source\Octopus.Client\OctopusRepository.cs:line 636
   at Octopus.Tentacle.Commands.RegisterMachineCommand.Start() in y:\work\refs\heads\master\source\Octopus.Tentacle\Commands\RegisterMachineCommand.cs:line 73
   at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 55
   at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\ConsoleHost.cs:line 36

Hi Hruan,

Thanks for getting in touch!

In your command, you’re specifying a server port - it appears that’s where it’s trying to connect. If you leave the port out of the --server https://<HOST> command, does that work?

Hope that helps!

Damo

Yes, I’ve tried and it doesn’t help the issue.

Were you able to reproduce the issue on your end?

Some additional info.

Octopus server is reachable from the client machine:

.\TentaclePing.exe <HOST> 10943
Pinging <HOST> on port 10943
Connect: Success! 78ms, 150 bytes read
Connect: Success! 23ms, 150 bytes read
Connect: Success! 21ms, 150 bytes read
Connect: Success! 22ms, 150 bytes read
Connect: Success! 28ms, 150 bytes read
Connect: Success! 13ms, 150 bytes read
Connect: Success! 18ms, 150 bytes read
Connect: Success! 17ms, 150 bytes read
Connect: Success! 12ms, 150 bytes read
Connect: Success! 20ms, 150 bytes read
10 successful connections, 0 failed connections. Hit Ctrl+C to quit any time.

--server https://<HOST>, i.e. without port, returns Error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Schema is also require. Omitting https:// yields Error: Invalid URI: The format of the URI could not be determined.

Hi Hruan,

Ah, I see what’s going on.

To register itself, the Octopus Tentacle first needs to connect to the Octopus API which is exposed over the same port as the Web interface. It has to do this to register the tentacle on the server side, then establish the secure channel over port 10943.

I assume that the Web UI of Octopus is exposed via port 51981, in which case there’s an issue with communication to https://<HOST>:51981. The connectivity to port 10943 is fine, but the tentacle can’t communicate with the Octopus API.

Can you check the network connectivity between the tentacle machine and https://<HOST>:51981. There’s likely to be a proxy or firewall that’s preventing it from communicating.

Kind Regards,
Damo

Ah, that’s likely the issue. Thanks!

The error message is misleading, though. :slight_smile:

Hi Hruan,

Yes, it’s not the most helpful error! I’ll have a look at whether we can catch it and print something more specific.

I hope this resolves the issue!

Kind Regards,
Damo