Q:

Connection refused / couldn't connect to host

I have a process that is running on a specific port on my remote Ubuntu machine and I'm exposing that port via HTTP. When I tried to connect with my client using curl, I'm not able to connect, but if I do the same call on the remote machine locally, I can see that it connects. So I'm pretty sure that it is a network issue, 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$ 

A:

Please check your curl version first if it's greater than 7.33.0-3
Downgrade curl to 7.33.0-3. There is a known bug that is now fixed and should be released with the next version. I got bit by this too.
Reference Link :
https://bbs.archlinux.org/viewtopic.php?id=175433
http://sourceforge.net/p/curl/bugs/1319/

