question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛 Bug]: Unable to find a free port starting selenium server 4.5.2 on linux

See original GitHub issue

What happened?

Caused by: java.lang.RuntimeException: Unable to find a free port at org.openqa.selenium.net.PortProber.findFreePort(PortProber.java:64) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:433) at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:128) at org.openqa.selenium.chrome.ChromeDriverInfo.isAvailable(ChromeDriverInfo.java:67) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) at org.openqa.selenium.grid.node.config.NodeOptions.discoverDrivers(NodeOptions.java:509) at org.openqa.selenium.grid.node.config.NodeOptions.getSessionFactories(NodeOptions.java:205) at org.openqa.selenium.grid.node.local.LocalNodeFactory.create(LocalNodeFactory.java:80) … 22 more

How can we reproduce the issue?

Launch selenium server on linux

Relevant log output

.

Operating System

Linux

Selenium version

4.5.2

What are the browser(s) and version(s) where you see this issue?

Chrome

What are the browser driver(s) and version(s) where you see this issue?

chromedriver v106

Are you using Selenium Grid?

4.5.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
diemolcommented, Oct 24, 2022

OK, let me revert that change and avoid checks for Linux .

1reaction
IdosApplitoolscommented, Oct 24, 2022

I encountered the same issue when running in Travis CI with docker service. At first I upgraded to 4.5.0 and everything was working okay then since about Friday I started seeing the Unable to find a free port exception. I then tried both 4.3.0 and 4.5.2 but saw the same issue.

I was able to work around this issue by adding the environment variable SE_DOCKER as true to my CI and running with version 4.5.2 which is expecting that env var in this commit. After that everything started working as before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there any way to solve "java.lang.RuntimeException
This error message. ... RuntimeException: Unable to find a free port ... 4,000 ephemeral ports that run concurrently on Windows Server 2003 ...
Read more >
Unable to find free port - Archive - Katalon Community
I downloaded Katalon studio and tried to get it working. ... click record with chrome or firefox, I get an error unable to...
Read more >
What's New - Oracle Linux Yum Server
Oracle Linux with Oracle enterprise-class support is the best Linux operating system (OS) for your enterprise computing needs.
Read more >
selenium-base - PyPI
A complete web automation framework for end-to-end testing.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild ... "emerge gettext-0.12.1-r2 fails with sandbox because of weird filesystem setup" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found