SeleniumHQ / docker-selenium

Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
http://www.selenium.dev/docker-selenium/
Other
7.93k stars 2.51k forks source link

Health check URL for the Node #517

Closed vijayrcse closed 7 years ago

vijayrcse commented 7 years ago

Meta -

Image(s):

Docker-Selenium Image Version(s):

OS:

Expected Behavior -

Hi , Can anyone please let me know what would be the health check URL for a Node server( assuming i am running a node-firefox-debug )

Actual Behavior -

diemol commented 7 years ago

Hi,

I'll answer it without knowing the context or what you want to achieve.

In general you can use something like: http://HOST:PORT/wd/hub/status

For nodes and standalone you get a JSON with a field that says something like: status=success. For the grid it says something like status=13, when it is working fine.

You just need to parse that response to check if the node is up.

Since this is not really an issue but more a question, I'd recommend you to post it on the Selenium User Group or join the Selenium Slack Channel. You will get faster feedback for questions over there.

ddavison commented 7 years ago

see https://github.com/SeleniumHQ/docker-selenium/issues/332#issuecomment-259264846

vijayrcse commented 7 years ago

this http://HOST:PORT/wd/hub/status works for the hub, but not for the node image. could you please suggest if it is same URL for node as well

Basically i trying to configure a health check path for my node image running in AWS ECS

ddavison commented 7 years ago

if you noticed the subsequent comments i linked, it was grep for chrome/firefox - that's how you can check for node presence

millerick commented 5 years ago

@ddavison , I have a use case for this, which is running selenium-hub and selenium-node on a Kubernetes cluster. The nodes need to expose an endpoint for readiness and liveness probes to hit in order for the cluster to properly cycle bad containers out of service and replace them with new ones. Is there a reason why this is not supported, or am I overlooking something? Having to probe through the selenium-hub process is less than ideal.

diemol commented 5 years ago

@millerick the url is the same one for the nodes.