在DNS缓存错误中找不到Curl主机名 [英] Curl Hostname was NOT found in DNS cache error
问题描述
我有一个进程运行在我的远程Ubuntu机器上的特定端口,我通过HTTP暴露该端口。当我尝试使用curl连接到我的客户端时,我无法连接,但如果我在本地在远程计算机上执行相同的调用,我可以看到它连接。所以我很确定这是一个网络问题,但只是不知道是什么?
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?
即使尝试在远程主机,我得到相同的错误,如果我给出机器的实际IP地址!
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$
推荐答案
如果大于7.33.0-3,请先检查您的卷曲版本
Please check your curl version first if it's greater than 7.33.0-3
将卷曲降低至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.
参考链接:
https://bbs.archlinux.org/viewtopic.php?id=175433
http://sourceforge.net/p/curl/bugs/1319/
这篇关于在DNS缓存错误中找不到Curl主机名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!