Selenium 2.45 with Firefox 35.0.1 not working in production only

I am using Selenium 2.45 with Firefox 35.0.1 headless browser. Things are fine in dev and test environment, but in production, I am getting error.

Driver info: driver.version: FirefoxDriver
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
Xlib:  extension "RANDR" missing on display ":1".
process 20275: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace
Xlib:  extension "RANDR" missing on display ":1".
process 20300: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace

Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'prod', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-431.1.2.0.1.el6.x86_64', java.version: '1.7.0_65'
Production Environment:

1) Downloaded firefox-35.0.1

[prod@prod ~]$ ls /usr/local/
bin  etc  firefox   firefox-35.0.1.tar.bz2  games  include  lib  lib64  libexec  sbin  share  src

2) soft linked to /usr/bin/firefox

[prod@prod ~]$ ll /usr/bin/firefox 
lrwxrwxrwx 1 root root 26 Jun 11 15:59 /usr/bin/firefox -> /usr/local/firefox/firefox
[prod@prod ~]$ 

3) Ran Xvfb

[prod@prod ~]$ ps ax |grep Xvfb
15425 ?        S      0:00 sudo Xvfb +extension RANDR :1 -screen 0 1024x768x24
15426 ?        S      0:00 Xvfb +extension RANDR :1 -screen 0 1024x768x24
23102 pts/6    S+     0:00 grep Xvfb
Test Environment:
[root@vc-stage ~]# ll /usr/bin/firefox 
lrwxrwxrwx 1 root root 26 May 24 21:32 /usr/bin/firefox -> /usr/local/firefox/firefox
[root@stage ~]# 
[root@stage ~]# ls /usr/local/
bin  etc  firefox  firefox-35.0.1.tar.bz2  games  include  lib  lib64  libexec  sbin  share  src
[root@stage ~]# 
[root@stage ~]# ps ax | grep Xvfb
 3899 pts/5    S+     0:00 grep Xvfb
27393 ?        S      0:01 Xvfb +extension RANDR :1 -screen 0 1024x768x24
[root@stage ~]# 

The only difference between test and prod is; in test I am running everything from a root user. In prod, I am running by a sudo user.

Update: The error message is gone without any changes whatsoever, Duh. Now, it is simply not creating the firefox Driver.

Answers


Everything was all right. 1 package was missing in production- "dbus". After installing and configuring the package, everything worked fine.


Need Your Help

Escape property in pom.xml

java maven-2 launch4j

I would like to escape a property in pom.xml. Not in ressources, I know it is possible with a filter. For example I try to use launch4j plugin like this :

How to access values on leiningen profiles?

clojure leiningen

I've got a two profiles defined in project.clj, one locally, one for testing on travis: