I have a process, using Selenium Web driver for Firefox, for automatic look up for information on one specific site. Due to the volume of the data being looked up, I am running in parallel several copies of this process. Sometimes they are ok, sometimes I get an exception, which I do not understand the cause for. The Process is written in C#, runs on Windows. Each process creates its own instance of Selenium, FF web driver, I see each process has a separate FireFox process. No multi-treading (inside one process). I do not understand what exactly is the issue. Could not find any documentation that could tell me more. If anyone has an idea, I'd appreciate any info/suggestions
The exception is:
"OpenQA.Selenium.WebDriverException: Unexpected error. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted 127.0.0.1:7056"
I can not see what can be trying to make more than one "usage" of the socket address in one given process. And from the logs I see that the different processes use different ports ( the "7056" above is a different number in each process).
Thank you in advace
I recently ran into this and found a pretty interesting article about fine tuning your network settings.
https://blogs.msdn.microsoft.com/dgorti/2005/09/18/only-one-usage-of-each-socket-address-protocolnetwork-addressport-is-normally-permitted/
so pretty much if you run a high degree of parallelism in your tests with not enough ports open and a high timeout you will run out of sockets and this will happen. either increase the ports, reduce the wait time and check what can be leaving your instances hanging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With