Problem starting firefox with xvfb-run (Selenium WebDriver)

I have a java application that uses Selenium Webdriver to enter a site, check specific texts and send an email if it finds them. I have a cron job that runs a jar file every morning and stops it every night.

It uses firefox, but works without heads, this is a command

xvfb-run --auto-servernum --server-num = 0 nohup / usr / bin / java -jar A.jar

When he tries to open Firefox, the following is called:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
 *** Item Installed via directory addition to Install Location: app-global Item ID: {972ce4c6-7e08-4474-a285-3208198ce6fd}, attempting to register...
 *** Item Installed/Upgraded at Install Location: app-global Item ID: {972ce4c6-7e08-4474-a285-3208198ce6fd}, attempting to register...
 *** Blocklist::_loadBlocklist: no XML File found
*** ... success, item is compatible
*** Item Installed via directory addition to Install Location: app-profile Item ID: fxdriver@googlecode.com, attempting to register...
*** Item Installed/Upgraded at Install Location: app-profile Item ID: fxdriver@googlecode.com, attempting to register...
*** ... success, item is compatible at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:106)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:179)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
    at auth.Authenticator.<init>(Authenticator.java:27)
    at reader.ReaderThread.run(ReaderThread.java:70)

It is strange that when I use x2go and the login in the debian field, the program works fine. I can see Firefox opening, logging in, and everything I need.

I am using version 2.31 with Firefox 14, and as I said, it works fine when I start a desktop session and log in.

, ? , 2.32 , , , , .

P.S eclipse Windows, .

+5
1

DISPLAY? , Firefox ( )

Xvfb :0 -ac -screen 0 1024x768x24 &
0

All Articles