You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Pooja Swamy <po...@gmail.com> on 2014/02/14 19:44:42 UTC

Unable to shutdown Tomcat

I am unable to shutdown my tomcat gracefully. Everytime I try to shutdown
tomcat, this is the error I get.

test@17.198.48.77:/Users/test/software/tomcat/bin>./startup.sh
Using CATALINA_BASE:   /Users/test/software/tomcat
Using CATALINA_HOME:   /Users/test/software/tomcat
Using CATALINA_TMPDIR: /Users/test/software/tomcat/temp
Using JRE_HOME:
 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
Using CLASSPATH:
/Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
test@17.198.48.77:/Users/test/software/tomcat/bin>./shutdown.sh
Using CATALINA_BASE:   /Users/test/software/tomcat
Using CATALINA_HOME:   /Users/test/software/tomcat
Using CATALINA_TMPDIR: /Users/test/software/tomcat/temp
Using JRE_HOME:
 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
Using CLASSPATH:
/Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
Feb 14, 2014 6:37:52 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431)
at java.net.Socket.connect(Socket.java:527)
at java.net.Socket.connect(Socket.java:476)
at java.net.Socket.<init>(Socket.java:373)
at java.net.Socket.<init>(Socket.java:187)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499)
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.stopServer(Bootstrap.java:371)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:453)


I have also tried killing, restarting, and ./shutdown.sh, installing tomcat
again, changing port number. Nothing seems to be helping. Please advise.

Re: Unable to shutdown Tomcat

Posted by "James H. H. Lampert" <ja...@touchtonecorp.com>.
FWIW:

I've had similar situations arise (we've never found a reason why, but 
it happens far less frequently since we updated all our Tomcat 
installations to a more recent release) on AS/400s. I responded to it by 
rewriting our shutdown CL program so that if a normal shutdown fails to 
bring Tomcat down within a specified timeout, it simply finds and abends 
the CATALINA job.

--
JHHL

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


Re: Unable to shutdown Tomcat

Posted by Neven Cvetkovic <ne...@gmail.com>.
On Fri, Feb 14, 2014 at 1:44 PM, Pooja Swamy <po...@gmail.com> wrote:

> I am unable to shutdown my tomcat gracefully. Everytime I try to shutdown
> tomcat, this is the error I get.
>
> test@17.198.48.77:/Users/test/software/tomcat/bin>./startup.sh

Using CATALINA_BASE:   /Users/test/software/tomcat
> Using CATALINA_HOME:   /Users/test/software/tomcat
> Using CATALINA_TMPDIR: /Users/test/software/tomcat/temp
> Using JRE_HOME:
>  /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> Using CLASSPATH:
>
> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
>

OK, you started tomcat successfully. Now, it would be good idea to check
what ports tomcat listens to, e.g.

netstat -vatpn | grep LISTEN    (on Linux)
lsof -i TCP | grep LISTEN         (on Mac)

- Standard configuration would have the following ports open:
8005 - shutdown port
8009 - AJP port
8080 - HTTP port (app-serving)
8443 - HTTPS port (app-serving) - optional

What does your /Users/test/software/tomcat/conf/server.xml say?



> test@17.198.48.77:/Users/test/software/tomcat/bin>./shutdown.sh
> Using CATALINA_BASE:   /Users/test/software/tomcat
> Using CATALINA_HOME:   /Users/test/software/tomcat
> Using CATALINA_TMPDIR: /Users/test/software/tomcat/temp
> Using JRE_HOME:
>  /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> Using CLASSPATH:
>
> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
> Feb 14, 2014 6:37:52 PM org.apache.catalina.startup.Catalina stopServer
> SEVERE: Catalina.stop:
> java.net.ConnectException: Connection refused
>

There is a problem shutdown - you are not able to connect to the shutdown
port for some reason.

at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431)
> at java.net.Socket.connect(Socket.java:527)
> at java.net.Socket.connect(Socket.java:476)
> at java.net.Socket.<init>(Socket.java:373)
> at java.net.Socket.<init>(Socket.java:187)
> at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499)
> 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.stopServer(Bootstrap.java:371)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:453)
>
>
> I have also tried killing, restarting, and ./shutdown.sh, installing tomcat
> again, changing port number. Nothing seems to be helping. Please advise.
>


What does your server.xml configure as shutdown port?
What does the log file say about shutdown port?
After restarting - what ports are bound by the tomcat process?


Also, when troubleshooting  - I like to start tomcat with "./catalina.sh
run" instead of "./catalina.sh start" or "./startup.sh".
I do that when I am troubleshooting, as all the logs are directly in the
STDOUT (console), and it is easy to CTRL+C and stop the process, and
UP-ARROW-ENTER to restart it ...

It is probably misconfigued shutdown port (i.e. -1 or 0)


Try to provide additional information when stating the problem:
- tomcat version
- jdk version
- operating system


Good luck!

Re: Unable to shutdown Tomcat

Posted by André Warnier <aw...@ice-sa.com>.
Pooja Swamy 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.

Yes, one would kind of expect this.  A bit like trying to make an omelet with an egg that 
hasn't been laid yet.

  Here is what I see -
> 
> 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.

Hint: there is a clue in the log line above (second part).


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


Re: Unable to shutdown Tomcat

Posted by Neven Cvetkovic <ne...@gmail.com>.
On Fri, Feb 14, 2014 at 5:31 PM, Pooja Swamy <po...@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?
>
>
>
OK, we established your Tomcat is not starting up.



> > So, if the startup is problem, try to start it with:
> >
> > /Users/test/software/tomcat/bin/catalina.sh run
> >
> > (tell us the output)
> >
>

Did you try my earlier suggestion?

./catalina.sh run


What's the output?

RE: Unable to shutdown Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
MG>ton of log information is missing..you must have disabled the logs somehow

> Date: Fri, 14 Feb 2014 21:51:55 -0500
> From: chris@christopherschultz.net
> To: users@tomcat.apache.org
> Subject: Re: Unable to shutdown Tomcat
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Pooja,
> 
> On 2/14/14, 5:49 PM, Pooja Swamy wrote:
> > Okay. Here you go -
> > 
> > myMac:runtime test$ bin/catalina.sh run 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
> >
> > 
> Feb 14, 2014 2:47:46 PM org.apache.catalina.core.AprLifecycleListener init
> > INFO: The APR based Apache Tomcat Native library which allows
> > optimal performance in production environments was not found on
> > the java.library.path: 
> > .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
> 
> There
> > 
> must be more. Is there nothing else printed after that? You go
> back to a command prompt?
MG>confirm these entries in $CATALINA_HOME/conf/catalina.policy

grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
        permission java.io.FilePermission
         "${java.home}${file.separator}lib${file.separator}logging.properties", "read";

        permission java.io.FilePermission
         "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
        permission java.io.FilePermission
         "${catalina.base}${file.separator}logs", "read, write";
        permission java.io.FilePermission
         "${catalina.base}${file.separator}logs${file.separator}*", "read, write";


MG>also if you do  have a custom logging.properties you will need to define LOGGING_CONFIG
MG>during catalina.bat start e.g

MG>rem   LOGGING_CONFIG  (Optional) Override Tomcat's logging config file
rem                   Example (all one line)
rem                   set LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"

MG>
> - -chris
MG>- -martin


> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQIcBAEBCAAGBQJS/tZIAAoJEBzwKT+lPKRYmZsP/2pvFj76I0UQZ8P64SehuxJG
> qs0Jj/PIX0DC4jdhqn3Hs3TkzVplvhmTxWpQdDkq8/0X56aztLtpODn634MapqT5
> NSxkMFS2xxHQ4GWeZ9iNCmOd+0HNv+bfFtB/ZVGqoU8jWSUAsyA5OXHJlDy909y7
> Y17pnLccP1wyQ0v/oTxsvhFPn0tJ1bJiXedQEHA6vQLLVaagmOdFg0M5KUi20qQs
> qkbQUjMwnwNMj2aIxGOyvntxoMgGwoA8ZJauf2tM2SFPJBEwj5lcw6gxlWgOFWFY
> l83jl0kdaK6El3S4D0J9+rPUPGsNPXtkLHieWU54U7ZBjgoX2/nCPTFPmdc4+aVO
> H/hCTXbBst5LUpO8QCBNRTg0MJHE8eLDrjtjWnaxn9rToBOC5wwHgQnCZqDTS7zG
> T1nJNU3/hqu3Im5R+f+VVOX4HKdQj+tuPEBBjkci0e7sDg0HDEUUuUQ1AThLzVtw
> 6t5E/jyeRr3iga0rn96n+9r8Gv99+E8DI+GbgNQHzWpYyM7lGXW/itm3gu2jiT/a
> MQdXRkXLl7+VW0BWe78C1qgrNWkJE9420hTBvv+zHV0CGz6HZ+ui9GEqaOTO0iWm
> itBhv2XDOKcQ4DeLjKlXvZDghcP1HoZkTxszjpqUSXpGTKtFYXRqjl/zD4QG/Plo
> pkMmpzvjlsICb/YqoODD
> =14QC
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

 		 	   		  

Re: Unable to shutdown Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Pooja,

On 2/14/14, 5:49 PM, Pooja Swamy wrote:
> Okay. Here you go -
> 
> myMac:runtime test$ bin/catalina.sh run 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
>
> 
Feb 14, 2014 2:47:46 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat Native library which allows
> optimal performance in production environments was not found on
> the java.library.path: 
> .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

There
> 
must be more. Is there nothing else printed after that? You go
back to a command prompt?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS/tZIAAoJEBzwKT+lPKRYmZsP/2pvFj76I0UQZ8P64SehuxJG
qs0Jj/PIX0DC4jdhqn3Hs3TkzVplvhmTxWpQdDkq8/0X56aztLtpODn634MapqT5
NSxkMFS2xxHQ4GWeZ9iNCmOd+0HNv+bfFtB/ZVGqoU8jWSUAsyA5OXHJlDy909y7
Y17pnLccP1wyQ0v/oTxsvhFPn0tJ1bJiXedQEHA6vQLLVaagmOdFg0M5KUi20qQs
qkbQUjMwnwNMj2aIxGOyvntxoMgGwoA8ZJauf2tM2SFPJBEwj5lcw6gxlWgOFWFY
l83jl0kdaK6El3S4D0J9+rPUPGsNPXtkLHieWU54U7ZBjgoX2/nCPTFPmdc4+aVO
H/hCTXbBst5LUpO8QCBNRTg0MJHE8eLDrjtjWnaxn9rToBOC5wwHgQnCZqDTS7zG
T1nJNU3/hqu3Im5R+f+VVOX4HKdQj+tuPEBBjkci0e7sDg0HDEUUuUQ1AThLzVtw
6t5E/jyeRr3iga0rn96n+9r8Gv99+E8DI+GbgNQHzWpYyM7lGXW/itm3gu2jiT/a
MQdXRkXLl7+VW0BWe78C1qgrNWkJE9420hTBvv+zHV0CGz6HZ+ui9GEqaOTO0iWm
itBhv2XDOKcQ4DeLjKlXvZDghcP1HoZkTxszjpqUSXpGTKtFYXRqjl/zD4QG/Plo
pkMmpzvjlsICb/YqoODD
=14QC
-----END PGP SIGNATURE-----

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


Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
Okay. Here you go -

myMac:runtime test$ bin/catalina.sh run
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
Feb 14, 2014 2:47:46 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java



On Fri, Feb 14, 2014 at 2:46 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Pooja,
>
> On 2/14/14, 5:31 PM, Pooja Swamy 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.
>
> First, make sure Tomcat isn't running (use ps to find it, kill to kill
> it if necessary). Then:
>
> $ bin/catalina.sh run
>
> This will run Tomcat on the console, dumping all logs directly into
> your terminal window. Once you do that, paste all the stuff it spits
> out into another message to the list.
>
> Then maybe we can help.
>
> Thus far, you've only said "it's not working" and haven't provided any
> detail at all.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJS/pzEAAoJEBzwKT+lPKRYFvIP/2GGdLRYW7zdam0bLuNhktWT
> A6KC1PU37mHyJj6seiydXAP0AuS3Iz0K2XqAfL0++MpijoMeABdTMqNdkN3gzsnJ
> 0z5uDUm7IqEo/wgcRvp0WizgCRVkZ29W5h7tDbXJQXB78BMBKVtFIE2emqjAlK2F
> 6vLEHTIbp0vEAxsalUNLpt45OLPXSlZX7cxvZh/tQVsWtcYHP8U+LBsotsI/9bY7
> 8TPH103tZgzlQA3TS5cFR08l2wEyQgnEOlLrnEfCqHFbf3ytzNa2REYnZFk37t0e
> 3UAUoaGXs/XMzDY0hztTyyGNxgAd1+UWaL4e5Uot/bMMc1kgDLPe35FESr8Z1Hf9
> JMnLxb7YaXuSPeJf5sWrD1Y6bCZfRB156ycfB7pRcdxdEaslaAk0vmXuGO1IVLmC
> kLOMnedtPlvc52yX6Q1kK9WRdSem5p55rfsVJpeColYtNv/DHjSTPYWyWYA4DExu
> iUdCaBLqR1HZ6rKiVcL0IQRMpXDLjX1uJ0ihUp9PVhxIqwft11Www9Hqwle+99M9
> SwY4jzkN9F2QaA6l1XxDZG64H40ekh0fKgNYoV5l+MW0rD2EORNApz3kQs5aoIi4
> w7tNFzNn4Psd2PtGhguP8uDJsNa1V7LNAVCtk4AtjNHN1o87iQzKyWgvaMdi6BER
> K3dlWeKJAx4slCVAoQhv
> =lnlv
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Unable to shutdown Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Pooja,

On 2/14/14, 5:31 PM, Pooja Swamy 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.

First, make sure Tomcat isn't running (use ps to find it, kill to kill
it if necessary). Then:

$ bin/catalina.sh run

This will run Tomcat on the console, dumping all logs directly into
your terminal window. Once you do that, paste all the stuff it spits
out into another message to the list.

Then maybe we can help.

Thus far, you've only said "it's not working" and haven't provided any
detail at all.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS/pzEAAoJEBzwKT+lPKRYFvIP/2GGdLRYW7zdam0bLuNhktWT
A6KC1PU37mHyJj6seiydXAP0AuS3Iz0K2XqAfL0++MpijoMeABdTMqNdkN3gzsnJ
0z5uDUm7IqEo/wgcRvp0WizgCRVkZ29W5h7tDbXJQXB78BMBKVtFIE2emqjAlK2F
6vLEHTIbp0vEAxsalUNLpt45OLPXSlZX7cxvZh/tQVsWtcYHP8U+LBsotsI/9bY7
8TPH103tZgzlQA3TS5cFR08l2wEyQgnEOlLrnEfCqHFbf3ytzNa2REYnZFk37t0e
3UAUoaGXs/XMzDY0hztTyyGNxgAd1+UWaL4e5Uot/bMMc1kgDLPe35FESr8Z1Hf9
JMnLxb7YaXuSPeJf5sWrD1Y6bCZfRB156ycfB7pRcdxdEaslaAk0vmXuGO1IVLmC
kLOMnedtPlvc52yX6Q1kK9WRdSem5p55rfsVJpeColYtNv/DHjSTPYWyWYA4DExu
iUdCaBLqR1HZ6rKiVcL0IQRMpXDLjX1uJ0ihUp9PVhxIqwft11Www9Hqwle+99M9
SwY4jzkN9F2QaA6l1XxDZG64H40ekh0fKgNYoV5l+MW0rD2EORNApz3kQs5aoIi4
w7tNFzNn4Psd2PtGhguP8uDJsNa1V7LNAVCtk4AtjNHN1o87iQzKyWgvaMdi6BER
K3dlWeKJAx4slCVAoQhv
=lnlv
-----END PGP SIGNATURE-----

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


Re: Unable to shutdown Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Pooja,

On 2/14/14, 5: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

Please
> 
try running it like this, like I suggested:

/Users/test/software/runtime$ bin/startup.sh run

Please note that the "run" argument */is completely essential/*. you
should have at least 2KiB worth of logs spewing out that you can paste
back to the list.

Honestly, this is becoming tiresome trying to extract information from
you to try to help.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTAh8LAAoJEBzwKT+lPKRYAyAQAIQGVWP1XtLDB+r+6uRiZfSX
tc8Yd2PGh9UjAv7ARKP6gJeRvERwI4A8gsRXriOJqJ9dDQ3jRNCYDvxweYogi5jN
2pbm3dryxtAkMPDcB+i5w/xpyuKX80jF1xeCG/3lRqZeDC7vjwAUfyiCOHSvwSxq
m15FiCORjimuHmomGArD259XnDIEebH/bZ5QDLpWZBLfdagPikdwgXPj4ns13Yzn
M0hXV4wZk8Av2OdsQENqHedWzbHiIN+gHix/vVCgK+JU6PVkK8e0Uq2BtdiDAE/+
yb9NbZT1zfNZM0WbAj3iNNZ4l9eL0CNeVBOAEMXerdrYWKdFHKuv4dOsSpZPbgUj
Tv43cUeC8v2qdTlIKf7G/+X0npnCRKqqX6fst9ISuR7TKTg/iM/bp1blW6yR+X12
EIpJIifFG4ffACns9XaimkEd6ZGLc8HmwTEz+J6CFc7Paa51RAMC5hkrpRFJ02dA
9o2BToFSPKTHCbhFZR3yL4Xli8enW2h6EdjFT4FIs9SVtktejU3/71E4YkJLQiuK
pAWx0sHBKtbyWw1ndvydS2/uXnkZocr7zq5Ug+B+tSXvgwu41js5GHngWhAXLh5K
QQD4sYODQ84bSdrRsx7ATvOGL5/Nxp6qzli8AyfC8aCzeG3wZh4eVDSMZY1dZc8J
M5EuDZrCGiYD2gnkN++z
=L5CI
-----END PGP SIGNATURE-----

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


Re: Unable to shutdown Tomcat

Posted by Neven Cvetkovic <ne...@gmail.com>.
On Fri, Feb 14, 2014 at 6:37 PM, Pooja Swamy <po...@gmail.com> 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
>

Pooja,

Your initial CATALINA_HOME was: /Users/test/software/tomcat
Now you are running from a different directory:
 /Users/test/software/runtime

What's the difference now?

You mentioned you changed the port to 18000, where did you do that? What
did you change? Why did you change that?


Can you confirm that your Tomcat is not starting up, with either of three
commands:


1. sudo ps -ef | grep catalina   (here's sample output)

501 36371 35319   0  7:01pm ttys003    0:05.22
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java
-Djava.util.logging.config.file=/Users/test/software/tomcat/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.endorsed.dirs=/Users/test/software/tomcat/endorsed
-classpath /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
-Dcatalina.base=/Users/test/software/tomcat
-Dcatalina.home=/Users/test/software/tomcat
-Djava.io.tmpdir=/Users/test/software/tomcat/temp
org.apache.catalina.startup.Bootstrap start

2. sudo lsof -iTCP -sTCP:LISTEN -P -n | grep 8080   (here's sample output)

java      36371 test   48u  IPv6 0xff43c4aa9610cc0b      0t0  TCP *:8080
(LISTEN)


3. sudo netstat -an | grep 8080             (sample output)

tcp46      0      0  *.8080                 *.*                    LISTEN



NOTE: I prefer lsof over netstat on Mac, as I can see the process number
that is bound to the specific port number in one command. I did not dig
into Mac version of netstat to see other switches (netstat -vatpn doesn't
work on Mac like on Linux).


This will make sure that you Tomcat is started.


Is your TOMCAT running after you started it?


If that's not the case, you need to see why you Tomcat doesn't start.


Your earlier console output from
/Users/test/software/tomcat/bin/catalina.sh run was not complete.


Good luck!

Re: Unable to shutdown Tomcat

Posted by Mark Eggers <it...@yahoo.com>.
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 <it...@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 <it...@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 <po...@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 <po...@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


Re: Unable to shutdown Tomcat

Posted by André Warnier <aw...@ice-sa.com>.
Pooja,

*STOP*.  *PAUSE*.  Please.

Stop changing the configurations and the servers, and take some time to do things 
systematically, step by step, and answer the questions without changing the data in the 
meantime, and without overwhelming us with confusing answers.

Suggestion :

1) choose one server and one configuration, and stick to it, no matter what happens, until 
we tell you otherwise.

2) when asked to do something or to answer a question, do it, post your message to the 
list, and do nothing else until you get the next response.
In particular, do not change the configuration or make another test in the meantime.
This is confusing for everyone.  We don't know what you are answering to anymore.

3) after you have chosen one server and one configuration :
- if needed, stop Tomcat by whatever means you can (reboot the system, if you have to)
- find and delete *all* the tomcat logs
- copy and paste the content of the Tomcat "server.xml" file here, in-between the BEGIN 
and END tags :

BEGIN

END

(remove any confidential parts, like passwords, hostnames, and *remove all XML comments*)

4) start tomcat, using "startup.sh".  Do this only *one* time, not many times.

then cut and paste the screen output of that command here, between BEGIN and END

BEGIN

END

5) enter this command :
netstat -t -pan | grep LISTEN

then cut and paste the response lines here, between BEGIN and END

BEGIN

END

6) enter this command :
ps -ef | grep 'tomcat'

then copy and paste the response lines here, between BEGIN and END

BEGIN

END


7) find the tomcat logfiles. They should all be brand-new, since you have deleted them 
before starting tomcat. (You did, didn't you ?).
Find the one which contains a message like : INFO: Starting service Catalina
in the first 10-20 lines.
Copy and paste that whole file here, between BEGIN and END :

BEGIN

END


The above will tell us, once and for all, if your tomcat is running or not, and on what 
ports it is - or should be - listening.


8) then, *do not* change anything or do anything until someone comments or asks for more.

Note that in all the above, it says "copy and paste", not "attach".



Pooja Swamy wrote:
> I changed my port to 1800.
> 
> 1. I got it from another server that is also running the same version.
...

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


Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
I changed my port to 1800.

1. I got it from another server that is also running the same version.
2.b.
myMac@test:/Users/test/software/tomcat/bin>netstat -an | grep LISTEN
tcp46      0      0  *.3283                 *.*                    LISTEN

tcp46      0      0  *.80                   *.*                    LISTEN

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


On Fri, Feb 14, 2014 at 3:43 PM, Mark Eggers <it...@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 <it...@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 <po...@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 <po...@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
>
>

Re: Unable to shutdown Tomcat

Posted by Mark Eggers <it...@yahoo.com>.
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 <it...@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 <po...@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 <po...@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


Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
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?


On Fri, Feb 14, 2014 at 3:32 PM, Mark Eggers <it...@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 <po...@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 <po...@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
>
>

Re: Unable to shutdown Tomcat

Posted by Mark Eggers <it...@yahoo.com>.
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.org output 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 <po...@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 <po...@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


Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
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.


On Fri, Feb 14, 2014 at 2:31 PM, Pooja Swamy <po...@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 <po...@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!
>>
>
>

Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
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
<ne...@gmail.com>wrote:

> On Fri, Feb 14, 2014 at 3:10 PM, Pooja Swamy <po...@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!
>

Re: Unable to shutdown Tomcat

Posted by Neven Cvetkovic <ne...@gmail.com>.
On Fri, Feb 14, 2014 at 3:10 PM, Pooja Swamy <po...@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!

Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
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 -

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.


On Fri, Feb 14, 2014 at 12:02 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Leo,
>
> On 2/14/14, 1:52 PM, Leo Medina wrote:
> > Hello have you tried:
> >
> > ps -ef | grep <port number>
> >
> > kill -9 <port number>
>
> That should be "kill -9 <pid>", though I'm interested to see what
> happens if you try to kill by port number.
>
> - -chris
>
> > On Fri, Feb 14, 2014 at 10:44 AM, Pooja Swamy
> > <po...@gmail.com> wrote:
> >
> >> I am unable to shutdown my tomcat gracefully. Everytime I try to
> >> shutdown tomcat, this is the error I get.
> >>
> >> test@17.198.48.77:/Users/test/software/tomcat/bin>./startup.sh
> >> Using CATALINA_BASE:   /Users/test/software/tomcat Using
> >> CATALINA_HOME:   /Users/test/software/tomcat Using
> >> CATALINA_TMPDIR: /Users/test/software/tomcat/temp Using
> >> JRE_HOME:
> >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> >>
> >>
> Using CLASSPATH:
> >>
> >>
> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
> >>
> >>
> test@17.198.48.77:/Users/test/software/tomcat/bin>./shutdown.sh
> >> Using CATALINA_BASE:   /Users/test/software/tomcat Using
> >> CATALINA_HOME:   /Users/test/software/tomcat Using
> >> CATALINA_TMPDIR: /Users/test/software/tomcat/temp Using
> >> JRE_HOME:
> >> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> >>
> >>
> Using CLASSPATH:
> >>
> >>
> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
> >>
> >>
> Feb 14, 2014 6:37:52 PM org.apache.catalina.startup.Catalina stopServer
> >> SEVERE: Catalina.stop: java.net.ConnectException: Connection
> >> refused at java.net.PlainSocketImpl.socketConnect(Native Method)
> >> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
> >> at
> >> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
> >>
> >>
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
> >> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431) at
> >> java.net.Socket.connect(Socket.java:527) at
> >> java.net.Socket.connect(Socket.java:476) at
> >> java.net.Socket.<init>(Socket.java:373) at
> >> java.net.Socket.<init>(Socket.java:187) at
> >> org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499)
> >>
> >>
> 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.stopServer(Bootstrap.java:371)
> >>
> >>
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:453)
> >>
> >>
> >> I have also tried killing, restarting, and ./shutdown.sh,
> >> installing tomcat again, changing port number. Nothing seems to
> >> be helping. Please advise.
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJS/nZDAAoJEBzwKT+lPKRYpSkP/3LxGfH57/4MRqeK3c8fjY/V
> eAr/ovAJLfnxY3M3JJzZN4DqV0bdynZlsmb5pVKyedjKvCrorq6k8W5LbRAx37UI
> EYFLUjIiHVeWbtQ5nNBMLnlExCkqpe76KB2+SXG6jipxGvKMTADpkK7+SZ3Ze3R4
> PzmSslrD35tBNsxV8Er+5Jl/sAgMk7QSbPbcyRhAhFHY8ywRTd4RHPOFNmxidx57
> 4JM8yG7AJLmLmhXMJHcKe6wZ4OPrLl0GpAA7n5v1+qqQh/G/h6u0eNZ6xHMu2awT
> NgqQxUaopy6XN46Qpew2jUNqaXUIQ/vsiIlSa8jIq8R6zvyx8MowER5mc5hPbxbp
> NlAO6mYp3DNvCTy6+EQ0hQbsPlL0G39ehxQbRW6Rearb/i8sWF7crnwVwn1g80NV
> mhZ80S/a0VRxBCYo/XgkiBpbdciFczpFBpMZ2zUvLO0rICyHwEhBe37k1va7I5H8
> zCi3lSaiBSF3dhuuTZBd9EIFVsSMeB3qIUkgSaTKlmgjtxi0RIuTzGWN+IJKCNpV
> O8n8tSbEY5eXvytTzGICsJBpSQQJI1VGrWZBXX1SshALm8obWZ8htQZ3xqWRo5Kx
> hNiOKhjdx8f83dsRLM9NaBeGvWI12Nrwpa0wmPXfKaQ3ZjusZRqPi5pDnjCRTV0n
> AZC42Wgh9930Q2SRUg1n
> =t7N6
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
BTW, you need to read the whole thread before responding to intermediate
entries - we're way beyond that point. - I agree. Thanks Charles.


On Fri, Feb 14, 2014 at 12:08 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Christopher Schultz [mailto:chris@christopherschultz.net]
> > Subject: Re: Unable to shutdown Tomcat
>
> > On 2/14/14, 1:52 PM, Leo Medina wrote:
> > > Hello have you tried:
> > > ps -ef | grep <port number>
> > > kill -9 <port number>
>
> > That should be "kill -9 <pid>", though I'm interested to see what
> > happens if you try to kill by port number.
>
> Somebody dies...
>
> BTW, you need to read the whole thread before responding to intermediate
> entries - we're way beyond that point.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Unable to shutdown Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chuck,

On 2/14/14, 3:08 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
>> Subject: Re: Unable to shutdown Tomcat
> 
>> On 2/14/14, 1:52 PM, Leo Medina wrote:
>>> Hello have you tried: ps -ef | grep <port number> kill -9 <port
>>> number>
> 
>> That should be "kill -9 <pid>", though I'm interested to see
>> what happens if you try to kill by port number.
> 
> Somebody dies...
> 
> BTW, you need to read the whole thread before responding to
> intermediate entries - we're way beyond that point.

Yeah, I was a little late to the party.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS/o77AAoJEBzwKT+lPKRYAnwP/RuPxNL/QbCsvBQxe2oT5A8k
QXUjAakf4WM3rhpnXundd2KajP7dHgL9T8psQG1GeMUqrdlZYwPzQ8yJu5gHwE9L
6AAlV5NVqBLB0DlGjrhIGVxZd3LN2895PaLTnF2J1m7/O5jKO4jTIv4Pl/hShdPI
VMs6eYZ1qZSHInWKAErNmhcM5Hl4iKoeoyoIzCg/CvJ5UdbaJzt4tA1WGLCxoDA+
SdJ+tzxlu31pWjDfkBM1KhlYo+qFMcqqoxT9oHzFLkBsSmSmsrVgtiqfoiSBTVVg
DlnYTu8FeUYxCBNqVzdBLjb+2aXaqaYB7MR8HbsBBMlALtgbd4liPRDl7deRU7I0
BmVGsnOKwsVW1RP34m0eUmsYp2P1gEZ4+WppOjfxGkZWgftQ2G1ks2kP1HP+Ofai
rhDc0iRyJa+amB19YSUwX0Qi3mQTls3BTRnBnQGRo7tMJlCoQQiZIcgAfTnATa+R
pGmaa6NzOVc6NmBXnHVb7BUJjr551jjgMLVewsMW7/1k9X6/tlsYQh/K7Ovgc5Pc
n89qkT9ZfxlhyEh7XqeM8EBVVD+R2+irXazfZOyZqc1zLkzELYpcxVW5Z+SNzIKI
pwNDKMkxWYHenjlcjOSdbSF+MenetavS1xUHG/TW0Gq+lbzq/VKuJ7fgba2usR3A
3oKXuQlAg2/DWg4lD6HK
=brCT
-----END PGP SIGNATURE-----

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


RE: Unable to shutdown Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: Unable to shutdown Tomcat

> On 2/14/14, 1:52 PM, Leo Medina wrote:
> > Hello have you tried:
> > ps -ef | grep <port number>
> > kill -9 <port number>

> That should be "kill -9 <pid>", though I'm interested to see what
> happens if you try to kill by port number.

Somebody dies...

BTW, you need to read the whole thread before responding to intermediate entries - we're way beyond that point.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Unable to shutdown Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Leo,

On 2/14/14, 1:52 PM, Leo Medina wrote:
> Hello have you tried:
> 
> ps -ef | grep <port number>
> 
> kill -9 <port number>

That should be "kill -9 <pid>", though I'm interested to see what
happens if you try to kill by port number.

- -chris

> On Fri, Feb 14, 2014 at 10:44 AM, Pooja Swamy
> <po...@gmail.com> wrote:
> 
>> I am unable to shutdown my tomcat gracefully. Everytime I try to
>> shutdown tomcat, this is the error I get.
>> 
>> test@17.198.48.77:/Users/test/software/tomcat/bin>./startup.sh 
>> Using CATALINA_BASE:   /Users/test/software/tomcat Using
>> CATALINA_HOME:   /Users/test/software/tomcat Using
>> CATALINA_TMPDIR: /Users/test/software/tomcat/temp Using
>> JRE_HOME: 
>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
>>
>> 
Using CLASSPATH:
>> 
>> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
>>
>> 
test@17.198.48.77:/Users/test/software/tomcat/bin>./shutdown.sh
>> Using CATALINA_BASE:   /Users/test/software/tomcat Using
>> CATALINA_HOME:   /Users/test/software/tomcat Using
>> CATALINA_TMPDIR: /Users/test/software/tomcat/temp Using
>> JRE_HOME: 
>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
>>
>> 
Using CLASSPATH:
>> 
>> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
>>
>> 
Feb 14, 2014 6:37:52 PM org.apache.catalina.startup.Catalina stopServer
>> SEVERE: Catalina.stop: java.net.ConnectException: Connection
>> refused at java.net.PlainSocketImpl.socketConnect(Native Method) 
>> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382) 
>> at
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
>>
>> 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431) at
>> java.net.Socket.connect(Socket.java:527) at
>> java.net.Socket.connect(Socket.java:476) at
>> java.net.Socket.<init>(Socket.java:373) at
>> java.net.Socket.<init>(Socket.java:187) at
>> org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499)
>>
>> 
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.stopServer(Bootstrap.java:371)
>>
>> 
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:453)
>> 
>> 
>> I have also tried killing, restarting, and ./shutdown.sh,
>> installing tomcat again, changing port number. Nothing seems to
>> be helping. Please advise.
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS/nZDAAoJEBzwKT+lPKRYpSkP/3LxGfH57/4MRqeK3c8fjY/V
eAr/ovAJLfnxY3M3JJzZN4DqV0bdynZlsmb5pVKyedjKvCrorq6k8W5LbRAx37UI
EYFLUjIiHVeWbtQ5nNBMLnlExCkqpe76KB2+SXG6jipxGvKMTADpkK7+SZ3Ze3R4
PzmSslrD35tBNsxV8Er+5Jl/sAgMk7QSbPbcyRhAhFHY8ywRTd4RHPOFNmxidx57
4JM8yG7AJLmLmhXMJHcKe6wZ4OPrLl0GpAA7n5v1+qqQh/G/h6u0eNZ6xHMu2awT
NgqQxUaopy6XN46Qpew2jUNqaXUIQ/vsiIlSa8jIq8R6zvyx8MowER5mc5hPbxbp
NlAO6mYp3DNvCTy6+EQ0hQbsPlL0G39ehxQbRW6Rearb/i8sWF7crnwVwn1g80NV
mhZ80S/a0VRxBCYo/XgkiBpbdciFczpFBpMZ2zUvLO0rICyHwEhBe37k1va7I5H8
zCi3lSaiBSF3dhuuTZBd9EIFVsSMeB3qIUkgSaTKlmgjtxi0RIuTzGWN+IJKCNpV
O8n8tSbEY5eXvytTzGICsJBpSQQJI1VGrWZBXX1SshALm8obWZ8htQZ3xqWRo5Kx
hNiOKhjdx8f83dsRLM9NaBeGvWI12Nrwpa0wmPXfKaQ3ZjusZRqPi5pDnjCRTV0n
AZC42Wgh9930Q2SRUg1n
=t7N6
-----END PGP SIGNATURE-----

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


Re: Unable to shutdown Tomcat

Posted by Leo Medina <le...@gmail.com>.
Hello have you tried:

ps -ef | grep <port number>

kill -9 <port number>


On Fri, Feb 14, 2014 at 10:44 AM, Pooja Swamy <po...@gmail.com> wrote:

> I am unable to shutdown my tomcat gracefully. Everytime I try to shutdown
> tomcat, this is the error I get.
>
> test@17.198.48.77:/Users/test/software/tomcat/bin>./startup.sh
> Using CATALINA_BASE:   /Users/test/software/tomcat
> Using CATALINA_HOME:   /Users/test/software/tomcat
> Using CATALINA_TMPDIR: /Users/test/software/tomcat/temp
> Using JRE_HOME:
>  /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> Using CLASSPATH:
>
> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
> test@17.198.48.77:/Users/test/software/tomcat/bin>./shutdown.sh
> Using CATALINA_BASE:   /Users/test/software/tomcat
> Using CATALINA_HOME:   /Users/test/software/tomcat
> Using CATALINA_TMPDIR: /Users/test/software/tomcat/temp
> Using JRE_HOME:
>  /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> Using CLASSPATH:
>
> /Users/test/software/tomcat/bin/bootstrap.jar:/Users/test/software/tomcat/bin/tomcat-juli.jar
> Feb 14, 2014 6:37:52 PM org.apache.catalina.startup.Catalina stopServer
> SEVERE: Catalina.stop:
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431)
> at java.net.Socket.connect(Socket.java:527)
> at java.net.Socket.connect(Socket.java:476)
> at java.net.Socket.<init>(Socket.java:373)
> at java.net.Socket.<init>(Socket.java:187)
> at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499)
> 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.stopServer(Bootstrap.java:371)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:453)
>
>
> I have also tried killing, restarting, and ./shutdown.sh, installing tomcat
> again, changing port number. Nothing seems to be helping. Please advise.
>

RE: Unable to shutdown Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Pooja Swamy [mailto:poojaswamy@gmail.com] 
> Subject: Unable to shutdown Tomcat

> Everytime I try to shutdown tomcat, this is the error I get.

> Feb 14, 2014 6:37:52 PM org.apache.catalina.startup.Catalina stopServer
> SEVERE: Catalina.stop:
> java.net.ConnectException: Connection refused

Exact Tomcat version?

JVM version?

Your server.xml contents, without comments?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
Btw, when I shutdown, I see this message everytime -

SEVERE: Could not contact localhost:8005. Tomcat may not be running.

So looks like the problem is with my startup. The startup is not happening
correctly.


On Fri, Feb 14, 2014 at 11:30 AM, Leo Medina <le...@gmail.com> wrote:

> Right....  thanks Chuck!
>
> I was referring to ps -ef | grep tomcat where in the past I have done it
> this way to issue a kill -9 on the pid as well as the netstat - vatpn |
> grep <port number> which also works perfectly.
>
> Thanks again!
>
>
> On Fri, Feb 14, 2014 at 11:16 AM, Neven Cvetkovic <
> neven.cvetkovic@gmail.com
> > wrote:
>
> > On Fri, Feb 14, 2014 at 2:03 PM, Caldarale, Charles R <
> > Chuck.Caldarale@unisys.com> wrote:
> >
> > > > From: Leo Medina [mailto:leo.medinah@gmail.com]
> > > > Subject: RE: Unable to shutdown Tomcat
> > >
> > > > Hello have you tried:
> > > > ps -ef | grep <port number>
> > > > kill -9 <port number>
> > >
> > > You must have extremely odd implementations of ps and kill if you
> expect
> > > that to do anything useful.  Are you confusing port number with pid?
> > >
> > >  - Chuck
> > >
> >
> > Nice catch Chuck.
> >
> > Leo, you probably confused two: netstat and ps commands.
> >
> > ps -ef | grep <port_number>
> >
> > would work only if you provide port number on the command line of your
> > program, and that's not the case in default out-of-box Tomcat (uses
> > server.xml to define port numbers)
> >
> > I would suggest:
> >
> > ps -ef | grep java
> >
> > would output the command line of all Java processes, and Tomcat is one of
> > them.
> > note the process id (PID) for your specific tomcat process
> >
> > and then try killing the process, e.g.
> >
> > kill <PID>
> > kill -9 <PID>
> >
> > I prefer looking at netstat, as I might have multiple Tomcat instances
> > running, so I want to know exactly which one I want to "kill" ...
> >
> > Netstat behaves differently on different OS. This is what I typically use
> > when troubleshooting my tomcat instances (knowing that it runs on port
> > 8080):
> >
> > netstat -aon | findstr 8080     (windows)
> > netstat -vatpn | grep 8080     (linux)
> > lsof -i TCP | grep 8080          (mac)
> >
> >
> > So, to further troubleshoot your problem - we need:
> >
> > 1) server.xml (as Chuck pointed out - without comments)
> > 2) startup logfile
> > 3) output of netstat (lsof) after the tomcat startup
> >
> > Good luck!
> >
>

Re: Unable to shutdown Tomcat

Posted by Leo Medina <le...@gmail.com>.
Right....  thanks Chuck!

I was referring to ps -ef | grep tomcat where in the past I have done it
this way to issue a kill -9 on the pid as well as the netstat - vatpn |
grep <port number> which also works perfectly.

Thanks again!


On Fri, Feb 14, 2014 at 11:16 AM, Neven Cvetkovic <neven.cvetkovic@gmail.com
> wrote:

> On Fri, Feb 14, 2014 at 2:03 PM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
> > > From: Leo Medina [mailto:leo.medinah@gmail.com]
> > > Subject: RE: Unable to shutdown Tomcat
> >
> > > Hello have you tried:
> > > ps -ef | grep <port number>
> > > kill -9 <port number>
> >
> > You must have extremely odd implementations of ps and kill if you expect
> > that to do anything useful.  Are you confusing port number with pid?
> >
> >  - Chuck
> >
>
> Nice catch Chuck.
>
> Leo, you probably confused two: netstat and ps commands.
>
> ps -ef | grep <port_number>
>
> would work only if you provide port number on the command line of your
> program, and that's not the case in default out-of-box Tomcat (uses
> server.xml to define port numbers)
>
> I would suggest:
>
> ps -ef | grep java
>
> would output the command line of all Java processes, and Tomcat is one of
> them.
> note the process id (PID) for your specific tomcat process
>
> and then try killing the process, e.g.
>
> kill <PID>
> kill -9 <PID>
>
> I prefer looking at netstat, as I might have multiple Tomcat instances
> running, so I want to know exactly which one I want to "kill" ...
>
> Netstat behaves differently on different OS. This is what I typically use
> when troubleshooting my tomcat instances (knowing that it runs on port
> 8080):
>
> netstat -aon | findstr 8080     (windows)
> netstat -vatpn | grep 8080     (linux)
> lsof -i TCP | grep 8080          (mac)
>
>
> So, to further troubleshoot your problem - we need:
>
> 1) server.xml (as Chuck pointed out - without comments)
> 2) startup logfile
> 3) output of netstat (lsof) after the tomcat startup
>
> Good luck!
>

RE: Unable to shutdown Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Pooja Swamy [mailto:poojaswamy@gmail.com] 
> Subject: Re: Unable to shutdown Tomcat

> I confirmed tomcat is running by doing ps -ef|grep tomcat

Have you confirmed that Tomcat is usable by going to http://localhost:8080 with a browser running on the same machine Tomcat is on?

You may have a local firewall blocking your ports.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
Here is my catalina.out

Feb 14, 2014 11:30:29 AM org.apache.catalina.core.AprLifecycleListener init

INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

I confirmed tomcat is running by doing ps -ef|grep tomcat

myMac@18.144.67.89:/Users/test/software/runtime/logs>ps -ef|grep tomcat

  501 29266 28511   0 11:51AM ttys002    0:00.00 grep tomcat

  501 29192     1   0 11:30AM ttys003    0:02.01
/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



On Fri, Feb 14, 2014 at 11:40 AM, Neven Cvetkovic <neven.cvetkovic@gmail.com
> wrote:

> On Feb 14, 2014 8:29 PM, "Pooja Swamy" <po...@gmail.com> wrote:
> >
> > Thank you so much for working with me on this. I am on mac OS, and I am
> > using tomcat-7.0.50
> >
> > 1. Here is my server.xml without comments -
> >
> > <?xml version='1.0' encoding='utf-8'?>
> >
> > <Server port="8005" shutdown="SHUTDOWN">
> >   <Listener className="org.apache.catalina.core.AprLifecycleListener"
> > SSLEngine="on" />
> >   <Listener className="org.apache.catalina.core.JasperListener" />
> >   <Listener
> > className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
> >   <Listener
> > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> />
> >   <Listener
> > className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
> >
> >   <GlobalNamingResources>
> >     <Resource name="UserDatabase" auth="Container"
> >               type="org.apache.catalina.UserDatabase"
> >               description="User database that can be updated and saved"
> >
> factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
> >               pathname="conf/tomcat-users.xml" />
> >   </GlobalNamingResources>
> >   <Service name="Catalina">
> >     <Connector port="8080" protocol="HTTP/1.1"
> >                connectionTimeout="20000"
> >                redirectPort="8443" />
>
> So it is port 8080.
>
> >     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
> >     <Engine name="Catalina" defaultHost="localhost">
> >       <Realm className="org.apache.catalina.realm.LockOutRealm">
> >         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> >                resourceName="UserDatabase"/>
> >       </Realm>
> >
> >       <Host name="localhost"  appBase="webapps"
> >             unpackWARs="true" autoDeploy="true">
> >         <Valve className="org.apache.catalina.valves.AccessLogValve"
> > directory="logs"
> >                prefix="localhost_access_log." suffix=".txt"
> >                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
> >
> >       </Host>
> >     </Engine>
> >   </Service>
> > </Server>
> >
> > 2. My startup port is 8080. Here is what I see after starting up - Its
> blank
> > myMAC-dev:bin test$ lsof -i TCP | grep 8080
> > myMAC-dev:bin test$
> >
>
> Are you sure your tomcat is running?
>
> How did you check that it is running?
>
> Try starting tomcat with this instead:
> ./catalina.sh run
>
> To see exactly startup errors.
>
> > 3. Where can I get startup log file?
> >
> >
>
> In tomcat log directory. See catalina.out
>
> E.g.
>
> tail -f catalina.out
>

RE: Unable to shutdown Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Neven Cvetkovic [mailto:neven.cvetkovic@gmail.com] 
> Subject: Re: Unable to shutdown Tomcat

> > On Feb 14, 2014 8:29 PM, "Pooja Swamy" <po...@gmail.com> wrote:
> > <Server port="8005" shutdown="SHUTDOWN">

The above is the shutdown port.

> >     <Connector port="8080" protocol="HTTP/1.1"

> So it is port 8080.

No, that is the HTTP port, not the shutdown one.  The OP has made no mention of not being able to access Tomcat via a browser.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Unable to shutdown Tomcat

Posted by Neven Cvetkovic <ne...@gmail.com>.
On Feb 14, 2014 8:29 PM, "Pooja Swamy" <po...@gmail.com> wrote:
>
> Thank you so much for working with me on this. I am on mac OS, and I am
> using tomcat-7.0.50
>
> 1. Here is my server.xml without comments -
>
> <?xml version='1.0' encoding='utf-8'?>
>
> <Server port="8005" shutdown="SHUTDOWN">
>   <Listener className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />
>   <Listener className="org.apache.catalina.core.JasperListener" />
>   <Listener
> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>   <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>   <Listener
> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
>
>   <GlobalNamingResources>
>     <Resource name="UserDatabase" auth="Container"
>               type="org.apache.catalina.UserDatabase"
>               description="User database that can be updated and saved"
>
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>               pathname="conf/tomcat-users.xml" />
>   </GlobalNamingResources>
>   <Service name="Catalina">
>     <Connector port="8080" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                redirectPort="8443" />

So it is port 8080.

>     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
>     <Engine name="Catalina" defaultHost="localhost">
>       <Realm className="org.apache.catalina.realm.LockOutRealm">
>         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
>                resourceName="UserDatabase"/>
>       </Realm>
>
>       <Host name="localhost"  appBase="webapps"
>             unpackWARs="true" autoDeploy="true">
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"
>                prefix="localhost_access_log." suffix=".txt"
>                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
>
>       </Host>
>     </Engine>
>   </Service>
> </Server>
>
> 2. My startup port is 8080. Here is what I see after starting up - Its
blank
> myMAC-dev:bin test$ lsof -i TCP | grep 8080
> myMAC-dev:bin test$
>

Are you sure your tomcat is running?

How did you check that it is running?

Try starting tomcat with this instead:
./catalina.sh run

To see exactly startup errors.

> 3. Where can I get startup log file?
>
>

In tomcat log directory. See catalina.out

E.g.

tail -f catalina.out

Re: Unable to shutdown Tomcat

Posted by Pooja Swamy <po...@gmail.com>.
Thank you so much for working with me on this. I am on mac OS, and I am
using tomcat-7.0.50

1. Here is my server.xml without comments -

<?xml version='1.0' encoding='utf-8'?>

<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener
className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>
    </Engine>
  </Service>
</Server>

2. My startup port is 8080. Here is what I see after starting up - Its blank
myMAC-dev:bin test$ lsof -i TCP | grep 8080
myMAC-dev:bin test$

3. Where can I get startup log file?





On Fri, Feb 14, 2014 at 11:16 AM, Neven Cvetkovic <neven.cvetkovic@gmail.com
> wrote:

> On Fri, Feb 14, 2014 at 2:03 PM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
> > > From: Leo Medina [mailto:leo.medinah@gmail.com]
> > > Subject: RE: Unable to shutdown Tomcat
> >
> > > Hello have you tried:
> > > ps -ef | grep <port number>
> > > kill -9 <port number>
> >
> > You must have extremely odd implementations of ps and kill if you expect
> > that to do anything useful.  Are you confusing port number with pid?
> >
> >  - Chuck
> >
>
> Nice catch Chuck.
>
> Leo, you probably confused two: netstat and ps commands.
>
> ps -ef | grep <port_number>
>
> would work only if you provide port number on the command line of your
> program, and that's not the case in default out-of-box Tomcat (uses
> server.xml to define port numbers)
>
> I would suggest:
>
> ps -ef | grep java
>
> would output the command line of all Java processes, and Tomcat is one of
> them.
> note the process id (PID) for your specific tomcat process
>
> and then try killing the process, e.g.
>
> kill <PID>
> kill -9 <PID>
>
> I prefer looking at netstat, as I might have multiple Tomcat instances
> running, so I want to know exactly which one I want to "kill" ...
>
> Netstat behaves differently on different OS. This is what I typically use
> when troubleshooting my tomcat instances (knowing that it runs on port
> 8080):
>
> netstat -aon | findstr 8080     (windows)
> netstat -vatpn | grep 8080     (linux)
> lsof -i TCP | grep 8080          (mac)
>
>
> So, to further troubleshoot your problem - we need:
>
> 1) server.xml (as Chuck pointed out - without comments)
> 2) startup logfile
> 3) output of netstat (lsof) after the tomcat startup
>
> Good luck!
>

Re: Unable to shutdown Tomcat

Posted by Neven Cvetkovic <ne...@gmail.com>.
On Fri, Feb 14, 2014 at 2:03 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Leo Medina [mailto:leo.medinah@gmail.com]
> > Subject: RE: Unable to shutdown Tomcat
>
> > Hello have you tried:
> > ps -ef | grep <port number>
> > kill -9 <port number>
>
> You must have extremely odd implementations of ps and kill if you expect
> that to do anything useful.  Are you confusing port number with pid?
>
>  - Chuck
>

Nice catch Chuck.

Leo, you probably confused two: netstat and ps commands.

ps -ef | grep <port_number>

would work only if you provide port number on the command line of your
program, and that's not the case in default out-of-box Tomcat (uses
server.xml to define port numbers)

I would suggest:

ps -ef | grep java

would output the command line of all Java processes, and Tomcat is one of
them.
note the process id (PID) for your specific tomcat process

and then try killing the process, e.g.

kill <PID>
kill -9 <PID>

I prefer looking at netstat, as I might have multiple Tomcat instances
running, so I want to know exactly which one I want to "kill" ...

Netstat behaves differently on different OS. This is what I typically use
when troubleshooting my tomcat instances (knowing that it runs on port
8080):

netstat -aon | findstr 8080     (windows)
netstat -vatpn | grep 8080     (linux)
lsof -i TCP | grep 8080          (mac)


So, to further troubleshoot your problem - we need:

1) server.xml (as Chuck pointed out - without comments)
2) startup logfile
3) output of netstat (lsof) after the tomcat startup

Good luck!

RE: Unable to shutdown Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Leo Medina [mailto:leo.medinah@gmail.com]
> Subject: RE: Unable to shutdown Tomcat

> Hello have you tried:
> ps -ef | grep <port number>
> kill -9 <port number>

You must have extremely odd implementations of ps and kill if you expect that to do anything useful.  Are you confusing port number with pid?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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