Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16057

Problems with dual-stack IPv4 / IPv6 machines

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • port-allocator-plugin
    • 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));
      

            Unassigned Unassigned
            orrc Christopher Orr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: