aspose file tools*
The moose likes Tomcat and the fly likes tomcat don�t release port 8080 when on shot down  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat don�t release port 8080 when on shot down  " Watch "tomcat don�t release port 8080 when on shot down  " New topic
Author

tomcat don�t release port 8080 when on shot down

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hello all ..
I have some kind of weird problem, im using apache 1.3 and tomcat 4.4 with mod_jk as the connector
Running on Solaris unix .
every thing is working just fine except when I shot down tomcat with bin/catalina.sh stop
the port 8080 is still remind busy by tomcat (netstat �a | grep 8080 shows tomcat java )
when I open the server.xml I see that there is something called : CoyoteConnector that takes this port
and tomcat just need it .
what is wrong here? why is the port stay busy ?
Thanks
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Do you have any non-daemon threads running in your app that may be keeping Tomcat from shutting down?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
what is "non-daemon threads" app?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In your app, does any of your code spawn threads?
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
no it dose not
in fact when i lock in the logs again i see that the only thing that use the port 8080 is : CoyoteConnector
and when i use to track the busy port with lsof + ps -ef
im geting that the thing that listen to the port after tomcat is dead is this :
jdk/jdk1.4.1/bin/java -Djava.endorsed.di
what else can i do / check ?

thanks
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Not that this solves the real problem but if you're using mod_jk to intergrate with Apache HTTPD, you probably don't need the coyote connector (although it's sometimes useful to test things by hitting tomcat as a standalone).

Have you tried a thread dump to see what, exactly, is keeping the JVM from shutting down?
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
ok so yes i tryed to comment out in the server.xml the part where it says about cayota stuff , but then all the tomcat didnt served any servlet
or mybe i didnt canceld it as i need to , how can i cancle it?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How are you hitting your servlets, through Apache HTTPD via the connector or are you aiming your browser directly at tomcat via port 8080?

If the latter, why are you using mod_jk?

Another thought that I had..
When you shut down Tocmat, are you also shutting down Apache HTTPD?
If not, maybe the thread that listens for connector requests is keeping Tomcat from shutting down.

If you haven't already, try shutting both of them down and then run netstat.
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
hi
well i start apache and then i start tomcat , i need apache , beacose
my application using some other file types and stuff , im shoting down
first the tomcat and then the apache .
is there any way to start tomcat from apache?
and still i have the 8080 bussy ....why ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat don�t release port 8080 when on shot down