-
Bug
-
Resolution: Fixed
-
Major
-
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.