Connection refused / failed to connect to host

I have a process running on a specific port on my remote Ubuntu computer, and I am viewing this port through HTTP. When I tried to connect to the client using curl, I cannot connect, but if I make the same call on the remote computer locally, I see that it is connecting. So I'm sure this is a network problem, but just not sure what it is?

Even trying on the remote host, I get the same error if I give the actual IP address of the machine!

Joes-MacBook-Pro:~ joe$ curl --verbose --insecure --cert .docker/cert.pem --key .docker/key.pem https://my.ip.address:1234/images/json * About to connect() to my.ip.address port 1234 (#0) * Trying my.ip.address... Connection refused * couldn't connect to host * Closing connection #0 curl: (7) couldn't connect to host Joes-MacBook-Pro:~ joe$ 
+6
source share
3 answers

Please check your curl version first if it is greater than 7.33.0-3

Reduce curl to 7.33.0-3. There is a known bug that is now fixed and should be released with the next version. I understood that too.

Link: https://bbs.archlinux.org/viewtopic.php?id=175433 http://sourceforge.net/p/curl/bugs/1319/

+4
source

I think I am facing the same problem. Finally, I tried another port and it worked. Perhaps you can change the port.

+1
source

I do not see the topic title text in the output of the command, so I'm not sure if this is really related. For me, the output of the command and the described behavior show that the server process is explicitly associated with 127.0.0.1, instead of binding to a public IP address or to 0.0.0.0 to any address, you can check this.

0
source

Source: https://habr.com/ru/post/978586/


All Articles