"Name or service not known" when trying to create a Linux Tentacle

When I run the /opt/octopus/tentacle/configure-tentacle.sh command, I am getting an error (after I enter all the information). This is the error message:

Checking that server communications are open failed with message Name or service not known Name or service not known. Retrying (1/5) in 00:00:00.7500000.
System.Net.WebException: Name or service not known Name or service not known
 ---> System.Net.Http.HttpRequestException: Name or service not known
 ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   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.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at System.Net.HttpWebRequest.SendRequest()
   at System.Net.HttpWebRequest.GetResponse()
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at Octopus.Tentacle.Communications.OctopusServerChecker.<>c__DisplayClass2_0.<CheckServerCommunicationsIsOpen>b__1() in /opt/buildagent/work/f090214449efab33/source/Octopus.Tentacle/Communications/OctopusServerChecker.cs:line 48
   at Octopus.Tentacle.Communications.OctopusServerChecker.Retry(String actionDescription, Action action, Int32 retryCount, TimeSpan initialDelay, Double backOffFactor) in /opt/buildagent/work/f090214449efab33/source/Octopus.Tentacle/Communications/OctopusServerChecker.cs:line 85

There are quite a few more stack traces, but this is the first.

Debugging a more has shown that this is the command that the script is failing on:

sudo /opt/octopus/tentacle/Tentacle register-worker --instance DockerHost01 --server http://my-octopus-server-here/ --name MyServerNameHere --comms-style TentacleActive --server-comms-port 10943 --apiKey API-ABC1234_My_API_Key_Here_ABC1234 --space 'My Space Name Here' --workerpool 'My Worker Pool Here'`

All the information seems to be correct (I have replaced some of it here for privacy).

I have run this command successfully on another server at my company. The only difference I can think of is that this time I am running as root. (The last time I ran it I was running as a user with rights to use sudo, but not root).

What can I do to get past this error?

I figured this out. I needed a fully qualified domain name. (Not sure why that was not needed the last time I did this.)

I put in the server name as http://my-octopus-server/. I tried testing that with a ping and it gave the same error (Name or service not known).

When I put in http://my-octopus-server.mydomain.net then it worked just fine (both ping and the Tentacle install). (Again, the last time I setup a tentacle on Linux this was not an issue. I am assuming the System Admin that set up the server did something different this time to cause a FQDN to be required.)

Hi @OctopusSchaff,

I’m happy to hear you were able to resolve your issue!

To answer this retrospectively and help anyone else who may encounter this, the error was returning that the http request failing, so a good first step is to make sure the Octopus Server is reachable via the URL you’re using in the arguments for registering the tentacle. That error could mean it’s being firewalled, or some DNS settings aren’t playing nicely. One way to check the connection to the Octopus Server from a Linux environment is to use curl.

Please let us know if you have any further questions.



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