Entropy and selenium server standalone

selenium
java
2.0

#1

Sometimes but not always, since yesterday, selenium server stopped working.

java -jar ./node_modules/protractor/selenium/selenium-server-standalone-2.52.0.jar -Dwebdriver.chrome.driver=./node_modules/protractor/selenium/chromedriver_2.27 -host 127.0.0.1 -port 4444
11:43:25.710 INFO - Launching a standalone Selenium Server                                                                                                                                       
Setting system property webdriver.chrome.driver to ./node_modules/protractor/selenium/chromedriver_2.27                                  
11:43:25.739 INFO - Java: Oracle Corporation 25.102-b14                                                                                  11:43:25.739 INFO - OS: Linux 4.4.0-53-generic amd64                                                                                     
11:43:25.748 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c                                                              
11:43:25.802 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:                               
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not ma
tch the current platform LINUX                                                                                                           
11:43:25.803 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:                                         
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX                                                                                                                                        
11:43:25.803 INFO - Driver class not found: com.opera.core.systems.OperaDriver                                                           
11:43:25.803 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered                                                 
11:43:25.804 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:                                     
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX   

And it remains stuck and won’t start.
This worked before and sometimes still working.
Any ideas?

The code and the versions of dependencies are the same in every build.
I’m using circleci2.

I’ve tried to change the port, selenium version, and web driver version but I got the same result.


#2

CircleCI 1 works fine :no_mouth: but I don’t want to downgrade to v1


#4

I’ve made a thread dump of selenium and that popped out of me

java.lang.Thread.State: RUNNABLE
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:255)
        at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:539)
        at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:144)
        at sun.security.provider.SecureRandom$SeederHolder.<clinit>(SecureRandom.java:203)
        at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:221)

Seems that in the machine there is not much entropy and selenium is waiting for entropy to generate a seed!
I have resolved using -Djava.security.egd=file:/dev/urandom.
Another possible solution is to install haveged package from the repositories to increase entropy.


#5

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.