java.net.BindException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When the hudosn service is started twice (can happen accidently) using "net start Hudson", binding the second Hudson to thr same port failes. However, the second Hudson does not get terminated, but keeps running in "head-less" mode. Could this be changed that the second Hudson terminates itslef, except if it is explicitly configured to run without any web interface? hudson.out.log: Running from: X:\hudson\hudson.war [Winstone 2010/08/23 23:13:07] - Beginning extraction from war file hudson home directory: X:\hudson Using one-time self-signed certificate [Winstone 2010/08/23 23:13:10] - AJP13 Listener started: port=8009 [Winstone 2010/08/23 23:13:10] - HTTP Listener started: port=8080 [Winstone 2010/08/23 23:13:10] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled Green Balls! Running from: X:\hudson\hudson.war [Winstone 2010/08/24 23:14:28] - Beginning extraction from war file hudson home directory: X:\hudson [Winstone 2010/08/24 23:14:33] - Error during HTTP listener init or shutdown java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source) [Winstone 2010/08/24 23:14:33] - HTTP Listener shutdown successfully [Winstone 2010/08/24 23:14:33] - Error during AJP13 listener init or shutdown java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at winstone.ajp13.Ajp13Listener.run(Ajp13Listener.java:99) at java.lang.Thread.run(Unknown Source) [Winstone 2010/08/24 23:14:33] - AJP13 Listener shutdown successfully Using one-time self-signed certificate [Winstone 2010/08/24 23:14:33] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled Green Balls!
    via by Axel Heider,
  • When the hudosn service is started twice (can happen accidently) using "net start Hudson", binding the second Hudson to thr same port failes. However, the second Hudson does not get terminated, but keeps running in "head-less" mode. Could this be changed that the second Hudson terminates itslef, except if it is explicitly configured to run without any web interface? hudson.out.log: Running from: X:\hudson\hudson.war [Winstone 2010/08/23 23:13:07] - Beginning extraction from war file hudson home directory: X:\hudson Using one-time self-signed certificate [Winstone 2010/08/23 23:13:10] - AJP13 Listener started: port=8009 [Winstone 2010/08/23 23:13:10] - HTTP Listener started: port=8080 [Winstone 2010/08/23 23:13:10] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled Green Balls! Running from: X:\hudson\hudson.war [Winstone 2010/08/24 23:14:28] - Beginning extraction from war file hudson home directory: X:\hudson [Winstone 2010/08/24 23:14:33] - Error during HTTP listener init or shutdown java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source) [Winstone 2010/08/24 23:14:33] - HTTP Listener shutdown successfully [Winstone 2010/08/24 23:14:33] - Error during AJP13 listener init or shutdown java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at winstone.ajp13.Ajp13Listener.run(Ajp13Listener.java:99) at java.lang.Thread.run(Unknown Source) [Winstone 2010/08/24 23:14:33] - AJP13 Listener shutdown successfully Using one-time self-signed certificate [Winstone 2010/08/24 23:14:33] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled Green Balls!
    via by Axel Heider,
  • mViewer-0.92
    via GitHub by vzocca
    ,
  • In my case 8080 is taken by some other app. Hudson should have terminated when it found the problem rather than continuing to start the other agents. Winstone 2010/02/18 10:39:49] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled [Winstone 2010/02/18 10:39:49] - AJP13 Listener started: port=8009 [Winstone 2010/02/18 10:39:49] - Error during HTTP listener init or shutdown java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at java.net.ServerSocket.<init>(ServerSocket.java:141) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Thread.java:595) [Winstone 2010/02/18 10:39:49] - HTTP Listener shutdown successfully Feb 18, 2010 10:39:49 AM hudson.model.Hudson$4 onAttained INFO: Started initialization Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Listed all plugins Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Prepared all plugins Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Started all plugins Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Loaded all jobs Feb 18, 2010 10:39:52 AM hudson.model.Hudson$4 onAttained INFO: Completed initialization Feb 18, 2010 10:39:52 AM hudson.TcpSlaveAgentListener <init> INFO: JNLP slave agent listener started on TCP port 54989
    via by ramapulavarthi,
  • In my case 8080 is taken by some other app. Hudson should have terminated when it found the problem rather than continuing to start the other agents. Winstone 2010/02/18 10:39:49] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled [Winstone 2010/02/18 10:39:49] - AJP13 Listener started: port=8009 [Winstone 2010/02/18 10:39:49] - Error during HTTP listener init or shutdown java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at java.net.ServerSocket.<init>(ServerSocket.java:141) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Thread.java:595) [Winstone 2010/02/18 10:39:49] - HTTP Listener shutdown successfully Feb 18, 2010 10:39:49 AM hudson.model.Hudson$4 onAttained INFO: Started initialization Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Listed all plugins Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Prepared all plugins Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Started all plugins Feb 18, 2010 10:39:51 AM hudson.model.Hudson$4 onAttained INFO: Loaded all jobs Feb 18, 2010 10:39:52 AM hudson.model.Hudson$4 onAttained INFO: Completed initialization Feb 18, 2010 10:39:52 AM hudson.TcpSlaveAgentListener <init> INFO: JNLP slave agent listener started on TCP port 54989
    via by ramapulavarthi,
  • Running from: C:\Users\verakot\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\24\5ef66b98-2d9c8352 webroot: $user.home/.jenkins Aug 6, 2012 4:53:35 PM winstone.Logger logInternal INFO: Beginning extraction from war file Jenkins home directory: C:\Users\verakot\.jenkins found at: $user.home/.jenkins Aug 6, 2012 4:53:40 PM winstone.Logger logInternal INFO: Winstone shutdown successfully Aug 6, 2012 4:53:40 PM winstone.Logger logInternal SEVERE: Container startup failed java.io.IOException: Failed to start a listener: winstone.HttpListener at winstone.Launcher.spawnListener(Launcher.java:229) at winstone.Launcher.<init>(Launcher.java:181) at winstone.Launcher.main(Launcher.java:384) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at Main._main(Main.java:273) at Main.main(Main.java:98) at JNLPMain.main(JNLPMain.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Failed to listen on port 8080 at winstone.HttpListener.getServerSocket(HttpListener.java:119) at winstone.HttpListener.start(HttpListener.java:72) at winstone.Launcher.spawnListener(Launcher.java:220) ... 18 more Caused by: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:114) ... 20 more
    via by Vera Kot,
  • Web Server - File Exchange - MATLAB Central
    via by Unknown author,
    • java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    tomthomas
    5 times, last one,
    marcbouvierdav
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Justin
    2 times, last one,
    39 more bugmates