如何解决 SG 客户端的 ENOTFOUND 错误
How to resolve SG Client's ENOTFOUND error
我将 Secure Gateway 的目标主机设置为 ssldemo
的主机名,而不是 IP 地址。我使用 '--net="host"'
选项启动 SG Client 以解析主机名。当然,主机操作系统可以解析主机名。请查看 ping 主机名的日志。但是,SG Client 无法解析主机名并在执行 trx 时出现 "ENOTFOUND"
错误。我试图添加 '--net="host" --add-host "ssldemo:192.168.56.1"'
选项,但我得到了同样的错误。
你能教我如何解决 "ENOTFOUND"
错误吗?
linux-h4fn:~ # docker run -it ibmcom/secure-gateway-client *GATEWAY_ID* --net="host"
IBM Bluemix Secure Gateway Client version 1.1.0
press enter for the command line
[2015-07-06 10:46:50.383] [INFO] The Secure Gateway tunnel is connected
[2015-07-06 10:46:56.824] [INFO] Connection #78 is being established to ssldemo:443
[2015-07-06 10:46:56.845] [INFO] Connection #78 established to ssldemo:443
[2015-07-06 10:46:56.950] [ERROR] Connection #78 to destination ssldemo:443 had error: ENOTFOUND
[2015-07-06 10:46:56.972] [INFO] Connection #78 to ssldemo:443 was closed
[2015-07-06 10:46:58.080] [INFO] Connection #79 is being established to ssldemo:443
[2015-07-06 10:46:58.100] [INFO] Connection #79 established to ssldemo:443
[2015-07-06 10:46:58.296] [ERROR] Connection #79 to destination ssldemo:443 had error: ENOTFOUND
linux-h4fn:~ # ping ssldemo
PING ssldemo (192.168.56.1) 56(84) bytes of data.
64 bytes from ssldemo (192.168.56.1): icmp_seq=1 ttl=128 time=5.01 ms
64 bytes from ssldemo (192.168.56.1): icmp_seq=2 ttl=128 time=11.4 ms
安全网关服务无法识别 DNS 名称。您可以尝试使用 IP 地址代替主机名吗?
如果您在重新启动以前工作的安全网关连接时遇到 ENOTFOUND 错误,则可能是 Docker 服务本身的问题,因此可以通过重新启动 Docker 来解决您系统上的服务。
如果SG客户端容器还在运行ning,杀掉它:
- sudo docker ps
- sudo docker kill containerid
重启Docker:
- sudo 服务docker重启
重新启动 SG 客户端容器:
- sudo docker 运行 -it ibmcom/secure-gateway-client clientid
不要更新您的访问控制列表:
- acl 允许 主机:端口
我将 Secure Gateway 的目标主机设置为 ssldemo
的主机名,而不是 IP 地址。我使用 '--net="host"'
选项启动 SG Client 以解析主机名。当然,主机操作系统可以解析主机名。请查看 ping 主机名的日志。但是,SG Client 无法解析主机名并在执行 trx 时出现 "ENOTFOUND"
错误。我试图添加 '--net="host" --add-host "ssldemo:192.168.56.1"'
选项,但我得到了同样的错误。
你能教我如何解决 "ENOTFOUND"
错误吗?
linux-h4fn:~ # docker run -it ibmcom/secure-gateway-client *GATEWAY_ID* --net="host"
IBM Bluemix Secure Gateway Client version 1.1.0
press enter for the command line
[2015-07-06 10:46:50.383] [INFO] The Secure Gateway tunnel is connected
[2015-07-06 10:46:56.824] [INFO] Connection #78 is being established to ssldemo:443
[2015-07-06 10:46:56.845] [INFO] Connection #78 established to ssldemo:443
[2015-07-06 10:46:56.950] [ERROR] Connection #78 to destination ssldemo:443 had error: ENOTFOUND
[2015-07-06 10:46:56.972] [INFO] Connection #78 to ssldemo:443 was closed
[2015-07-06 10:46:58.080] [INFO] Connection #79 is being established to ssldemo:443
[2015-07-06 10:46:58.100] [INFO] Connection #79 established to ssldemo:443
[2015-07-06 10:46:58.296] [ERROR] Connection #79 to destination ssldemo:443 had error: ENOTFOUND
linux-h4fn:~ # ping ssldemo
PING ssldemo (192.168.56.1) 56(84) bytes of data.
64 bytes from ssldemo (192.168.56.1): icmp_seq=1 ttl=128 time=5.01 ms
64 bytes from ssldemo (192.168.56.1): icmp_seq=2 ttl=128 time=11.4 ms
安全网关服务无法识别 DNS 名称。您可以尝试使用 IP 地址代替主机名吗?
如果您在重新启动以前工作的安全网关连接时遇到 ENOTFOUND 错误,则可能是 Docker 服务本身的问题,因此可以通过重新启动 Docker 来解决您系统上的服务。
如果SG客户端容器还在运行ning,杀掉它:
- sudo docker ps
- sudo docker kill containerid
重启Docker:
- sudo 服务docker重启
重新启动 SG 客户端容器:
- sudo docker 运行 -it ibmcom/secure-gateway-client clientid
不要更新您的访问控制列表:
- acl 允许 主机:端口