-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Mac OS X 10.8.2 master, no slaves
The plugin was checking whether a named port was free on the build machine, but even when the port was already in use by some daemon, the plugin wrongly reported that the port was available.
The reason appeared to be that our daemon was listening on an IPv4 socket, but the ServerSocket created on the same port by Jenkins defaulted to IPv6, which apparently succeeded.
Switching Jenkins to IPv4 (via java.net.preferIPv4Stack=true) solved the problem.
But it would be nice if Jenkins could handle this situation automatically.
Maybe something like this? I need to investigate when I get time:
server = new ServerSocket(); server.bind(new InetSocketAddress(InetAddress.getByName("::"), port));