I'm running an app that depends on selenium on FreeBSD server. During the startup I've got the exception:
Caused by: java.lang.RuntimeException: Unable to find a free port
at org.openqa.selenium.net.PortProber.findFreePort(PortProber.java:67) ~[selenium-remote-driver-2.53.1.jar:na]
I've found some solutions on the internet that the entries which contains 'localhost' should be removed from the hosts file, but I don't have a permission to do that.
Do you know how to fix the problem without modifying /etc/hosts file?