Selenium Server hangs on "Trying to create a new session on node host: [...]"

1,295 views
Skip to first unread message

ama...@oberospm.com

unread,
Oct 3, 2014, 6:37:12 AM10/3/14
to seleniu...@googlegroups.com
Hi.

I'm using Selenium in a Grid configuration with the hub running locally and a node on a virtual machine. The problem I have boils down to this: apparently the hub cannot create a new session. It manifests in the following ways:

1) The first time I attempt to run the test after starting the hub + node, VStest.testexecutionegine.exe crashes. http://i.imgur.com/LYjJfIk.png

2) Every time after that, Selenium server repeatedly displays Trying to create a new session on node host: [...]" message, but never actually launches the browser on the VM. http://i.imgur.com/ZAqXK9f.png


Other info:

- I'm running selenium-server-standalone-2.43.1
- C# code for the RemoteWebDriver instance:

        public static void Initialize()
       
{
           
Instance = new RemoteWebDriver(new Uri("http://127.0.0.1:5555/wd/hub"), DesiredCapabilities.InternetExplorer());
           
Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(2));
       
}




Also tried using http://localhost:5555/wd/hub and http://<my_ip:5555. Same result. 

I'm guessing this is some kind of bug, I could really use some help to get this setup to work.

Thanks in advance.Let me know if you need more info.




Kevin Sheedy

unread,
Apr 23, 2015, 9:10:31 AM4/23/15
to seleniu...@googlegroups.com
I'm having the same issue on MacOS. Works fine on Windows 7.
Started the hub and then the node and it looks like the node has registered with the hub correctly. Hub and node are on the same machine.
Then when I run my test, the hub hangs on:
"Trying to create a new session on node host :http://10.28.113.228:5555"

My first reaction was that this was a proxy issue as this is on a corporate network.

Anyone else experienced this?
Any docs available on working with proxies?
Any way of getting more verbose log output?

Thanks

Krishnan Mahadevan

unread,
Apr 23, 2015, 9:16:46 AM4/23/15
to Selenium Users
Kevin
What does your code look like which is creating the WebDriver instance ?

I have never had this problem on my MAC both on and off a CORP network. There is something else that may be fishy here.

The Grid jar uses a Java Utils logger. So you should be able to create a logging.properties file and then feed it into the JVM via the -Djava.util.logging.config.file=myLoggingConfigFilePath argument.

What sort of documents are you expecting for the proxies ? If you could shed some light, I could perhaps try writing up something on my blog post [ there are a few posts related to proxies though ]


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2887ec6b-ac13-415a-b9c2-8ab9028f6ac3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Kevin Sheedy

unread,
Apr 24, 2015, 11:05:21 AM4/24/15
to seleniu...@googlegroups.com
Thanks Krishnan

I eventually worked out the problem. I'm running the Selenium Driver, Hub and Node on the same machine for testing.
When the node starts, it connects to the hub using 'localhost' which works fine. When the driver starts, it also connects to the hub using 'localhost', again fine. Now when the hub tries to connect to the node, it uses the ip address supplied by the node in the initial handshake, and not using 'localhost'.

The system was setup to go via the proxy for ip addresses but not for localhost, and the hub didn't have a session/credentials to use the proxy. End result was that the hub was hanging trying to connect to the node. Unfortunately, there doesn't seem to be a timeout or any error messages written to the console.

Thanks
Reply all
Reply to author
Forward
0 new messages