giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
602 stars 271 forks source link

Scripts don't run when Selenium is running as Grid (hub & node) started through init.d scripts. #390

Closed ghost closed 5 years ago

ghost commented 7 years ago

As the title says.

When I run Selenium in a Grid setup ran manually (both hub and node started manually from an ssh session) my phpunit-selenium scripts run without a problem. However, when I start my hub and node through an init.d script, phpunit-selenium complains that the selenium server is not available.

Startup commands are identical, both in init.d script as well as when using manual ssh session terminal.

Selenium server version is: selenium-server-standalone-3.0.1.jar OS is Ubuntu Server 14.04 in a Vagrant VM phpunit-selenium is installed through Composer

I have tried starting up my hub and node in different fashions, the base command being the same, but all with the same result: java -jar /usr/local/bin/selenium-server-standalone-3.0.1.jar -role hub -host 192.168.xx.xxx -port 4444 -log {output.log} > /dev/null 2>&1 & echo $! > {pidfile}

I have tried to start it with nohup but that doesn't seem to make a difference either.

Both hub and node give the proper feedback, showing that everything is working. Processes are running with proper user and the right port is listened to (5555 for the node instance).

Works fine when ran manually in an ssh terminal, but doesn't work when ran as an init.d script. I'm honestly out of ideas on what the issue could be, so any help would be greatly appreciated.

thewunder commented 5 years ago

Probably because root does not have access to the X11 session