Linux Selenium 2.45和Firefox 35.0.1仅在生产环境下不工作

Linux Selenium 2.45和Firefox 35.0.1仅在生产环境下不工作,linux,selenium,centos6,xvfb,Linux,Selenium,Centos6,Xvfb,我正在使用Selenium 2.45和Firefox 35.0.1无头浏览器。在开发和测试环境中一切正常,但在生产环境中,我遇到了错误 Driver info: driver.version: FirefoxDriver org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows:

我正在使用Selenium 2.45和Firefox 35.0.1无头浏览器。在开发和测试环境中一切正常,但在生产环境中,我遇到了错误

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'
生产环境: 1) 下载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) 软链接到/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中,我由sudo用户运行


更新:错误信息消失了,没有任何改变,Duh。现在,它只是没有创建firefox驱动程序

一切都很好。生产过程中缺少1个包-“dbus”。安装和配置包后,一切正常

[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
[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 ~]#