bowemc
asked on
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
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
sounds like your app dies but tomcat is still running
check the process/task list to see if it is running and kill it
check the process/task list to see if it is running and kill it
ASKER
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.H ttp11Proto col init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8888
at org.apache.tomcat.util.net .JIoEndpoi nt.init(JI oEndpoint. java:501)
at org.apache.coyote.http11.H ttp11Proto col.init(H ttp11Proto col.java:1 77)
at org.apache.catalina.connec tor.Connec tor.initia lize(Conne ctor.java: 1059)
at org.apache.catalina.core.S tandardSer vice.initi alize(Stan dardServic e.java:677 )
at org.apache.catalina.core.S tandardSer ver.initia lize(Stand ardServer. java:792)
at org.apache.catalina.startu p.Catalina .load(Cata lina.java: 518)
at org.apache.catalina.startu p.Catalina .load(Cata lina.java: 538)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:59 7)
at org.apache.catalina.startu p.Bootstra p.load(Boo tstrap.jav a:260)
at org.apache.catalina.startu p.Bootstra p.main(Boo tstrap.jav a:412)
Apr 6, 2010 6:47:23 PM org.apache.catalina.startu p.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8888
at org.apache.catalina.connec tor.Connec tor.initia lize(Conne ctor.java: 1061)
at org.apache.catalina.core.S tandardSer vice.initi alize(Stan dardServic e.java:677 )
at org.apache.catalina.core.S tandardSer ver.initia lize(Stand ardServer. java:792)
at org.apache.catalina.startu p.Catalina .load(Cata lina.java: 518)
at org.apache.catalina.startu p.Catalina .load(Cata lina.java: 538)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:59 7)
at org.apache.catalina.startu p.Bootstra p.load(Boo tstrap.jav a:260)
at org.apache.catalina.startu p.Bootstra p.main(Boo tstrap.jav a:412)
Apr 6, 2010 6:47:23 PM org.apache.coyote.http11.H
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8888
at org.apache.tomcat.util.net
at org.apache.coyote.http11.H
at org.apache.catalina.connec
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.startu
at org.apache.catalina.startu
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.catalina.startu
at org.apache.catalina.startu
Apr 6, 2010 6:47:23 PM org.apache.catalina.startu
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8888
at org.apache.catalina.connec
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.startu
at org.apache.catalina.startu
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.catalina.startu
at org.apache.catalina.startu
Did you do the netstat command to see what is listening on port 8888?
> 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
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
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
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.