java.net.BindException: Address already in use

Stack Overflow | Tommy Riska | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

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 sun.nio.ch.Net.bind0()
  2. Java RT
    ServerSocketAdaptor.bind
    1. sun.nio.ch.Net.bind0(Native Method)
    2. sun.nio.ch.Net.bind(Net.java:433)
    3. sun.nio.ch.Net.bind(Net.java:425)
    4. sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    5. sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    5 frames
  3. Grizzly
    TCPNIOTransport.bind
    1. org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:131)
    2. org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88)
    3. org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:238)
    4. org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:227)
    5. org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:76)
    5 frames
  4. Nucleus Grizzly jars Combining
    GenericGrizzlyListener.start
    1. org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:185)
    1 frame
  5. Kernel Classes
    GrizzlyService.postConstruct
    1. com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:110)
    2. com.sun.enterprise.v3.services.impl.GrizzlyProxy.start0(GrizzlyProxy.java:269)
    3. com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:242)
    4. com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:567)
    5. com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:490)
    5 frames
  6. ServiceLocator Default Implementation
    SystemDescriptor.create
    1. org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
    2. org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
    3. org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
    3 frames
  7. Run Level Service
    RunLevelContext.findOrCreate
    1. org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
    2. org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
    2 frames
  8. ServiceLocator Default Implementation
    ServiceHandleImpl.getService
    1. org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2022)
    2. org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
    3. org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
    3 frames
  9. Run Level Service
    CurrentTaskFuture$QueueRunner.run
    1. org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
    2. org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
    2 frames
  10. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames