pepe pepito
pepe pepito

Reputation: 66

I try to use the GGR but it returns "connection refused" using selenoid in local

I have installed selenoid, selenoid-ui, ggr and ggr-ui

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8628fa3cc58e aerokube/ggr-ui:latest-release "/usr/bin/ggr-ui -..." 1 second ago Up 1 second 0.0.0.0:8888->8888/tcp ggr-ui f4e9c2ccc5c3 aerokube/ggr:latest-release "/usr/bin/ggr -lis..." 16 seconds ago Up 16 seconds ggr beb1453e5c5d aerokube/selenoid:1.6.1 "/usr/bin/selenoid..." 6 days ago Up 6 days 0.0.0.0:4445->4444/tcp selenoid 64dfb02d75fe aerokube/selenoid-ui:v1.5.6 "/selenoid-ui --se..." 9 days ago Up 9 days 0.0.0.0:8080->8080/tcp selenoid-ui 197dcabfb251 selenoid/video-recorder "/entrypoint.sh" 2 weeks ago Up 2 weeks nervous_albattani 1fc7e1423c86 selenoid/video-recorder "/entrypoint.sh" 2 weeks ago Up 2 weeks peaceful_wright 9e28f9224493 selenoid/video-recorder "/entrypoint.sh" 2 weeks ago Up 2 weeks frosty_saha 6b52e02770ef selenoid/video-recorder "/entrypoint.sh" 2 weeks ago Up 2 weeks gallant_ramanujan

If I use selenoid directly works successfully, but if I use ggr, returns a error in the log like that:

2018/05/31 18:28:42 [INIT] [Loading quota files from /etc/grid-router/quota] 2018/05/31 18:28:42 [INIT] [Listen on :8888] 2018/05/31 18:29:05 [STATUS] [Failed to fetch status: Get http://localhost:4445/status: dial tcp 127.0.0.1:4445: connect: connection refused] [172.16.0.173]

Upvotes: 1

Views: 1087

Answers (1)

vania-pooh
vania-pooh

Reputation: 2977

You are launching Ggr and Ggr UI in different way. For Ggr so far as I can see you are adding --net host flag. That means Ggr is using host machine network adapter and because of that specifying localhost:4445 in quota file should work. In the case of Ggr UI you are only forwarding its port 8888 to host machine port 8888 thus using bridged network. Ggr UI container's localhost differs from host machine localhost and you get connection refused.

As a possible solution you can either add --net host to Ggr UI or use IP address or host name of the hosts machine in XML quota files. For example on Mac there's a DNS alias docker.for.mac.localhost allowing to access host machine inside containers.

Upvotes: 3

Related Questions