docker - How to make Secure Gateway Client to resolve the hostname of the destination's host -


i use hostname instead of ip address destination's host in bluemix secure gateway. use docker secure gateway client. tried realize editing /etc/hosts of host os in docker secure gateway client installed , running sg client --net=“host” or --add-host=hosname:ip address. secure gateway service seems not use dns regarding following q&a's answer, tried use /etc/hosts.

how resolve sg client's enotfound error

but couldn't succeed, sg client got enotfound. teach me how make secure gateway client resolve hostname of destination's host.

[results of --net=“host“]

  • i confirmed host os resolved hostname.

    #ping httpserver1 ping httpserver1 (192.168.56.1) 56(84) bytes of data. 64 bytes httpserver1 (192.168.56.1): icmp_seq=1 ttl=128 time=7.10 ms 64 bytes httpserver1 (192.168.56.1): icmp_seq=2 ttl=128 time=6.89 ms

  • i ran sgclient --net=“host“

    # docker run -it ibmcom/secure-gateway-client xxxxxxxxxx --net=“host“
    ibm bluemix secure gateway client version 1.2.1

    [2015-07-08 15:47:01.097] [info] secure gateway tunnel connected

  • sg client got enotfound error

    #[2015-07-08 15:47:01.097] [info] secure gateway tunnel connected
    [2015-07-08 15:57:08.588] [info] connection #3 being established httpserver1:3000
    [2015-07-08 15:57:16.602] [error] connection #3 destination httpserver1:3000 had error: enotfound
    [2015-07-08 15:57:16.603] [info] connection #3 httpserver1:3000 closed

*sg seems support --net=“host“ regarding sg docs, seems not work well. https://www.ng.bluemix.net/docs/troubleshoot/securegateway/ts_index.html#ts_sg

[results of --add-host=httpserver1:192.168.56.1]

  • i ran sgclient --add-host=httpserver1:192.168.56.1

    #docker run -it ibmcom/secure-gateway-client xxxxxxxxxx --add-host="httpserver1:192 .168.56.1" ibm bluemix secure gateway client version 1.2.1 [2015-07-08 16:09:20.028] [info] secure gateway tunnel connected

  • sg client got enotfound error

    [2015-07-08 16:09:37.214] [info] connection #5 being established httpserver1:3000 [2015-07-08 16:09:45.231] [error] connection #5 destination httpserver1:3000 had error: enotfound [2015-07-08 16:09:45.232] [info] connection #5 httpserver1:3000 closed

i think way work locally if internal group add name of host dns. remember updates /etc/hosts file local in scope, no other machines use information resolve hostname ip. case asking secure gateway server in bluemix find have defined locally in own class c/d subnet, cannot without dns change.

another alternative try , use docker '--dns ' parameter, providing ip address of dns reachable.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -