tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <its_toas...@yahoo.com>
Subject Re: Unable to shutdown Tomcat
Date Sat, 15 Feb 2014 00:17:12 GMT
On 2/14/2014 3:49 PM, Pooja Swamy wrote:
> I changed my port to 1800.
>
> 1. I got it from another server that is also running the same version.

So you just copied some software over . . . Version, origin, etc. are 
unknown?

> 2.b.
> myMac@test:/Users/test/software/tomcat/bin>netstat -an | grep LISTEN
> tcp46      0      0  *.3283                 *.*                    LISTEN
>
> tcp46      0      0  *.80                   *.*                    LISTEN

Are you running a web server?

>
> tcp4       0      0  *.88                   *.*                    LISTEN
>
> tcp6       0      0  *.88                   *.*                    LISTEN
>
> tcp4       0      0  *.22                   *.*                    LISTEN
>
> tcp6       0      0  *.22                   *.*                    LISTEN
>
> tcp4       0      0  *.5900                 *.*                    LISTEN
>
> tcp6       0      0  *.5900                 *.*                    LISTEN
>
> tcp4       0      0  *.625                  *.*                    LISTEN
>
> tcp6       0      0  *.625                  *.*                    LISTEN
>
> tcp4       0      0  *.548                  *.*                    LISTEN
>
> tcp6       0      0  *.548                  *.*                    LISTEN
>
> tcp4       0      0  127.0.0.1.631          *.*                    LISTEN
>
> tcp6       0      0  ::1.631                *.*                    LISTEN
>
> tcp4       0      0  *.311                  *.*                    LISTEN
>
> tcp6       0      0  *.311                  *.*                    LISTEN
>
>

No, it does not appear to be running. At least there are no ports that I 
see that are attributable to Tomcat (with the remote possibility of port 
80).

Please try the following:

1. download the tar.gz file from tomcat.apache.org
2. unpack it in your home directory
3. make sure java is available by typing
    java -version
    on the command line
4. cd to apache-tomcat-7.0.50/bin (if you've downloaded 7.0.50)
5. ./startup.sh

6. post the output of:
    ps -aef | grep catalina | grep -v grep
7. post the output of:
    netstat -an | grep LISTEN

/mde/

> On Fri, Feb 14, 2014 at 3:43 PM, Mark Eggers <its_toasted@yahoo.com> wrote:
>
>> On 2/14/2014 3:37 PM, Pooja Swamy wrote:
>>
>>> I started tomcat -
>>>
>>> test@17.198.48.77:/Users/test/software/runtime/bin>./startup.sh
>>> Using CATALINA_BASE:   /Users/test/software/runtime
>>> Using CATALINA_HOME:   /Users/test/software/runtime
>>> Using CATALINA_TMPDIR: /Users/test/software/runtime/temp
>>> Using JRE_HOME:
>>>    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>> Using CLASSPATH:
>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>> software/runtime/bin/tomcat-juli.jar
>>> test@17.198.48.77:/Users/test/software/runtime/bin>netstat -an | grep
>>> LISTEN | grep 18000
>>> test@17.198.48.77:/Users/test/software/runtime/bin>
>>>
>>> Btw, when I try this for any port, I see tihs -
>>>
>>> test@17.198.48.77:/Users/test/software/runtime/bin>telnet localhost 18000
>>> Trying ::1...
>>> telnet: connect to address ::1: Connection refused
>>> Trying 127.0.0.1...
>>> telnet: connect to address 127.0.0.1: Connection refused
>>> telnet: Unable to connect to remote host
>>>
>>> Is this a firewall issue?
>>>
>>
>> OK, I don't know where you got port 1800, so:
>>
>> 1. Where did you get your Tomcat from?
>> 2. Do the following:
>>     a. Start Tomcat
>>     b. netstat -an | grep LISTEN
>>
>> Post the answer to question 1. Post the complete output of 2.b. There will
>> be a lot (sadly). Maybe we can tell what's running.
>>
>> . . . . just my two cents.
>> /mde/
>>
>>
>>>
>>> On Fri, Feb 14, 2014 at 3:32 PM, Mark Eggers <its_toasted@yahoo.com>
>>> wrote:
>>>
>>>   On 2/14/2014 2:46 PM, Pooja Swamy wrote:
>>>>
>>>>   Here is another thing. Everytime I start tomcat, it is not throwing an
>>>>> error. I am able to start it up multiple times. -
>>>>>
>>>>> myMac:bin test$ ./startup.sh
>>>>> Using CATALINA_BASE:   /Users/test/software/runtime
>>>>> Using CATALINA_HOME:   /Users/test/software/runtime
>>>>> Using CATALINA_TMPDIR: /Users/test/software/runtime/temp
>>>>> Using JRE_HOME:
>>>>>     /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>>>> Using CLASSPATH:
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> myMac:bin test$ ./startup.sh
>>>>> Using CATALINA_BASE:   /Users/test/software/runtime
>>>>> Using CATALINA_HOME:   /Users/test/software/runtime
>>>>> Using CATALINA_TMPDIR: /Users/test/software/runtime/temp
>>>>> Using JRE_HOME:
>>>>>     /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>>>> Using CLASSPATH:
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> myMac:bin test$ ./startup.sh
>>>>> Using CATALINA_BASE:   /Users/test/software/runtime
>>>>> Using CATALINA_HOME:   /Users/test/software/runtime
>>>>> Using CATALINA_TMPDIR: /Users/test/software/runtime/temp
>>>>> Using JRE_HOME:
>>>>>     /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>>>> Using CLASSPATH:
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> myMac:bin test$ ./startup.sh
>>>>> Using CATALINA_BASE:   /Users/test/software/runtime
>>>>> Using CATALINA_HOME:   /Users/test/software/runtime
>>>>> Using CATALINA_TMPDIR: /Users/test/software/runtime/temp
>>>>> Using JRE_HOME:
>>>>>     /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>>>> Using CLASSPATH:
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> myMac:bin test$ ps -ef|grep tomcat
>>>>>      501 29997     1   0  2:41PM ttys001    0:01.68
>>>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
>>>>> Contents/Home/bin/java
>>>>> -Djava.util.logging.config.file=/Users/test/software/
>>>>> runtime/conf/logging.properties
>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>> -Djava.endorsed.dirs=/Users/test/software/runtime/endorsed -classpath
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> -Dcatalina.base=/Users/test/software/runtime
>>>>> -Dcatalina.home=/Users/test/software/runtime
>>>>> -Djava.io.tmpdir=/Users/test/software/runtime/temp
>>>>> org.apache.catalina.startup.Bootstrap start
>>>>>      501 30016     1   0  2:44PM ttys001    0:01.72
>>>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
>>>>> Contents/Home/bin/java
>>>>> -Djava.util.logging.config.file=/Users/test/software/
>>>>> runtime/conf/logging.properties
>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>> -Djava.endorsed.dirs=/Users/test/software/runtime/endorsed -classpath
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> -Dcatalina.base=/Users/test/software/runtime
>>>>> -Dcatalina.home=/Users/test/software/runtime
>>>>> -Djava.io.tmpdir=/Users/test/software/runtime/temp
>>>>> org.apache.catalina.startup.Bootstrap start
>>>>>      501 30025     1   0  2:44PM ttys001    0:01.90
>>>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
>>>>> Contents/Home/bin/java
>>>>> -Djava.util.logging.config.file=/Users/test/software/
>>>>> runtime/conf/logging.properties
>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>> -Djava.endorsed.dirs=/Users/test/software/runtime/endorsed -classpath
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> -Dcatalina.base=/Users/test/software/runtime
>>>>> -Dcatalina.home=/Users/test/software/runtime
>>>>> -Djava.io.tmpdir=/Users/test/software/runtime/temp
>>>>> org.apache.catalina.startup.Bootstrap start
>>>>>      501 30034     1   0  2:44PM ttys001    0:02.12
>>>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
>>>>> Contents/Home/bin/java
>>>>> -Djava.util.logging.config.file=/Users/test/software/
>>>>> runtime/conf/logging.properties
>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>> -Djava.endorsed.dirs=/Users/test/software/runtime/endorsed -classpath
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> -Dcatalina.base=/Users/test/software/runtime
>>>>> -Dcatalina.home=/Users/test/software/runtime
>>>>> -Djava.io.tmpdir=/Users/test/software/runtime/temp
>>>>> org.apache.catalina.startup.Bootstrap start
>>>>>      501 30043     1   0  2:44PM ttys001    0:01.97
>>>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
>>>>> Contents/Home/bin/java
>>>>> -Djava.util.logging.config.file=/Users/test/software/
>>>>> runtime/conf/logging.properties
>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>> -Djava.endorsed.dirs=/Users/test/software/runtime/endorsed -classpath
>>>>> /Users/test/software/runtime/bin/bootstrap.jar:/Users/test/
>>>>> software/runtime/bin/tomcat-juli.jar
>>>>> -Dcatalina.base=/Users/test/software/runtime
>>>>> -Dcatalina.home=/Users/test/software/runtime
>>>>> -Djava.io.tmpdir=/Users/test/software/runtime/temp
>>>>> org.apache.catalina.startup.Bootstrap start
>>>>>      501 30046 29856   0  2:44PM ttys001    0:00.00 grep tomcat
>>>>> myMac:bin test$
>>>>>
>>>>> So tomcat is basically not starting up at all.
>>>>>
>>>>>
>>>> So this is a Macintosh.
>>>>
>>>> How did you install Tomcat?
>>>>
>>>> If you installed it directly from tomcat.apache.org, are you sure you're
>>>> running that particular Tomcat?
>>>>
>>>> If you're using a prepackaged Tomcat and it functions like the RedHat /
>>>> CentOS packages, then you can start multiple Tomcats with no problem. The
>>>> RedHat / CentOS packages probe for useable ports, and assign at least the
>>>> HTTP and shutdown ports based on what's available.
>>>>
>>>> I'm thinking that you're using a prepackaged Tomcat, since the
>>>> directories
>>>> from your ps command don't look like the standard
>>>> tomcat.apache.orgoutput or directory structure.
>>>>
>>>>
>>>> If I've missed where you said you were using a prepackaged Tomcat, sorry
>>>> 'bout that.
>>>>
>>>> Try this:
>>>>
>>>> Start up Tomcat on the command line like you're doing, and once it's
>>>> running do the following:
>>>>
>>>> netstat -an | grep LISTEN | grep 800
>>>> netstat -an | grep LISTEN | grep 808
>>>>
>>>> Post the results.
>>>>
>>>> Hopefully (if you're using a prepackaged Tomcat) the port choices are
>>>> 'rational' and we can see what's running.
>>>>
>>>> Another thing to do.
>>>>
>>>> 1. Download Tomcat from tomcat.apache.org (.tar.gz)
>>>> 2. Unpack it in your home directory
>>>> 3. cd to apache-tomcat-7.0.50/bin
>>>> 4. ./startup.sh
>>>>
>>>> If you have either JRE_HOME set to a workable JRE, or JAVA_HOME set to a
>>>> workable JDK, then this should just work out of the box.
>>>>
>>>> . . . . just my (late to the party) 2 cents.
>>>> /mde/
>>>>
>>>>
>>>>
>>>>
>>>>> On Fri, Feb 14, 2014 at 2:31 PM, Pooja Swamy <poojaswamy@gmail.com>
>>>>> wrote:
>>>>>
>>>>>    Yes. My tomcat is definitely not starting up :( I am not sure how
to
>>>>>
>>>>>> debug
>>>>>> this issue though. I tried changing the port. It didn't help.
>>>>>>
>>>>>> For this error -
>>>>>> SEVERE: Could not contact localhost:8005. Tomcat may not be running.
>>>>>>
>>>>>> When I do -
>>>>>>
>>>>>> myMac:logs test$ telnet localhost 8005
>>>>>> Trying ::1...
>>>>>> telnet: connect to address ::1: Connection refused
>>>>>> Trying 127.0.0.1...
>>>>>> telnet: connect to address 127.0.0.1: Connection refused
>>>>>> telnet: Unable to connect to remote host
>>>>>>
>>>>>> Does this mean anything?
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 14, 2014 at 1:11 PM, Neven Cvetkovic <
>>>>>> neven.cvetkovic@gmail.com> wrote:
>>>>>>
>>>>>>    On Fri, Feb 14, 2014 at 3:10 PM, Pooja Swamy <poojaswamy@gmail.com>
>>>>>>
>>>>>>> wrote:
>>>>>>>
>>>>>>>    Yes I have tried that.
>>>>>>>
>>>>>>>>
>>>>>>>> When I kill, the process gets killed gracefully. After killing,
if I
>>>>>>>> do
>>>>>>>>
>>>>>>>>   a
>>>>>>>
>>>>>>>   ps -ef|grep tomcat, I don't see the process running.
>>>>>>>> Like I said the issue is not with shutdown. The issue is
with
>>>>>>>> startup.
>>>>>>>>
>>>>>>>>   When
>>>>>>>
>>>>>>>   I startup, the startup is not happening at all, which is what
is
>>>>>>>>
>>>>>>>>   causing a
>>>>>>>
>>>>>>>   problem while shutting down. Here is what I see -
>>>>>>>>
>>>>>>>>
>>>>>>>>    Exactly Pooja. You need to confirm that your Tomcat is
actually
>>>>>>>>
>>>>>>> starting
>>>>>>> up
>>>>>>> (any or all points below):
>>>>>>>
>>>>>>> 1) See if in the process table
>>>>>>> 2) See in netstat that is bound to 8080
>>>>>>> 3) Look into the log file and see it started listening on port
8080
>>>>>>> 4) Check in browser, e.g. http://localhost:8080
>>>>>>>
>>>>>>> So, if the startup is problem, try to start it with:
>>>>>>>
>>>>>>> /Users/test/software/tomcat/bin/catalina.sh run
>>>>>>>
>>>>>>> (tell us the output)
>>>>>>>
>>>>>>>
>>>>>>> Also, in your previous reply - the logfile looks suspiciously
short,
>>>>>>> not
>>>>>>> too many details ...
>>>>>>>
>>>>>>> You should see the connectors starting up, e.g.
>>>>>>>
>>>>>>> ... INFO: Starting ProtocolHandler ["http-bio-8080"]
>>>>>>> ... INFO: Starting ProtocolHandler ["ajp-bio-8009"]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>    Feb 14, 2014 12:10:23 PM org.apache.catalina.startup.Catalina
>>>>>>>
>>>>>>>> stopServer
>>>>>>>>
>>>>>>>> SEVERE: Could not contact localhost:8005. Tomcat may not
be running.
>>>>>>>>
>>>>>>>> I don't understand what's causing this.
>>>>>>>>
>>>>>>>>
>>>>>>>>    Your Tomcat is probably not running, i.e. there is nothing
>>>>>>>> listening
>>>>>>>>
>>>>>>> on
>>>>>>> port 8005 for the shutdown.sh script to connect to (which is
defined
>>>>>>> in
>>>>>>> server.xml).
>>>>>>>
>>>>>>>
>>>>>>> Good luck!
>>>>>>>
>>>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message