java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(java.base@9-ea/Native Method) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:437) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376)

JDK Bug System | Artem Smotrakov | 4 months ago
  1. 0

    javax/net/ssl/Stapling/SSLSocketWithStapling.java may fails with the following output: ----------System.out:(38/1637)---------- ======================================= Stapling enabled, default configuration ======================================= PASS ======================================= ===================================== Stapling enabled, PKIXParameters with Revocation checking enabled ===================================== PASS ===================================== ======================================= Stapling enabled, default configuration ======================================= PASS ======================================= ======================================= Stapling enbled in client and server, but OCSP responders disabled. PKIXParameters with Revocation checking enabled. ======================================= PASS ======================================= [pool-17-thread-1]: Exception: java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(java.base@9-ea/Native Method) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:437) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376) at sun.security.testlibrary.SimpleOCSPServer$2.run(SimpleOCSPServer.java:217) at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-ea/Executors.java:514) at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1158) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:632) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) ----------System.err:(16/953)---------- Server died... Server died... java.lang.RuntimeException: Server not ready yet at SSLSocketWithStapling.testHardFailFallback(SSLSocketWithStapling.java:327) at SSLSocketWithStapling.main(SSLSocketWithStapling.java:128) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

    JDK Bug System | 4 months ago | Artem Smotrakov
    java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(java.base@9-ea/Native Method) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:437) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376)
  2. 0

    closed/java/net/Socket/ExclusiveBindWindowsTest.java Observed this test once failed in JDK9 build 115 same binaries run: ----------System.out:(2/125)---------- Testing addresses:/127.0.0.1 and /0:0:0:0:0:0:0:1 Testing addresses:/10.128.70.73 and /fe80:0:0:0:6016:5ff8:49f0:8be0%eth5 ----------System.err:(20/1421)---------- java.net.BindException: Cannot assign requested address: NET_Bind at java.net.DualStackPlainSocketImpl.bind0(java.base@9-ea/Native Method) at java.net.DualStackPlainSocketImpl.socketBind(java.base@9-ea/DualStackPlainSocketImpl.java:106) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:442) at java.net.PlainSocketImpl.bind(java.base@9-ea/PlainSocketImpl.java:174) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376) at java.net.ServerSocket.<init>(java.base@9-ea/ServerSocket.java:238) at ExclusiveBindWindowsTest.testRestartServerSocket(ExclusiveBindWindowsTest.java:93) at ExclusiveBindWindowsTest.test(ExclusiveBindWindowsTest.java:48) at ExclusiveBindWindowsTest.main(ExclusiveBindWindowsTest.java:28) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531) at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226) at java.lang.Thread.run(java.base@9-ea/Thread.java:804)

    JDK Bug System | 7 months ago | Amy Lu
    java.net.BindException: Cannot assign requested address: NET_Bind at java.net.DualStackPlainSocketImpl.bind0(java.base@9-ea/Native Method) at java.net.DualStackPlainSocketImpl.socketBind(java.base@9-ea/DualStackPlainSocketImpl.java:106) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:442) at java.net.PlainSocketImpl.bind(java.base@9-ea/PlainSocketImpl.java:174) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376) at java.net.ServerSocket.<init>(java.base@9-ea/ServerSocket.java:238)
  3. 0

    java/net/Authenticator/B4933582.sh fails intermittently with BindException: #section:shell ----------messages:(3/123)---------- command: shell B4933582.sh reason: Assumed action based on file name: run shell B4933582.sh elapsed time (seconds): 3.084 ----------System.out:(27/1612)---------- Server: listening on port: 62753 client opening connection to: http://localhost:62753/d1/foo.html SERVER: new connection. chan[java.nio.channels.SocketChannel[connected local=/127.0.0.1:62753 remote=/127.0.0.1:64937]] get: s:http:localhost:62753 /d1/foo.html ---> null SERVER: connection readable. chan[java.nio.channels.SocketChannel[connected local=/127.0.0.1:62753 remote=/127.0.0.1:64937]] SERVER: orderlyCloseChannel chan[java.nio.channels.SocketChannel[connected local=/127.0.0.1:62753 remote=/127.0.0.1:64937]] get: s:BASIC:http:localhost:62753:wallyworld null ---> null SERVER: connection readable. chan[java.nio.channels.SocketChannel[connected oshut local=/127.0.0.1:62753 remote=/127.0.0.1:64937]] Server: comsume SERVER: new connection. chan[java.nio.channels.SocketChannel[connected local=/127.0.0.1:62753 remote=/127.0.0.1:64938]] SERVER: connection readable. chan[java.nio.channels.SocketChannel[connected local=/127.0.0.1:62753 remote=/127.0.0.1:64938]] SERVER: orderlyCloseChannel chan[java.nio.channels.SocketChannel[connected local=/127.0.0.1:62753 remote=/127.0.0.1:64938]] remove: s:BASIC:http:localhost:62753:wallyworld sun.net.www.protocol.http.BasicAuthentication@2b9627bc wrote port 62753 remove: s:http:localhost:62753 sun.net.www.protocol.http.BasicAuthentication@2b9627bc wrote port 62753 put: s:BASIC:http:localhost:62753:wallyworld sun.net.www.protocol.http.BasicAuthentication@627551fb wrote port 62753 put: s:http:localhost:62753 sun.net.www.protocol.http.BasicAuthentication@627551fb wrote port 62753 reading Hello . finished reading read port from file -1 setMap from cache.ser ----------System.err:(69/5949)---------- /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:28: warning: MessageHeader is internal proprietary API and may be removed in a future release import sun.net.www.MessageHeader; ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/TestHttpServer.java:28: warning: MessageHeader is internal proprietary API and may be removed in a future release import sun.net.www.MessageHeader; ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/B4933582.java:137: warning: AuthCacheValue is internal proprietary API and may be removed in a future release AuthCacheValue.setAuthCache (cache); ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/B4933582.java:180: warning: AuthCacheImpl is internal proprietary API and may be removed in a future release static class CacheImpl extends AuthCacheImpl { ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/B4933582.java:232: warning: AuthCacheValue is internal proprietary API and may be removed in a future release public void put (String pkey, AuthCacheValue value) { ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/B4933582.java:238: warning: AuthCacheValue is internal proprietary API and may be removed in a future release public AuthCacheValue get (String pkey, String skey) { ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/B4933582.java:240: warning: AuthCacheValue is internal proprietary API and may be removed in a future release AuthCacheValue i = super.get (pkey, skey); ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/B4933582.java:245: warning: AuthCacheValue is internal proprietary API and may be removed in a future release public void remove (String pkey, AuthCacheValue value) { ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:41: warning: MessageHeader is internal proprietary API and may be removed in a future release MessageHeader reqheaders, reqtrailers; ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:41: warning: MessageHeader is internal proprietary API and may be removed in a future release MessageHeader reqheaders, reqtrailers; ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:44: warning: MessageHeader is internal proprietary API and may be removed in a future release MessageHeader rspheaders, rsptrailers; ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:44: warning: MessageHeader is internal proprietary API and may be removed in a future release MessageHeader rspheaders, rsptrailers; ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:50: warning: MessageHeader is internal proprietary API and may be removed in a future release URI requesturi, MessageHeader headers, ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:51: warning: MessageHeader is internal proprietary API and may be removed in a future release String body, MessageHeader trailers, SelectionKey key) { ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:129: warning: MessageHeader is internal proprietary API and may be removed in a future release rspheaders = new MessageHeader (); ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:141: warning: MessageHeader is internal proprietary API and may be removed in a future release rspheaders = new MessageHeader (); ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/HttpTransaction.java:153: warning: MessageHeader is internal proprietary API and may be removed in a future release rsptrailers = new MessageHeader (); ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/TestHttpServer.java:255: warning: MessageHeader is internal proprietary API and may be removed in a future release MessageHeader mhead = new MessageHeader (is); ^ /scratch/jenkins/workspace/9-dev/jdk/test/java/net/Authenticator/../../../sun/net/www/httptest/TestHttpServer.java:255: warning: MessageHeader is internal proprietary API and may be removed in a future release MessageHeader mhead = new MessageHeader (is); ^ Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 19 warnings Exception in thread "main" java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(java.base@9-ea/Native Method) at sun.nio.ch.Net.bind(java.base@9-ea/Net.java:433) at sun.nio.ch.Net.bind(java.base@9-ea/Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(java.base@9-ea/ServerSocketChannelImpl.java:225) at sun.nio.ch.ServerSocketAdaptor.bind(java.base@9-ea/ServerSocketAdaptor.java:74) at sun.nio.ch.ServerSocketAdaptor.bind(java.base@9-ea/ServerSocketAdaptor.java:67) at TestHttpServer.<init>(TestHttpServer.java:108) at B4933582.main(B4933582.java:135)

    JDK Bug System | 4 months ago | Amy Lu
    java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(java.base@9-ea/Native Method) at sun.nio.ch.Net.bind(java.base@9-ea/Net.java:433) at sun.nio.ch.Net.bind(java.base@9-ea/Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(java.base@9-ea/ServerSocketChannelImpl.java:225) at sun.nio.ch.ServerSocketAdaptor.bind(java.base@9-ea/ServerSocketAdaptor.java:74) at sun.nio.ch.ServerSocketAdaptor.bind(java.base@9-ea/ServerSocketAdaptor.java:67)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java failed in Mach5 with following error message: java.rmi.server.ExportException: Port already in use: 64684; nested exception is: java.net.BindException: Address already in use at sun.rmi.transport.tcp.TCPTransport.listen(java.rmi@9-ea/TCPTransport.java:336) at sun.rmi.transport.tcp.TCPTransport.exportObject(java.rmi@9-ea/TCPTransport.java:244) at sun.rmi.transport.tcp.TCPEndpoint.exportObject(java.rmi@9-ea/TCPEndpoint.java:411) at sun.rmi.transport.LiveRef.exportObject(java.rmi@9-ea/LiveRef.java:147) at sun.rmi.server.UnicastServerRef.exportObject(java.rmi@9-ea/UnicastServerRef.java:206) at sun.rmi.registry.RegistryImpl.setup(java.rmi@9-ea/RegistryImpl.java:157) at sun.rmi.registry.RegistryImpl.<init>(java.rmi@9-ea/RegistryImpl.java:142) at java.rmi.registry.LocateRegistry.createRegistry(java.rmi@9-ea/LocateRegistry.java:203) at TestLibrary.createRegistryOnUnusedPort(TestLibrary.java:412) at ContextWithNullProperties.main(ContextWithNullProperties.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531) at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226) at java.lang.Thread.run(java.base@9-ea/Thread.java:804) Caused by: java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(java.base@9-ea/Native Method) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:442) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376) at java.net.ServerSocket.<init>(java.base@9-ea/ServerSocket.java:238) at java.net.ServerSocket.<init>(java.base@9-ea/ServerSocket.java:130) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(java.rmi@9-ea/RMIDirectSocketFactory.java:45) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(java.rmi@9-ea/RMIMasterSocketFactory.java:341) at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(java.rmi@9-ea/TCPEndpoint.java:666) at sun.rmi.transport.tcp.TCPTransport.listen(java.rmi@9-ea/TCPTransport.java:325) ... 15 more JavaTest Message: Test threw exception: java.rmi.server.ExportException JavaTest Message: shutting down test

    JDK Bug System | 8 months ago | Amanda Jiang
    java.net.BindException: Address already in use at sun.rmi.transport.tcp.TCPTransport.listen(java.rmi@9-ea/TCPTransport.java:336) at sun.rmi.transport.tcp.TCPTransport.exportObject(java.rmi@9-ea/TCPTransport.java:244) at sun.rmi.transport.tcp.TCPEndpoint.exportObject(java.rmi@9-ea/TCPEndpoint.java:411) at sun.rmi.transport.LiveRef.exportObject(java.rmi@9-ea/LiveRef.java:147) at sun.rmi.server.UnicastServerRef.exportObject(java.rmi@9-ea/UnicastServerRef.java:206) at sun.rmi.registry.RegistryImpl.setup(java.rmi@9-ea/RegistryImpl.java:157) at sun.rmi.registry.RegistryImpl.<init>(java.rmi@9-ea/RegistryImpl.java:142) at java.rmi.registry.LocateRegistry.createRegistry(java.rmi@9-ea/LocateRegistry.java:203)
  6. 0

    This has been observed once on Mac OS x. It is intermittent java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(java.base@9-internal/Native Method) at sun.nio.ch.Net.bind(java.base@9-internal/Net.java:433) at sun.nio.ch.Net.bind(java.base@9-internal/Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(java.base@9-internal/ServerSocketChannelImpl.java:225) at sun.nio.ch.ServerSocketAdaptor.bind(java.base@9-internal/ServerSocketAdaptor.java:74) at sun.net.httpserver.ServerImpl.<init>(jdk.httpserver@9-internal/ServerImpl.java:101) at sun.net.httpserver.HttpServerImpl.<init>(jdk.httpserver@9-internal/HttpServerImpl.java:50) at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(jdk.httpserver@9-internal/DefaultHttpServerProvider.java:35) at com.sun.net.httpserver.HttpServer.create(jdk.httpserver@9-internal/HttpServer.java:129) at SimpleHttpServerTest.main(SimpleHttpServerTest.java:52) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:535) at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226) at java.lang.Thread.run(java.base@9-internal/Thread.java:843)

    JDK Bug System | 4 months ago | Felix Yang
    java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(java.base@9-internal/Native Method) at sun.nio.ch.Net.bind(java.base@9-internal/Net.java:433) at sun.nio.ch.Net.bind(java.base@9-internal/Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(java.base@9-internal/ServerSocketChannelImpl.java:225) at sun.nio.ch.ServerSocketAdaptor.bind(java.base@9-internal/ServerSocketAdaptor.java:74) at sun.net.httpserver.ServerImpl.<init>(jdk.httpserver@9-internal/ServerImpl.java:101) at sun.net.httpserver.HttpServerImpl.<init>(jdk.httpserver@9-internal/HttpServerImpl.java:50) at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(jdk.httpserver@9-internal/DefaultHttpServerProvider.java:35) at com.sun.net.httpserver.HttpServer.create(jdk.httpserver@9-internal/HttpServer.java:129)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.BindException

      Address already in use at java.net.PlainSocketImpl.socketBind(java.base@9-ea/Native Method) at java.net.AbstractPlainSocketImpl.bind(java.base@9-ea/AbstractPlainSocketImpl.java:437) at java.net.ServerSocket.bind(java.base@9-ea/ServerSocket.java:376)

      at sun.security.testlibrary.SimpleOCSPServer$2.run()
    2. sun.security.testlibrary
      SimpleOCSPServer$2.run
      1. sun.security.testlibrary.SimpleOCSPServer$2.run(SimpleOCSPServer.java:217)
      1 frame