groupon / Selenium-Grid-Extras

Simplify the management of the Selenium Grid Nodes and stabilize said nodes by cleaning up the test environment after the build has been completed
BSD 3-Clause "New" or "Revised" License
537 stars 210 forks source link

Installation fails : Refused to connect #347

Open avergos29 opened 7 years ago

avergos29 commented 7 years ago

When installing grid extra 1.12.12, i have this error after the step "Would you like WebDriver, IEDriver, ChromeDriver and GeckoDriver to auto update (1-yes/0-no)" The error happens with both answers. It works with version .10 but i have same issue with .11.

Any Idea ?

We noticed this is a first time running, we will ask some configuration settings

What is the default Role of this computer? (1 - node | 2 - hub | 3 - hub & node)
Default Value: 1
3
'3' was set as your value

What is the PORT for Selenium Grid Extras?
Default Value: 3000

'3000' was set as your value

What is the HOST for the Selenium Grid Hub?
Default Value: 127.0.0.1

'127.0.0.1' was set as your value

What is the PORT for the Selenium Grid Hub?
Default Value: 4444

'4444' was set as your value

What is the PORT for the Selenium Grid Node?
Default Value: 5555

'5555' was set as your value
What is node Platform? (WINDOWS|XP|VISTA|WIN8|WIN8_1|WIN10|MAC|LINUX|UNIX|ANDROID)

Default Value: WIN10

'WIN10' was set as your value

Will this node run 'Firefox' (1-yes/0-no)
Default Value: 0
1
'1' was set as your value

What version of 'Firefox' is installed?
Default Value: 54

'54' was set as your value

Will this node run 'InternetExplorer' (1-yes/0-no)
Default Value: 0
1
'1' was set as your value

What version of 'InternetExplorer' is installed?
Default Value: 11

'11' was set as your value

Will this node run 'Edge' (1-yes/0-no)
Default Value: 0
1
'1' was set as your value

What version of 'Edge' is installed?
Default Value:

'' was set as your value

Will this node run 'Chrome' (1-yes/0-no)
Default Value: 0
1
'1' was set as your value

What version of 'Chrome' is installed?
Default Value: 59

'59' was set as your value

Will this node run 'Safari' (1-yes/0-no)
Default Value: 0

'0' was set as your value

Will this node run 'PhantomJs' (1-yes/0-no)
Default Value: 0

'0' was set as your value

Would you like this Node to auto update browser versions? (1-yes/0-no)
Default Value: 1
0
'0' was set as your value

Maximum days to keep log file
Default Value: 10

'10' was set as your value

Would you like this user to automatically log in after restart (1-yes/0-no)
Default Value: 1

'1' was set as your value

WARNING: Setting default username requires elevated privileges. Make sure that this script was started with 'Run as Administrator' option.
It is safe to kill this process and restart setup with Administrative privileges

Username DOMAIN (If not using ActiveDirectory leave blank to use current computer)
Default Value: GUI-WIN-1

'GUI-WIN-1' was set as your value

Username to auto logon with
Default Value: ciadmin

'ciadmin' was set as your value

Enter user password

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Setting default logon user failed. Is the script running with elevated privileges?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Would you like WebDriver, IEDriver, ChromeDriver and GeckoDriver to auto update (1-yes/0-no)
Default Value: 1
0
'0' was set as your value
org.dom4j.DocumentException: Connection refused: connect Nested exception: Connection refused: connect
        at org.dom4j.io.SAXReader.read(SAXReader.java:484)
        at org.dom4j.io.SAXReader.read(SAXReader.java:291)
        at com.groupon.seleniumgridextras.downloader.webdriverreleasemanager.WebDriverReleaseManager.<init>(WebDriverReleaseManager.java:58)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.loadWebDriverReleaseManager(RuntimeConfig.java:90)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.getReleaseManager(RuntimeConfig.java:77)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.setDriverAutoUpdater(FirstTimeRunConfig.java:268)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.customiseConfig(FirstTimeRunConfig.java:96)
        at com.groupon.seleniumgridextras.config.Config.initilizedFromUserInput(Config.java:250)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.load(RuntimeConfig.java:139)
        at com.groupon.seleniumgridextras.SeleniumGridExtras.main(SeleniumGridExtras.java:70)
Nested exception:
java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:805)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at org.dom4j.io.SAXReader.read(SAXReader.java:465)
        at org.dom4j.io.SAXReader.read(SAXReader.java:291)
        at com.groupon.seleniumgridextras.downloader.webdriverreleasemanager.WebDriverReleaseManager.<init>(WebDriverReleaseManager.java:58)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.loadWebDriverReleaseManager(RuntimeConfig.java:90)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.getReleaseManager(RuntimeConfig.java:77)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.setDriverAutoUpdater(FirstTimeRunConfig.java:268)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.customiseConfig(FirstTimeRunConfig.java:96)
        at com.groupon.seleniumgridextras.config.Config.initilizedFromUserInput(Config.java:250)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.load(RuntimeConfig.java:139)
        at com.groupon.seleniumgridextras.SeleniumGridExtras.main(SeleniumGridExtras.java:70)
Nested exception: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:805)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at org.dom4j.io.SAXReader.read(SAXReader.java:465)
        at org.dom4j.io.SAXReader.read(SAXReader.java:291)
        at com.groupon.seleniumgridextras.downloader.webdriverreleasemanager.WebDriverReleaseManager.<init>(WebDriverReleaseManager.java:58)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.loadWebDriverReleaseManager(RuntimeConfig.java:90)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.getReleaseManager(RuntimeConfig.java:77)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.setDriverAutoUpdater(FirstTimeRunConfig.java:268)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.customiseConfig(FirstTimeRunConfig.java:96)
        at com.groupon.seleniumgridextras.config.Config.initilizedFromUserInput(Config.java:250)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.load(RuntimeConfig.java:139)
        at com.groupon.seleniumgridextras.SeleniumGridExtras.main(SeleniumGridExtras.java:70)
Exception in thread "main" java.lang.NullPointerException
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.setDriverAutoUpdater(FirstTimeRunConfig.java:269)
        at com.groupon.seleniumgridextras.config.FirstTimeRunConfig.customiseConfig(FirstTimeRunConfig.java:96)
        at com.groupon.seleniumgridextras.config.Config.initilizedFromUserInput(Config.java:250)
        at com.groupon.seleniumgridextras.config.RuntimeConfig.load(RuntimeConfig.java:139)
        at com.groupon.seleniumgridextras.SeleniumGridExtras.main(SeleniumGridExtras.java:70)
smccarthy commented 7 years ago

@avergos29 Is there some networking issue on your side ? From the message : org.dom4j.DocumentException: Connection refused: connect Nested exception: Connection refused: connect

It seems like it is trying to access one of the drivers download links (which uses https I think).

Amber2008 commented 7 years ago

I hit the same problem, no networking issue on my side:(

Amber2008 commented 7 years ago

Here is my workaround:

Step 1

Open the link https://chromedriver.storage.googleapis.com by chrome, and then press F12 to open the developer tools, Click the Security -> View certificate -> Details -> Copy to File to download the X.509 cer file

Step 2

Open the developer tools as the step 1, Click the Security -> View certificate -> Certification Path to download each path's X.509 cer file

Step 3

Repeat the step1 and step2 based on the RUL https://api.github.com/repos/mozilla/geckodriver/releases to download all the X.509 cer files

Step 4

Run following command against each cer file:

\bin\keytool.exe -importcert -trustcacerts -keystore -alias -file # Step 5 Run the command Java -Djavax.net.ssl.trustStore= -jar SeleniumGridExtras-1.12.15-SNAPSHOT-jar-with-dependencies.jar