I'm try to run selenium/node-chrome-debug with this docker-compose.yml:
chrome:
image: selenium/node-chrome-debug
ports:
- "5555:5555"
- "5900:5900"
environment:
- JAVA_OPTS=-Xmx512m
- NODE_MAX_INSTANCES=2
- NODE_MAX_SESSION=2
- SE_OPTS=-host 1.2.3.4 -port 5555
- HUB_PORT_4444_TCP_ADDR=5.6.7.8
- HUB_PORT_4444_TCP_PORT=4444
restart: always
I'm try to connect this node (1.2.3.4:5555) to remote hub (5.6.7.8:4444).
$ docker-compose up -d
Creating selenium_chrome_1
$ docker-compose logs -f
Attaching to selenium_chrome_1
chrome_1 | appending selenium options: -host 1.2.3.4 -port 5555
chrome_1 | Waiting xvfb...
chrome_1 | -bash: 1.2.3.4: command not found
chrome_1 | Waiting xvfb...
chrome_1 | Waiting xvfb...
chrome_1 | Waiting xvfb...
$ docker-compose ps
Name Command State Ports
---------------------------------------------------------------------------------------------------------
selenium_chrome_1 /opt/bin/entry_point.sh Restarting 0.0.0.0:5555->5555/tcp, 0.0.0.0:5900->5900/tcp
I found that entry_point.sh cannot handle white-spaces inside $SE_OPTS very well.
This is similar issue to this #249 , I bet.
out of curiosity, instead of specifying an array, have you also tried just an object?
...
environment:
JAVA_OPTS: '-Xmx512m'
NODE_MAX_INSTANCES: 2
NODE_MAX_SESSION: 2
SE_OPTS: '-host 1.2.3.4 -port 5555'
HUB_PORT_4444_TCP_ADDR: 5.6.7.8
HUB_PORT_4444_TCP_PORT: 4444
@ddavison I've tried environment object, the result is the same:
$ docker-compose up -d
Creating selenium_firefox_1
$ docker-compose logs -f
Attaching to selenium_firefox_1
firefox_1 | appending selenium options: -host 1.2.3.4 -port 5555
firefox_1 | Waiting xvfb...
firefox_1 | -bash: 1.2.3.4: command not found
firefox_1 | Waiting xvfb...
firefox_1 | Waiting xvfb...
firefox_1 | Waiting xvfb...
The problem is entry_point.sh will run this command:
SE_OPTS=-host 1.2.3.4 -port 5555 ... xvfb-run ... java ... -host 1.2.3.4 -port 5555
(1.2.3.4 is a command now, the rest are arguments of it).
Ran into same thing.
I can get the node-chrome working, not the node-chrome-debug variant.
This is pretty much required for getting a remote node hooked up to a remote grid.
Found a similar issue that worked for handling the spaces in env vars here: https://github.com/SeleniumHQ/docker-selenium/pull/249/files
to get this working - you can make a the following changes:
chrome:
image: selenium/node-chrome-debug:latest
volumes:
- $PWD/opt/bin/entry_point.sh:/opt/bin/entry_point.sh
and just copy the fixes that were made in that one merge request and put in in the folder as defined above ($PWD/op/bin/entry_point.sh) - hackish but will override the entry_point.sh until it is working (also chmod +x entry_point.sh is needed)
馃憤 I'll try it.
@vimagick did this work for you? I'm still using my hacked file in the meantime... would be nice to have this fixed in the main project files
This was solved with #459, which was merged and released, this issue can be closed.
Most helpful comment
Ran into same thing.
I can get the node-chrome working, not the node-chrome-debug variant.
This is pretty much required for getting a remote node hooked up to a remote grid.
Found a similar issue that worked for handling the spaces in env vars here: https://github.com/SeleniumHQ/docker-selenium/pull/249/files
to get this working - you can make a the following changes:
chrome: image: selenium/node-chrome-debug:latest volumes: - $PWD/opt/bin/entry_point.sh:/opt/bin/entry_point.shand just copy the fixes that were made in that one merge request and put in in the folder as defined above ($PWD/op/bin/entry_point.sh) - hackish but will override the entry_point.sh until it is working (also chmod +x entry_point.sh is needed)
entry_point.sh