How to resolve SG Client's ENOTFOUND error

心不动则不痛 提交于 2019-12-24 13:23:14

问题


I set up Secure Gateway's destination host as hostname which is ssldemo, not an IP address. I started SG Client with '--net="host"' option in order to resolve the hostname. Of course, the host operating system can resolve the hostname. Please see the logs of ping the hostname. But, SG Client couldn't resolve the hostname and got "ENOTFOUND" error when the trx was executed. I tried to add '--net="host" --add-host "ssldemo:192.168.56.1"' options, but I got the same error.

Could you please teach me how to resolve "ENOTFOUND" error?

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

回答1:


The secure gateway service does not recognize the DNS name. Can you try using the IP address instead of the hostname?




回答2:


If you get the ENOTFOUND error when restarting a Secure Gateway connection that was previously working, it may be a problem with the Docker service itself, and can therefore be resolved by restarting the Docker service on your system.

If the SG client container is still running, kill it:

  • sudo docker ps
  • sudo docker kill containerid

Restart Docker:

  • sudo service docker restart

Restart the SG client container:

  • sudo docker run -it ibmcom/secure-gateway-client clientid

Don't for get to update your access control list:

  • acl allow host:port


来源:https://stackoverflow.com/questions/31249266/how-to-resolve-sg-clients-enotfound-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!