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)

JDK Bug System | Felix Yang | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 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 | 7 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)

    Root Cause Analysis

    1. 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()
    2. Unknown
      SimpleHttpServerTest.main
      1. SimpleHttpServerTest.main(SimpleHttpServerTest.java:52)
      1 frame