Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Running Selenium WebDriver fails on a machine with two IPs #4344

Closed
lukeis opened this issue Mar 3, 2016 · 5 comments
Closed

Running Selenium WebDriver fails on a machine with two IPs #4344

lukeis opened this issue Mar 3, 2016 · 5 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 4344

I'm using VS2010 unittests for running Selenium tests (for FF & Chrome). They work on
my machine. But they fail on my build server. Only difference I can see is the build
server has several IP addresses.

Here error:
OpenQA.Selenium.WebDriverException: Unexpected error. System.Net.WebException: Unable
to connect to the remote server ---> System.Net.Sockets.SocketException: No connection
could be made because the target machine actively refused it MY_SERVER_LOCAL_IP_HERE:7055
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress
socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket
s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult
asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
   at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.Execute(Command commandToExecute)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute,
Dictionary`2 parameters)


Selenium version: 2.25.1
OS: Windows Server 2008 R2
Browser: FF & Chrome

Reported by sergei@dorogin.com on 2012-07-31 09:58:02

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-08-02 19:05:17

  • Labels added: Component-WebDriver, Lang-CSharp

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I should clarify the issue. It only takes place with FirefoxDriver. 
Giver code:
IWebDriver driver = new FirefoxDriver();
on this line Firefox is started and code fails with error: 
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException:
No connection could be made because the target machine actively refused it 10.20.12.103:7055

Firefox is left opened. I checked its opened ports and can see it listened at 7055.
But host name is my machine NetBIOS name.
The machine have 2 IP addresses.

Unfortunately it's impossible to specify host name for the server it should listen
on. And it seems than driver and server (xpi) use different algorithms to choose an
IP address. 

Reported by sergei@dorogin.com on 2012-10-03 14:15:47

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

The same issue with IEDriver. Driver start server console and then fails with error:
OpenQA.Selenium.WebDriverException: No response from server for url http://localhost:28635/session

Server console leaves open and IE isn't started at all.

Reported by sergei@dorogin.com on 2012-10-03 15:50:35

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Fixed, see https://code.google.com/p/selenium/issues/detail?id=3280#c20

Reported by barancev on 2014-10-01 18:22:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:15:53

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant