Selenium html runner 3 : problems with geckodriver

1,325 views
Skip to first unread message

yassine zirri

unread,
Oct 22, 2016, 9:23:25 AM10/22/16
to Selenium Users
I am using Selenium IDE to record some tests. And I want to use Selenium html runner to run Selenium tests, but I got problems when I started use command line :

$ java -jar selenium-html-runner-3.0.1.jar -htmlSuite "*firefox" "http://localhost:8002/" "Test.html" "TestResults.html"

Below is what I got :

Multi-window mode is longer used as an option and will be ignored.
Usage:
    C:\Users\\Desktop\Selenium\geckodriver.exe [OPTIONS]
C:\Users\\Desktop\Selenium\geckodriver.exe: Unknown option --port=32754
Oct 21, 2016 10:50:43 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Oct 21, 2016 10:50:46 AM org.openqa.selenium.server.htmlrunner.HTMLLauncher mainInt
WARNING: Test of browser failed: *firefox
org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:32754 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:44 -0700'
System info:...
Driver info: driver.version: FirefoxDriver
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.createDriver(HTMLLauncher.java:285)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:107)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.mainInt(HTMLLauncher.java:245)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.main(HTMLLauncher.java:273)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:32754 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
        at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142)
        at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88)
        at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:108)
        at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
        ... 11 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
        ... 26 more


Simon Stewart

unread,
Oct 24, 2016, 8:21:01 AM10/24/16
to seleniu...@googlegroups.com
You don't mention which version of Firefox you're using, but it's likely a modern one. I'd suggest you need to also download the geckodriver from Mozilla and put that on your PATH.

Kind regards,

Simon

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b8c8af99-b3f4-421e-87de-8fd2f6d68044%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yassine zirri

unread,
Oct 24, 2016, 3:20:29 PM10/24/16
to Selenium Users
Thank you for your response.
I'm using Firefox 48 version.
I also tried with other browser Chrome (+chromedriver)  but I got problems also :

java.io.IOException: java.lang.RuntimeException: java.net.BindException: Address already in use: JVM_Bind
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.determineSuiteUrl(HTMLLauncher.java:180)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:108)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.mainInt(HTMLLauncher.java:245)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.main(HTMLLauncher.java:273)
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: JVM_Bind
        at org.openqa.selenium.net.PortProber.pollPort(PortProber.java:154)
        at org.openqa.selenium.net.PortProber.pollPort(PortProber.java:137)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.determineSuiteUrl(HTMLLauncher.java:174)
        ... 3 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
        at java.net.DualStackPlainSocketImpl.bind0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
        at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
        at java.net.PlainSocketImpl.bind(Unknown Source)
        at java.net.Socket.bind(Unknown Source)
        at org.openqa.selenium.net.PortProber.pollPort(PortProber.java:146)
        ... 5 more
 
 

⇜Krishnan Mahadevan⇝

unread,
Oct 24, 2016, 11:27:01 PM10/24/16
to Selenium Users
Address already in use: JVM_bind is basically Java's way of telling you that something else is ALREADY listening on the port on which you are trying to use. So you would need to first kill whatever is already using the port that you need, or choose a different port.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

yassine zirri

unread,
Oct 25, 2016, 2:53:19 AM10/25/16
to Selenium Users

According to my netstat, i got around 3 connections in TIME_WAIT state :

TCP    127.0.0.1:49218        127.0.0.1:7056         TIME_WAIT       0
TCP    127.0.0.1:49219        127.0.0.1:7056         TIME_WAIT       0
TCP    127.0.0.1:49220        127.0.0.1:7056         TIME_WAIT       0

I think that Selenium launch multiple connection at the same time (which explains the exception) !!!
How I can specify the port for chromedriver with the command line : java -jar selenium-html-runner-3.0.1.jar -htmlSuite ...  

forX

unread,
Dec 14, 2016, 10:55:20 AM12/14/16
to Selenium Users

Do you found a way to work around the JVM_Bind problem?
Reply all
Reply to author
Forward
0 new messages