Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem! BindException: JVM_Bind: 80

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm seeing a strange error message. We only run Tomcat as a service on Windows 2000, and no IIS or anything else, so I can't see anything else holding onto port 80. Any idea what would be causing this? Would it be something as simple as choosing to Start or Restart the service when it's already started and Tomcat isn't releasing hold of port 80 as it stops and restarts? I'm seeing this in a production environment, and the website is not coming back up, so it ain't pretty over here!


Catalina.start: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:80
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:80
at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1119)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:579)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246)
at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:236)
at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:231)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)
Bootstrap: Starting service
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24-LE-jdk14
Catalina.start: LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:80
LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:80
at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1143)
at org.apache.catalina.core.StandardService.start(StandardService.java:506)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Bootstrap: Service started
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you connect to port 80 with a browser when this happens what do you get? Tomcat and Java are really not doing anything interesting in this case. They create a ServerSocket bound to port 80. If the O/S says it's in use then there isn't anything that can be done about it.

Windows has a netstat command - run "netstat -na" when you're seeing this problem to see if there is another process LISTENING on port 80.
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I'll try to remember that if we see this again. We went through lots and lots of restarts and even rebooted the database server, and although everything is better now (meaning we can't recreate the error message above), we're still unsure of what happened.

I read a post somewhere in which a suggestion was made that if the JVM process didn't get killed then port 80 might still be tied up by the previous still-closing instance of Tomcat or something like that, but I guess when you start running into stuff like that, things get very murky...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic