Unable to bind to locking port 7054 within 45000 ms when running one test

5,471 views
Skip to first unread message

Joe

unread,
Jun 6, 2012, 4:03:41 AM6/6/12
to seleniu...@googlegroups.com
Hub - Mac OSX SnowLeapord
Node - VirtualBox Vista VM (Network adapter 1 - host-only network, Network adapter 2 - NAT)
Grid Version - 2.22.0

Script I'm running:

@BeforeMethod
public void DriverSetup() throws MalformedURLException
{
// hubserver = ip of hub
URL server = new URL("http://"+hubserver+":4444/wd/hub");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
Browser = new RemoteWebDriver(server, capabilities); // errors out on this line
}

@Test
public void SetupTest()
{
String url = "http://www.google.com";
Browser.get(url);
}

Firefox never opens on the node and I get this error:

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
Build info: version: '2.22.0', revision: '17049', time: '2012-05-29 13:31:45'
System info: os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.0', java.version: '1.7.0_04'
Driver info: driver.version: FirefoxDriver
Command duration or timeout: 47.46 seconds
Build info: version: '2.22.0', revision: '17049', time: '2012-05-29 13:32:05'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.8', java.version: '1.6.0_31'
Driver info: driver.version: RemoteWebDriver
Session ID: 
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:139)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:94)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:102)
at com.kongregate.browser_tests.FirefoxConnect.DriverSetup(FirefoxConnect.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:551)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:640)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:894)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1219)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:768)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
at org.testng.TestNG.run(TestNG.java:1022)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
Caused by: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
Build info: version: '2.22.0', revision: '17049', time: '2012-05-29 13:31:45'
System info: os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.0', java.version: '1.7.0_04'
Driver info: driver.version: FirefoxDriver
Build info: version: '2.22.0', revision: '17049', time: '2012-05-29 13:32:05'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.8', java.version: '1.6.0_31'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:94)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:68)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:207)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:147)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:93)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:57)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:51)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:196)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:150)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Tarun Kumar

unread,
Jun 6, 2012, 6:30:50 AM6/6/12
to seleniu...@googlegroups.com
A wild guess, you may be Xvfb which is needed to execute test on headless console.

Joe

unread,
Jun 6, 2012, 11:37:15 AM6/6/12
to seleniu...@googlegroups.com
Sorry, kind of new to this.  But how do I check if I'm Xvfb or not?

Tarun Kumar

unread,
Jun 6, 2012, 12:39:35 PM6/6/12
to seleniu...@googlegroups.com
Execute this command from console and see if you get any error -

Xvfb :1 -screen 0 1024x768x24 &

This is supposed to start Xvfb screen (provided it is installed)
And if you encounter any error then this Blog Post of mine may help.



Joe

unread,
Jun 6, 2012, 1:08:59 PM6/6/12
to seleniu...@googlegroups.com
When I ran the command, this is what I got:

(EE) AIGLX error: dlopen of /usr/X11/lib/dri/swrast_dri.so failed (dlopen(/usr/X11/lib/dri/swrast_dri.so, 5): image not found)
(EE) GLX: could not load software renderer
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(EE) XKB: No components provided for device Virtual core keyboard

So is there a way to turn this off such that a browser does spawn in the VM?

Tarun Kumar

unread,
Jun 6, 2012, 1:23:16 PM6/6/12
to seleniu...@googlegroups.com
My suggestion was only a wild guess but I am confused with this -

"So is there a way to turn this off such that a browser does spawn in the VM?"

How would test be executed with out spawning browser?

Joe

unread,
Jun 6, 2012, 1:26:16 PM6/6/12
to seleniu...@googlegroups.com
Oh sorry, I think I got confused a bit.  I was saying if I didn't want to run it headless.

Chandra Mouli

unread,
Jun 6, 2012, 1:28:01 PM6/6/12
to seleniu...@googlegroups.com
Hi Tarun,

Thanks for the reply.
But, running it in console is not recognizing Xvfb as a valid command and may be I am missing something.

any how, I think it is to run the scripts in silent mode without launching browser and my issue is firefox browser is not launch with the error mentioned by me.




--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/V8JtffsKbBIJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Tarun Kumar

unread,
Jun 6, 2012, 1:31:53 PM6/6/12
to seleniu...@googlegroups.com
@Joe in that case you need display. So that browser could be launched. Like usual Windows or Ubuntu machines.
@Chandra, Did not get this - "my issue is firefox browser is not launch with the error mentioned by me." Are you on right thread?

Chandra Mouli

unread,
Jun 6, 2012, 1:39:23 PM6/6/12
to seleniu...@googlegroups.com
Hi Tarun,

Sorry and I replied the wrong post.I have a similar issue and posted a query today.
Same error on windows m\c.

Sorry for the confusion.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/1UhGbgyVp6gJ.

Joe

unread,
Jun 6, 2012, 1:58:40 PM6/6/12
to seleniu...@googlegroups.com
hmm I don't seem to be getting that error anymore, however, the test still doesn't seem to be executing.  The log from the node is:

10:53:12.914 INFO - Registering the node to hub :http://192.168.56.1:4444/grid/register
10:53:16.259 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@e21a17 at URL: /status)
10:53:16.259 INFO - Done: /status
10:53:17.951 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@c9367a at URL: /status)
10:53:17.961 INFO - Done: /status
10:53:22.968 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@1a23b84 at URL: /status)
10:53:22.978 INFO - Done: /status
10:53:27.985 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@1dfba0e at URL: /status)
10:53:27.985 INFO - Done: /status
10:53:28.736 INFO - Executing: [new session: {platform=VISTA, browserName=firefox}] at URL: /session)
10:53:33.003 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@106b188 at URL: /status)
10:53:33.003 INFO - Done: /status
10:53:38.041 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@19adef3 at URL: /status)
10:53:38.041 INFO - Done: /status
10:53:43.058 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@dc8b07 at URL: /status)
10:53:43.058 INFO - Done: /status

not sure why it never seems to execute on the node in the vm, however, the node on the host machine works fine.

Mike Riley

unread,
Jun 6, 2012, 2:29:47 PM6/6/12
to seleniu...@googlegroups.com
This line from below indicates it did start running a job:

10:53:28.736 INFO - Executing: [new session: {platform=VISTA, browserName=firefox}] at URL: /session)

If the node on the host machine has the same selection parameters as far as platform and browser, it may just be choosing to run it on there instead of the VM for some reason.  I am not sure what the criteria are for choosing among multiple node servers where any one will do.  I always reduce the choice to be the one I am watching when trying a manual test.

Mike

Joe

unread,
Jun 6, 2012, 2:33:32 PM6/6/12
to seleniu...@googlegroups.com
I made sure that I stopped the node on the host machine and that the node was no longer registered before running the test again.  All I need on the node is just the selenium standalone server and not all the files required to run the test right?

Mike Riley

unread,
Jun 6, 2012, 2:49:23 PM6/6/12
to seleniu...@googlegroups.com
Correct.

My tests run on the same VM as my grid hub (which also has a node on it) under Vista.  I have in addition to that a Win7 64-bit VM and two XP VMs.  Each VM has a different version of Firefox and IE (except both XP VMs have IE 7 on them).  So I am not dealing with too different a platform setup as you are.

Can you show the command you are using to start your node server?

Mike

Joe

unread,
Jun 6, 2012, 3:03:15 PM6/6/12
to seleniu...@googlegroups.com
Right now my vm has 2 network adapters:
Adapter 1 - host-only network
Adapter 2 - NAT

not sure if that matters, but just in case I'm not supposed to be doing something like that.  

java -jar selenium-server-standalone-2.22.0.jar -role node -hub http://192.168.56.1:4444/grid/register where 192.168.56.1 is the host machine's host-only network ip

I guess I can make the host machine a node and have the vm be a hub, but does that mean I have to have all my tests on the vm or could I still run them from the host machine?

Joe

unread,
Jun 6, 2012, 3:14:51 PM6/6/12
to seleniu...@googlegroups.com
I tried running the hub and the node on the vm and the code still won't run.  Here is more info on the node machine just in case I did something wrong:
java version = 1.7.0_04
firefox version = 13.0
selenium server = 2.22.0

host
java version = 1.6.0_31
firefox version = 13.0
selenium server = 2.22.0

except for the OS and the java version, there isn't much difference.  

bsri

unread,
Jun 6, 2012, 5:04:28 PM6/6/12
to seleniu...@googlegroups.com
I have the same problem but did no change other than installing Firefox 13 (beta?) in haste. I have since downgraded to 12 but get the same error :( 
 

FirefoxProfile firefoxprofile =

new FirefoxProfile();

firefoxprofile.setAssumeUntrustedCertificateIssuer(

false);

webdriver = new FirefoxDriver(firefoxprofile);

webdriver.manage().window().maximize(); // does not work in Chrome!

Mike Riley

unread,
Jun 7, 2012, 12:01:36 PM6/7/12
to seleniu...@googlegroups.com
I can tell you that there is very little chance it can work with FF 13.  The 2.22.0 just added FF 12 support.  If you get on the cutting edge like that, you have to expect to bleed a little.

The way you are starting the node looks fine, and I don't think the version of Java or OS will matter, so my other concern would be firewall issues blocking it.

Mike

Joe

unread,
Jun 7, 2012, 1:28:21 PM6/7/12
to seleniu...@googlegroups.com
Thanks Mike!  Downgrading to FF12 did the trick.  It was weird that it was working on the Mac but not the Windows VM but it's all good now.

Joe

Mike Riley

unread,
Jun 7, 2012, 4:44:51 PM6/7/12
to seleniu...@googlegroups.com
And of course they just now released 2.23.0 which has FF 13 support in it!

Timing is everything...  ;)

Mike

sjakiepp

unread,
Jun 14, 2012, 9:07:25 AM6/14/12
to seleniu...@googlegroups.com
Hello Mike,

Unfortunately this problem still exists with Selenium 2.23 and FF13. I'm about to try to downgrade to FF12.

Greetings,
Sjakie

sjakiepp

unread,
Jun 14, 2012, 9:24:55 AM6/14/12
to seleniu...@googlegroups.com
After some investigation, Eclipse used Selenium 2.20. After I removed the jar everything worked fine!

Thanks for the valuable info!
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages