Issue Type: Bug Bug
Assignee: Christopher Orr
Components: port-allocator
Created: 06/Dec/12 12:16 PM
Description:

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));
Environment: Mac OS X 10.8.2 master, no slaves
Project: Jenkins
Priority: Minor Minor
Reporter: Christopher Orr
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to