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
bowemcAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Application Servers

From novice to tech pro — start learning today.