Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

tomcat shutdown problem on debian linux

Posted on 2006-04-20
18
Medium Priority
?
595 Views
Last Modified: 2008-01-09
hello experts

i have tomcat 5.0.16 installed on Debian linux machine
the problem is the tomcat does not shutdown normally
i have to use  killall java command to stop it
the error i get is pasted below

debinac:/usr/local/tomcat/bin# . catalina.sh  stop &
[1] 5161
debinac:/usr/local/tomcat/bin# Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME:       /usr/local/jdk
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at java.net.Socket.<init>(Socket.java:309)
        at java.net.Socket.<init>(Socket.java:124)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:436)
        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.Bootstrap.stopServer(Bootstrap.java:322)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:400)

[1]+  Done                    . catalina.sh stop
debinac:/usr/local/tomcat/bin#


pls help
0
Comment
Question by:Econify
  • 8
  • 5
  • 4
  • +1
18 Comments
 
LVL 11

Accepted Solution

by:
fargo earned 1600 total points
ID: 16495912
following may be the reasons

1) tomcat is already down (when u execute the stop)
2) the shutdown port used for tomcat is used by some other process

if the 1) is not the case, try changing the shutdown port in the server.xml to some port which is open and not used by any other process
0
 

Author Comment

by:Econify
ID: 16496115
hi fargo
is there a way to check whether tomcat is running and on which port
on a debian linux machine
0
 
LVL 11

Expert Comment

by:fargo
ID: 16496130
is there a way to check whether tomcat is running
>> ps aux|grep tomcat

and on which port
>> check the tomcat/conf directory in server.xml for
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<Connector port="8080"...>


0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 19

Assisted Solution

by:actonwang
actonwang earned 400 total points
ID: 16503739
>> ps aux|grep tomcat

     it will not be named tomcat, it will be "java ..."

 Econify,
         is your tomcat server started up noramlly? can you access to it?
0
 
LVL 19

Expert Comment

by:actonwang
ID: 16503747
is there any script called shutdown.sh? could you try that?
Also how do you start up your tomcat server? which script do you use?
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 16504158
first check if the 8080 port is in use using netstat command for options & synatx please check man pages.

i think itmust be netstat -r i am not sure just check.

If it is in use kill that process and retry.

Thank You.
0
 
LVL 11

Expert Comment

by:fargo
ID: 16505104
@actonwang
 >> ps aux|grep tomcat
>>> it will not be named tomcat, it will be "java ..."
>>>> tomcat or java...both will work. Sure, java as search is better...
0
 
LVL 19

Expert Comment

by:actonwang
ID: 16506012
actually, i got your problem now:

go to <tomcat>\conf\server.xml:

       look at first line of xml as:
   
      <Server port="8055" shutdown="SHUTDOWN"> <--- 8055 or other is the port for shutdown

      This port , 8055 or other is the one which Tomcat is using for shutdowning your server. Try to change this port to different value which is not taken by other processes. then try it.
     

Enjoy :)
Acton
       
0
 
LVL 11

Expert Comment

by:fargo
ID: 16506488
@acton
my first post has what u just now said.

fargo said..
2) the shutdown port used for tomcat is used by some other process
0
 
LVL 19

Expert Comment

by:actonwang
ID: 16506539
>>2) the shutdown port used for tomcat is used by some other process
     
     oops.
0
 

Author Comment

by:Econify
ID: 16507623
hi acton

i made some progress on this

my observation is

i start tomcat using . catalina.sh run &
when i check for whether tomcat is running using ps -ef|grep tomcat i see 40-50 lines
or when i give the command ps -A i see 40-50 java processes started

my app is working fine now

now i do . catalina.sh stop
after this when i do ps -A i still see around 20 processes by name of java
or ps -ef|grep tomcat shows about 20 threads

but my web application stops working

thats fine and that is what is wanted

but what are all these java processes which start with tomcat startup and why dont
they stop on tomcat shutdown.

so to be safe and sure i use killall java always while starting java

pls tell me wheteher its normal behaviour of tomcat
i dont think 40 threads shud be starting

pls guide
 

0
 
LVL 19

Expert Comment

by:actonwang
ID: 16507685
so you resolved the shutdown as fargo and I mentioned :)

20 or 40 different lines?
Could you post them if you don't mind?
0
 

Author Comment

by:Econify
ID: 16524307
hi acton

yes there was no port number issue.
it was bcos the server was already shutdown

but why the 40 lines dont know
pls help i dont want to do killall java

below are the process lines

debinac:~# ps -ef|grep tomcat
root      1711  1710  0 01:21 ?        00:00:06 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1756  1711  0 01:21 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1757  1756  0 01:21 ?        00:00:01 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1758  1756  0 01:21 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1759  1756  0 01:21 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1760  1756  0 01:21 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1761  1756  0 01:21 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1762  1756  0 01:21 ?        00:00:01 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1763  1756  0 01:21 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1765  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1768  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1769  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1770  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1771  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1772  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1773  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1774  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1775  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1776  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1777  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1778  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1779  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1780  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1781  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1782  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1783  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1784  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1785  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1786  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1787  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1788  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1789  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1790  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1791  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1792  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1793  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1794  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1795  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1796  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1797  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1798  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      1799  1756  0 01:22 ?        00:00:00 /usr/local/jdk/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/jdk/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      5085  4893  0 09:17 pts/6    00:00:00 grep tomcat
0
 
LVL 19

Expert Comment

by:actonwang
ID: 16524966
Hi,Econify,

        Those are spare threads from Tomcat. Look at server.xml, you will see as:

    <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               .... />

        You lower those attributes for thread and you should see less java processes.

Enjoy :)
Acton
0
 

Author Comment

by:Econify
ID: 16526406
hi acton i have 2 installation of tomcat one on ubuntu and another on debian

both have the same values as u have said

<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               .... />

but the ubuntu starts only 3 threads and debian starts 50 threads

>>>you lower those attributes for thread and you should see less java processes.

can u be a specific which attribute and to what value
i feel this not the root cause


0
 
LVL 19

Expert Comment

by:actonwang
ID: 16526635
how about try:

<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="10" minSpareThreads="2" maxSpareThreads="5"
               .... />

for the sake of test.
0
 

Author Comment

by:Econify
ID: 16531754
i acton my googling resulted in a good info about the issue
which finally says
i shud not bother about it

http://marc.theaimsgroup.com/?l=tomcat-user&m=104852893716114&w=2

pls have a look and share your view
actually as they say i am also not bothered for the no of threads tomcat is starting up
i was only bothered for the threads which were not stopping even after i shutdown the server
for which i used killall java

i was only making sure of a clean tomcat startup by using that

and at last but not the least thank you for holding on for so long on
this issue along with me
0
 
LVL 19

Expert Comment

by:actonwang
ID: 16533528
Econify,

          What they said is just what I said.  
          Did you try the settings I recommended and see if less threads are listed?
          If you use startup.sh or shutdown.sh scripts, everything should be fine.

Acton
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to kick start your career in 2018? Add app developer skills to your resume. January’s Course of the Month features Android App Development training with hands-on learning.  Read on to learn why these skills are important.
The article explains the process to deploy a Self-Service password reset portal I developed a few years ago. Hopefully, it will prove useful to someone.  Any comments, bug reports etc. are welcome...
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question