I have a problem similar to How to access the external interface for the external interface, but I cannot use the combinations of network parameters correctly.
I am on OSX using Docker for Mac, not the old docker machine device, as well as the official image of the consul docker, and not the progory / docker image.
I can start the 3D server <node using
docker run -d --name node1 -h node1 consul agent -server -bootstrap-expect 3
JOIN_IP="$(docker inspect -f '{{.NetworkSettings.IPAddress}}' node1)"
docker run -d --name node2 -h node2 consul agent -server -join $JOIN_IP
docker run -d --name node3 -h node3 consul agent -server -join $JOIN_IP
So far so good, they are connected to each other and work fine. Now I want to start the agent and view it through the interface.
I tried a bunch of -client and -bind combinations, which seem to be the key to all of this. Using
docker run -d -p 8500:8500 --name node4 -h node4 consul agent -join $JOIN_IP -ui -client=0.0.0.0 -bind=127.0.0.1
UI http://localhost:8500/ui/, :
docker exec -t node4 consul members
Node Address Status Type Build Protocol DC
node1 172.17.0.2:8301 alive server 0.7.1 2 dc1
node2 172.17.0.3:8301 alive server 0.7.1 2 dc1
node3 172.17.0.4:8301 alive server 0.7.1 2 dc1
node4 127.0.0.1:8301 alive client 0.7.1 2 dc1
; , node4 - " ",
2016/12/19 18:18:13 [ERR] memberlist: Failed to send ping: write udp 127.0.0.1:8301->172.17.0.4:8301: sendto: invalid argument
- --net = host OSX.
-bind = IP, ,
Error starting agent: Failed to start Consul client: Failed to start lan serf: Failed to create memberlist: Failed to start TCP listener. Err: listen tcp 192.168.1.5:8301: bind: cannot assign requested address
, udp (-p 8500: 8500 -p 8600: 8600 -p 8400: 8400 -p 8300-8302: 8300-8302 -p 8600: 8600/udp -p 8301 -8302: 8301-8302/udp), .
node ?