Enable SSH for docker image selenium/node-chrome-debug

Skip to first unread message

Petr Šmíd

Nov 18, 2019, 4:53:36 PM11/18/19
to Selenium Developers

For our project in our company we need to run selenium/hub with selenium/node-chrome-debug. Image selenium/node-chrome-debug does not have ssh installed. We`d like to use ssh to this container from another containers while running. I`ve been trying to install ssh based on these commands: 
apt-get update && apt-get install -y netcat ssh iputils-ping && mkdir /var/run/sshd && chmod 0755 /var/run/sshd && useradd -p $(openssl passwd -1 u2password) --create-home --shell /bin/bash --groups sudo u2 && /usr/sbin/sshd

Upon that I committed changes and created my own image. When I start this new image ssh is enabled but there is node started. I`ve been using docker-compose.yml to start hub along with chrome debug. The output of docker-compose up is as follows: 
Creating selenium-hub ... done
Creating chrome_debug ... done
Attaching to selenium-hub, chrome_debug
selenium-hub | 2019-11-06 07:14:33,780 CRIT Supervisor running as root (no user in config file)
selenium-hub | 2019-11-06 07:14:33,782 INFO Included extra file "/etc/supervisor/conf.d/selenium-hub.conf" during parsing
selenium-hub | 2019-11-06 07:14:33,799 INFO supervisord started with pid 7
selenium-hub | 2019-11-06 07:14:34,807 INFO spawned: 'selenium-hub' with pid 15
selenium-hub | Starting Selenium Hub with configuration:
selenium-hub | 2019-11-06 07:14:34,869 INFO success: selenium-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-hub | {
selenium-hub |   "host": "",
selenium-hub |   "port": 4444,
selenium-hub |   "role": "hub",
selenium-hub |   "maxSession": 10,
selenium-hub |   "newSessionWaitTimeout": -1,
selenium-hub |   "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
selenium-hub |   "throwOnCapabilityNotPresent": true,
selenium-hub |   "jettyMaxThreads": -1,
selenium-hub |   "cleanUpCycle": 5000,
selenium-hub |   "browserTimeout": 120,
selenium-hub |   "timeout": 120,
selenium-hub |   "debug": false
selenium-hub | }
selenium-hub | 07:14:38.288 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
selenium-hub | 07:14:39.115 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 4444
selenium-hub | 2019-11-06 07:14:40.450:INFO::main: Logging initialized @5491ms to org.seleniumhq.jetty9.util.log.StdErrLog
selenium-hub | 07:14:42.080 INFO [Hub.start] - Selenium Grid hub is up and running
selenium-hub | 07:14:42.081 INFO [Hub.start] - Nodes should register to
selenium-hub | 07:14:42.082 INFO [Hub.start] - Clients should connect to
chrome_debug exited with code 0

When I checked hub status it`s saying no nodes have been started (http://localhost:4444/wd/hub/status):
  "status": 0,
  "value": {
    "ready": false,
    "message": "No spare hub capacity",
    "build": {
      "revision": "e82be7d358",
      "time": "2018-11-14T08:25:53",
      "version": "3.141.59"
    "os": {
      "arch": "amd64",
      "name": "Linux",
      "version": "4.19.27-linuxkit"
    "java": {
      "version": "1.8.0_222"

Is there any way to get selenium/node-chrome-debug updated and started with ssh?

Thank you.

Best regards,

Diego Molina

Nov 22, 2019, 9:07:47 AM11/22/19
to Selenium Developers
Hi Petr,

In theory, installing SSH in an existing docker ubuntu-based image should work without so much hassle. If you are bumping into issues, this is more likely related to the steps taken to achieve your goal, not so much to the presence of Selenium Grid in the docker image.

I would say that StackOverflow is a better place to post your question, where more people with docker expertise can have a look and ideally guide you to achieve what you want. This mailing list is for topics which are more Selenium related.


You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/87692ecc-1899-49ee-9998-24d3495f6776%40googlegroups.com.


Diego Molina
Reply all
Reply to author
0 new messages