• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6132
  • Last Modified:

Port 8888 alreay in use

hi,

I was running tomcat on port 8888. I'm not sure what happened but all of a sudden tomcat seemed to crash as none of the application worked. When I tried to restart tomcat server it said port 8888 was already in use. I've tried altering the port in server.xml to port 8887 - the server starts and my (jsp) wiki works, but editing pages seems to hang and this worked fine before.

any ideas how I can free port 8888 so I can restart as was, or resolve the editing page issue?

thanks
0
bowemc
Asked:
bowemc
  • 3
  • 3
  • 2
1 Solution
 
giltjrCommented:
What OS?

If windows you can do:

     netstat -ano | findstr /c:"8888" | findstr /c:"LIST"

For Linux:

    netstat -anp | grep 8888 | grep LIST

This will show you the process id that has the port open, kill that task and you should be fine.
0
 
objectsCommented:
sounds like your app dies but tomcat is still running
check the process/task list to see if it is running and kill it
0
 
bowemcAuthor Commented:
No tomcat is deat. When I try to restart it on port 8888 I get
Apr 6, 2010 6:47:23 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8888
        at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
        at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
        at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
        at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
        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:597)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Apr 6, 2010 6:47:23 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8888
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
        at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
        at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
        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:597)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)

0
Firewall Management 201 with Professor Wool

In this whiteboard video, Professor Wool highlights the challenges, benefits and trade-offs of utilizing zero-touch automation for security policy change management. Watch and Learn!

 
giltjrCommented:
Did you do the netstat command to see what is listening on port 8888?
0
 
objectsCommented:
> No tomcat is deat. When I try to restart it on port 8888 I get

What makes you think that
Have you checked the process list?

> java.net.BindException: Address already in use:8888

That suggests it is still running
0
 
bowemcAuthor Commented:
Hi

giltgr -

bash-3.00$  netstat -anp | grep 8888 | grep LIST
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 :::8888                     :::*                        LISTEN      2551/java


objects -

1) bash-3.00$ ps | grep apache
bash-3.00$

"ps | grep apache" or even "ps" doesn't return anythin so I don't think it's running....

Thanks
0
 
objectsCommented:
> ps | grep apache

should be grepping for java

ps -ef | grep java
0
 
giltjrCommented:
Actually if you had done what I originally posted, which was to do the netstat command to get the process id and then kill it.  In this situation the process id was 2551.  If you had done:

     ps | grep 2551

you would have seen the process name was java.  You would have killed 2551 and then tomcat would have really been down.
0

Featured Post

The eGuide to Automating Firewall Change Control

Today‚Äôs IT environment is constantly changing, which affects security policies and firewall rules. Discover tips to help you embrace this change through process improvement & identify areas where automation & actionable intelligence can enhance both security and business agility.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now