Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Selenium Grid will not work when using a docker overlay network #90

Closed
bzon opened this issue May 29, 2016 · 1 comment
Closed

Selenium Grid will not work when using a docker overlay network #90

bzon opened this issue May 29, 2016 · 1 comment
Assignees
Labels

Comments

@bzon
Copy link

bzon commented May 29, 2016

I'm currently using a swarm cluster with docker overlay network and had the same issue as below. I could not access Selenium Grid.

Problem Reference: SeleniumHQ/docker-selenium#51
http://automatictester.co.ukk/2012/10/27/selenium-grid-2-0-and-remotehost-parameter/

Logs from selenium hub container:
selenium-hub | 16:59:45.925 INFO - Registered a node http://172.20.0.4:5555
selenium-hub | 16:59:50.253 INFO - Registered a node http://172.20.0.2:5555

The above is fine when running the selenium stack on a docker bridge type network but will not work against a docker overlay type network.

To recreate the issue:
use a CUSTOM_NETWORK_NAME that is a docker overlay network type instead of the default bridge.

To fix the issue I have to add a new environment variable entry.
For chrome:
REMOTE_HOST: "http://selenium-node-chrome:5555"
For firefox:
REMOTE_HOST: "http://selenium-node-firefox:5555"

As said in the topic link above and as I've observed, selenium by default uses the bridge network container ip instead of their overlay network ip.

Logs from selenium-hub after applying the fix:
selenium-hub | 17:02:47.526 INFO - Registered a node http://selenium-node-chrome:5555
selenium-hub | 17:02:51.736 INFO - Registered a node http://selenium-node-firefox:5555

@anton-kasperovich
Copy link
Contributor

Have the same bug on Swarm, will fix it as @bzon provided the working solution, thank you!

Also, we want update Selenium Grid and Chrome/Firefox nodes to the latest stable version, will send a pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants