Selenium standalone server does not start

I'm having problems starting a standalone selenium server on my VPS

root@PIV :/usr/share/nginx/pivdev/tests# java -jar selenium-server.jar 

Output:

 21:53:08.857 INFO - Launching a standalone Selenium Server 21:53:08.911 INFO - Java: Oracle Corporation 24.79-b02 21:53:08.914 INFO - OS: Linux 3.13.0-52-generic amd64 21:53:08.945 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314 21:53:09.070 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match the current platform LINUX 21:53:09.071 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, browserName=MicrosoftEdge, version=}] does not match the current platform LINUX 21:53:09.071 INFO - Driver class not found: com.opera.core.systems.OperaDriver 21:53:09.071 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 

After that, it is no longer displayed. Locally, the same team works like a charm. Any hint on how to solve this problem?

Java

 root@PIV :/usr/share/nginx/pivdev/tests# java -version java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) 

Update 1

The service does not work at all on any port

Netstat Output

 root@PIV :~# netstat -plnt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 898/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1247/sendmail: MTA: tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 974/mysqld tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 1247/sendmail: MTA: tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1005/nginx tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN 1005/nginx tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 496/vsftpd tcp6 0 0 :::22 :::* LISTEN 898/sshd tcp6 0 0 :::35484 :::* LISTEN 2036/java tcp6 0 0 :::50920 :::* LISTEN 2036/java tcp6 0 0 :::8080 :::* LISTEN 2036/java 

Update 2

Well, the main problem here is that the selenium server is stuck at startup, and I don't know why. I destroyed my VPS machine and started from scratch. The selenium server booted up once, after I stopped and started the problem again (and persists after reboot). Sometimes it does not work even on the first try.

I am not sure if this is a java problem or a problem with selenium server or a problem with a VPS host.

+5
source share
2 answers

Long story:

Selenium uses / dev / random (I donโ€™t know why, donโ€™t ask), and he expected enough entropy to generate a random number.

CORRECTION

Just add a parameter when starting selenium: -Djava.security.egd=file:///dev/urandom switch , and you're good to go

+14
source

When running on linux, it is better to start the selenium server with some of the features listed below:

 java -jar selenium-server.jar -Dwebdriver.chrome.bin=/path/to/google-chrome -Dwebdriver.chrome.driver=/path/to/chromedriver -browser browserName=chrome platform=LINUX -port 4444 

Also, not sure if your local system is Linux.

0
source

Source: https://habr.com/ru/post/1231980/


All Articles