groupon / Selenium-Grid-Extras

Simplify the management of the Selenium Grid Nodes and stabilize said nodes by cleaning up the test environment after the build has been completed
BSD 3-Clause "New" or "Revised" License
536 stars 209 forks source link

<hub-ip>:3000 doesn't show any connected nodes #326

Open sanghviharshit opened 7 years ago

sanghviharshit commented 7 years ago

<hub-ip>:4444 shows all the connected nodes, but <hub-ip>:3000 doesn't show any connected nodes. I can navigate to any <node-ip>:3000 and see overview as well as recorded videos.

I read somewhere that the recorded videos on nodes get copied over to the hub, but my videooutput directory on the hub is empty. Also <hub-ip>:3000 only shows the hub machine's details as if it was a node. (I have configured the hub for selenium grid extras with the first option - hub, not 3 - hub and node)_

Here are my configs -

Startup script for the hub:

./start_grid_extras.sh &

startup script for the node:

./start_grid_extras.sh &

selenium_grid_extras_config.json for the hub

{
  "theConfigMap": {
    "hub_config_files": [
      "selenium-hub-config.json"
    ],
    "auto_start_hub": "0",
    "iedriver": {
      "version": "3.3.0"
    },
    "default_role": "hub",
    "chromedriver": {
      "bit": "64",
      "version": "2.28"
    },
    "auto_update_drivers": "1",
    "auto_start_node": "0",
    "hub_config": {},
    "geckodriver": {
      "version": "0.15.0"
    },
    "log_maximum_age_ms": 8.64E8,
    "reboot_after_sessions": "0",
    "grid_extras_port": "3000",
    "webdriver": {
      "version": "3.3.1"
    },
    "node_config_files": []
  }
}

hub_4444.json

{
  "port": 4444,
  "newSessionWaitTimeout": -1,
  "servlets": [
    "com.groupon.seleniumgridextras.grid.servlets.ProxyStatusJsonServlet"
  ],
  "withoutServlets": [],
  "custom": {},
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "nodePolling": 5000,
  "cleanUpCycle": 5000,
  "role": "hub",
  "debug": false,
  "browserTimeout": 60,
  "timeout": 1800
}

selenium_grid_extras_config.json for the node

{
  "theConfigMap": {
    "auto_update_browser_versions": "1",
    "hub_config_files": [],
    "auto_start_hub": "0",
    "iedriver": {
      "version": "3.3.0"
    },
    "default_role": "node",
    "unregisterNodeDuringReboot": "true",
    "chromedriver": {
      "bit": "64",
      "version": "2.28"
    },
    "auto_update_drivers": "1",
    "video_recording_options": {
      "videos_to_keep": "40"
    },
    "auto_start_node": "1",
    "hub_config": {},
    "geckodriver": {
      "version": "0.15.0"
    },
    "log_maximum_age_ms": 8.64E8,
    "reboot_after_sessions": "40",
    "grid_extras_port": "3000",
    "webdriver": {
      "version": "3.3.1"
    },
    "node_config_files": [
      "selenium-node-config.json"
    ]
  }
}

node_5555.json

{
  "capabilities": [
    {
      "seleniumProtocol": "WebDriver",
      "browserName": "firefox",
      "maxInstances": 10,
      "version": "",
      "platform": "LINUX"
    },
    {
      "seleniumProtocol": "WebDriver",
      "browserName": "chrome",
      "maxInstances": 10,
      "version": "",
      "platform": "LINUX"
    }
  ],
  "loadedFromFile": "selenium-node-config.json",
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 10,
  "port": 5555,
  "register": true,
  "unregisterIfStillDownAfter": 60000,
  "hubPort": 4444,
  "hubHost": "<hub-ip>",
  "registerCycle": 5000,
  "nodeStatusCheckTimeout": 5000,
  "downPollingLimit": 2
}
josh-palan commented 7 years ago

I'm having a similar issue. I am currently running my Grid Hub on a Mac Mini, running OSX 10.12.5, and my nodes are virtual machines running on the same Mac.

janwiemers commented 7 years ago

Yes same here. I'm having a hin running on rechst. And 6 nodes running latest macOS

smccarthy commented 7 years ago

@sanghviharshit I thought this was true as well I read somewhere that the recorded videos on nodes get copied over to the hub, but my video_output directory on the hub is empty. , but I have noticed I don't see the videos on the hub either (I think). If not, it should be opened as an issue (IMO).

smccarthy commented 7 years ago

@sanghviharshit Can you explain this in more detail ? Also <hub-ip>:3000 only shows the hub machine's details as if it was a node. . Maybe post a picture screenshot of what you are seeing for the :3000

shankarkc commented 7 years ago

@sanghviharshit Hub can get the video for you. Here is the URL for it. You just need to know the session ID for your test.

testcaseVideoURL = "http://hubserver:3000/download_video/" + sessionId + ".mp4";
smccarthy commented 7 years ago

Will close this out on Monday 8/21/2017 if no response from @sanghviharshit .

sanghviharshit commented 7 years ago

@smccarthy Ignore the videos not getting copied to the hub part, I guess it just takes a while for the hub to download all the videos from all nodes and I was killing the nodes before that.

Regarding Also <hub-ip>:3000 only shows the hub machine's details as if it was a node: I believe when you navigate to 3000, it is supposed to show information (screenshots of each node, their configs and system info) from all the connected nodes as well. But in my case, it doesn't show any connected nodes, but only shows the hub's screenshot and config and the videos downloaded from nodes. Please let me know if that is expected behavior.