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

Hudson startup fails when (udp) port 33848 is in use.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      After upgrading to 1.339 Hudson startup fails when udp port 33848 is in use (e.g. because another Hudson instance is running). When this happens any Hudson page shows the following error:

      java.net.BindException: Address already in use
      	at java.net.PlainDatagramSocketImpl.bind0(Native Method)
      	at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
      	at java.net.DatagramSocket.bind(DatagramSocket.java:368)
      	at java.net.MulticastSocket.(MulticastSocket.java:147)
      	at java.net.MulticastSocket.(MulticastSocket.java:112)
      	at hudson.UDPBroadcastThread.(UDPBroadcastThread.java:58)
      	at hudson.model.Hudson.(Hudson.java:606)
      	at hudson.WebAppMain$2.run(WebAppMain.java:224)
      

      Before 1.339 the following warning was logged:

      WARNING: Failed to listen to UDP port 33848
      java.net.BindException: Address already in use
              at java.net.PlainDatagramSocketImpl.bind0(Native Method)
              at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
              at java.net.DatagramSocket.bind(DatagramSocket.java:368)
              at java.net.MulticastSocket.<init>(MulticastSocket.java:147)
              at java.net.MulticastSocket.<init>(MulticastSocket.java:112)
              at hudson.UDPBroadcastThread.run(UDPBroadcastThread.java:61)
      

      As a workaround I've set -Dhudson.udp=33849 which avoids this issue altogether.

            Unassigned Unassigned
            avee0 avee0
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: