0

I see this error in my test logs: WebDriverException: Session [id] was terminated due to FORWARDING_TO_NODE_FAILED.

I am using webdriver with grid configuration {HUB is in Boston and node is in London}

How to check if my driver instance is reachable ? Using (null != driver) does not handle this case.

optimistic_creeper
  • 2,739
  • 3
  • 23
  • 37

1 Answers1

0

This is not something that you can fix at your client code side.

As per the documentation here below is when your issue occurs.

FORWARDING_TO_NODE_FAILED The hub was unable to forward to the node. Out of memory errors/node stability issues or network problems

Sometime back I wrote a blog post wherein I explained how to go about building a "Self Healing" Grid. You can read it here to understand how you can avert these kind of problems (especially memory leaks)

If you are looking for some ready made solutions which demonstrates and uses this concept, take a look at the following :

Krishnan Mahadevan
  • 14,121
  • 6
  • 34
  • 66
  • Thanks Krishnan, I am looking for a simpler solution. e.g a method that checks if Hub can communicate with Node . p.s. HubManager.checkNode(firefox, availableForTest). – nikolmarku Nov 16 '16 at 11:16
  • The new session is a different request and all the other commands are different requests. Until you create a new session (which happens when you create a new RemoteWebDriver), the hub wouldn't really know which node is going to take its request. So what you are asking for as a simple api is not something that can be done.. (atleast not to the best of my knowledge) – Krishnan Mahadevan Nov 17 '16 at 04:01