-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b102
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8316471 | 8u401 | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.java uses static port, may fail with java.net.BindException: Address already in use
DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 4445);
...
socket = new DatagramSocket(4445);
----------System.err:(11/656)----------
setting DatagramSocketImplFactory...
Exception in thread "main" java.net.BindException: Address already in use
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:94)
at java.net.DatagramSocket.bind(DatagramSocket.java:394)
at java.net.DatagramSocket.<init>(DatagramSocket.java:244)
at java.net.DatagramSocket.<init>(DatagramSocket.java:301)
at java.net.DatagramSocket.<init>(DatagramSocket.java:273)
at QuoteServerThread.<init>(ADatagramSocket.java:77)
at QuoteServerThread.<init>(ADatagramSocket.java:72)
at ADatagramSocket.main(ADatagramSocket.java:44)
DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 4445);
...
socket = new DatagramSocket(4445);
----------System.err:(11/656)----------
setting DatagramSocketImplFactory...
Exception in thread "main" java.net.BindException: Address already in use
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:94)
at java.net.DatagramSocket.bind(DatagramSocket.java:394)
at java.net.DatagramSocket.<init>(DatagramSocket.java:244)
at java.net.DatagramSocket.<init>(DatagramSocket.java:301)
at java.net.DatagramSocket.<init>(DatagramSocket.java:273)
at QuoteServerThread.<init>(ADatagramSocket.java:77)
at QuoteServerThread.<init>(ADatagramSocket.java:72)
at ADatagramSocket.main(ADatagramSocket.java:44)
- backported by
-
JDK-8316471 java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.java may fail with address already in use
- Resolved