Re: Tomcat does not shutdown properly and kill -3 does not work!

2008-08-06 Thread Maduranga Kannangara
)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegisterSe
t(LinuxDebuggerLocal.java:437)
at 
sun.jvm.hotspot.debugger.linux.LinuxThread.getContext(LinuxThread.java:48)
at 
sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess.getCurrentFrame
Guess(LinuxX86JavaThreadPDAccess.java:75)
at 
sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.java:252)
at 
sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:211)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:50)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:41)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:58)
Caused by: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs 
failed for a lwp
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegisterSe
t0(Native Method)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.access$800(LinuxDebuggerLo
cal.java:34)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$1GetThreadIntegerRegisterS
etTask.doit(LinuxDebuggerLocal.java:431)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerTh
read.run(LinuxDebuggerLocal.java:109)


Thread 12675: (state = BLOCKED)
Error occurred during stack walking:
sun.jvm.hotspot.debugger.DebuggerException: 
sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerTh
read.execute(LinuxDebuggerLocal.java:134)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegisterSe
t(LinuxDebuggerLocal.java:437)
at 
sun.jvm.hotspot.debugger.linux.LinuxThread.getContext(LinuxThread.java:48)
at 
sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess.getCurrentFrame
Guess(LinuxX86JavaThreadPDAccess.java:75)
at 
sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.java:252)
at 
sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:211)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:50)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:41)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:58)
Caused by: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs 
failed for a lwp
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.getThreadIntegerRegisterSe
t0(Native Method)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.access$800(LinuxDebuggerLo
cal.java:34)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$1GetThreadIntegerRegisterS
etTask.doit(LinuxDebuggerLocal.java:431)
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerTh
read.run(LinuxDebuggerLocal.java:109)


Thread 12674: (state = BLOCKED)
Error occurred during stack walking:
sun.jvm.hotspot.debugger.DebuggerException: 
sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
at 
sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal$LinuxDebuggerLocalWorkerTh
read.execute(LinuxDebuggerLocal.java:134)
at sun.jvm.hotspot.debugger.li

Thanks
Muds


On 6/8/08 11:58, Maduranga Kannangara [EMAIL PROTECTED] wrote:

 Thanks a lot Peter! I got a thread dump using jstack 704 (PID was 704)
 I think I need a little more of your help to find out where exactly going
 wrong. Below is my dump and thanks a lot for your time.
 
 MadurangaMAC:bin Maduranga$ jstack 704
 Attaching to process ID 704, please wait...
 Debugger attached successfully.
 Server compiler detected.
 JVM version is 1.5.0_13-119
 Thread [EMAIL PROTECTED]: (state = BLOCKED)
 
 
 Thread [EMAIL PROTECTED]: (state = BLOCKED)
  - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
  - java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
  - org.apache.jk.common.ChannelSocket.accept(org.apache.jk.core.MsgContext)
 @bci=20, line=306 (Interpreted frame)
  - org.apache.jk.common.ChannelSocket.acceptConnections() @bci=72, line=666
 (Interpreted frame)
  - 
 org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(java.lang.Object[])
 @bci=4, line=876 (Interpreted frame)
  - org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() @bci=167,
 line=689 (Interpreted frame)
  - java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)
 
 
 Thread [EMAIL PROTECTED]: (state = BLOCKED)
  - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
  - 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(java.lang.Object
 []) @bci=23, line=62 (Interpreted frame)
  - org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() @bci=167,
 line=689 (Interpreted frame)
  - java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)
 
 
 Thread [EMAIL PROTECTED]: (state = BLOCKED)
  - java.lang.Object.wait(long) @bci=0 (Interpreted frame

Re: Tomcat does not shutdown properly and kill -3 does not work!

2008-08-06 Thread Maduranga Kannangara
Hi,

A friend of mine said it was not due to ActiveMQ that Tomcat does not
shutdown properly, however I added a kill command to shutdown.sh script
which is NOT good at all, I understand.

In MAC (10.5) kill -3 seems working, but its a blind path which gets me
nowhere. I do not get a trace of the threads. Its a wrong path I am
following. What I need simply is a clean shutdown on Tomcat :-)

Environment:
Tomcat: 5.5.20
JVM: 1.5.0_09-b01
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

Please help! :-)

Thanks again
Maduranga




On 5/8/08 10:59, Maduranga Kannangara [EMAIL PROTECTED] wrote:

 Hello,
 
 There is an issue with my Tomcat instance where I have to kill it using ­9
 all the time.
 
 This is my application environment:
 An active-mq queue is used inside my application war.
 Tomcat version: 5.x
 OS: Redhat Linux
 
 However I was unable to get trace using kill ­3 as I saw in some of the
 threads in this mailing list.
 
 How can I ensure proper shutdown of Tomcat?
 
 Thanks in advance!
 Maduranga
 


-- 
Koodos - stylish brads, smart prices
http://www.koodos.com



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat does not shutdown properly and kill -3 does not work!

2008-08-06 Thread Maduranga Kannangara
Thanks a lot Peter! I got a thread dump using jstack 704 (PID was 704)
I think I need a little more of your help to find out where exactly going
wrong. Below is my dump and thanks a lot for your time.

MadurangaMAC:bin Maduranga$ jstack 704
Attaching to process ID 704, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_13-119
Thread [EMAIL PROTECTED]: (state = BLOCKED)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
 - org.apache.jk.common.ChannelSocket.accept(org.apache.jk.core.MsgContext)
@bci=20, line=306 (Interpreted frame)
 - org.apache.jk.common.ChannelSocket.acceptConnections() @bci=72, line=666
(Interpreted frame)
 - 
org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(java.lang.Object[])
@bci=4, line=876 (Interpreted frame)
 - org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() @bci=167,
line=689 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
 - 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(java.lang.Object
[]) @bci=23, line=62 (Interpreted frame)
 - org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() @bci=167,
line=689 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=613 (Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.util.TimerThread.mainLoop() @bci=201, line=509 (Interpreted frame)
 - java.util.TimerThread.run() @bci=1, line=462 (Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
 - org.quartz.core.QuartzSchedulerThread.run() @bci=870, line=420
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - org.quartz.simpl.SimpleThreadPool$WorkerThread.run() @bci=44, line=523
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Interpreted
frame)
 - java.lang.ref.ReferenceQueue.remove() @bci=2, line=132 (Interpreted
frame)
 - java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159
(Interpreted frame)


Thread [EMAIL PROTECTED]: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
 - java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116
(Interpreted frame)


Thanks again
Muds


On 6/8/08 11:27, Peter Crowther [EMAIL PROTECTED] wrote:

 From: Maduranga Kannangara [mailto:[EMAIL PROTECTED]
 What I need simply is a clean shutdown on Tomcat :-)
 
 Yes.  In order to *get* that clean shutdown, you need to find out what's
 preventing it :-).
 
 One common problem is that something in your webapp has created a thread and
 not marked it as a daemon thread
 (http://java.sun.com/j2se/1.4.2/docs/api/java/lang

Re: configure tomcat

2008-08-05 Thread Maduranga Kannangara
Also a tiny note: 
It should be localhost:8080 and not localhost/8080
(Hope you tried the first way?)

Cheers

-- 
Koodos - stylish brads, smart prices
http://www.Koodos.com




On 5/8/08 03:37, Nadun Herath [EMAIL PROTECTED] wrote:

 David and others
 Thanks a lot. I will remove that from classpath and see.
 Thanks again.
 
 On Mon, Aug 4, 2008 at 6:16 PM, David Smith [EMAIL PROTECTED] wrote:
 
 A couple of suggestions:
 
 1. Drop the CLASSPATH from bashrc.  It'll cause all sorts of weird
 problems.  Plus the jars you added are automatically added by tomcat's own
 internal classloader.  No need to explicitly declare them anyway.
 
 2. Check you logs for what happened during startup up to the moment of your
 request.  That should help a lot in determining what happened.
 
 --David
 
 
 Nadun Herath wrote:
 
 I am a newbie to tomcat. I installed it ubuntu
 
 added the following line to bashrc file
 
 export
 CLASSPATH=/usr/local/tomcat/common/lib/jsp-api.jar:/usr/local/tomcat/common/
 lib/servlet-api.jar
 
 
 When I run startup.sh it runs ok. Giving this message
 
 Using CATALINA_BASE:   /usr/local/tomcat
 Using CATALINA_HOME:   /usr/local/tomcat
 Using CATALINA_TMPDIR: /usr/local/tomcat/temp
 Using JRE_HOME:   /usr/lib/jvm/java-6-sun
 
 But when I type localhost/8080 it says can't connect. What is the problem.
 Please help. I thank you in advance.
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat does not shutdown properly and kill -3 does not work!

2008-08-05 Thread Maduranga Kannangara
Tomcat: 5.5.20
JVM: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

However, this also same behavior on OSX 10.5 as well.
With JVM: Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_13-b05-237)

I need more of a tracing mechanism at the moment, as the good kill -3 seem
no good with my environment :-(

Thanks


On 5/8/08 11:21, Peter Crowther [EMAIL PROTECTED] wrote:

 From: Maduranga Kannangara [mailto:[EMAIL PROTECTED]
 There is an issue with my Tomcat instance where I have to
 kill it using 9 all the time.
 
 This is my application environment:
 An active-mq queue is used inside my application war.
 Tomcat version: 5.x
 OS: Redhat Linux
 
 It would help if you were more specific with your versions - Tomcat 5.0.x and
 5.5.x are significantly different, and RedHat has put out a *lot* of Linux
 versions over the years.
 
 However I was unable to get trace using kill 3 as I saw in
 some of the threads in this mailing list.
 
 How can I ensure proper shutdown of Tomcat?
 
 What JVM are you using?  In particular, I don't think the GNU JVM that comes
 with some versions of RedHat supports giving a thread dump on kill -QUIT.
 
 - Peter
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat does not shutdown properly and kill -3 does not work!

2008-08-05 Thread Maduranga Kannangara
Hello,

There is an issue with my Tomcat instance where I have to kill it using ­9
all the time.

This is my application environment:
An active-mq queue is used inside my application war.
Tomcat version: 5.x
OS: Redhat Linux

However I was unable to get trace using kill ­3 as I saw in some of the
threads in this mailing list.

How can I ensure proper shutdown of Tomcat?

Thanks in advance!
Maduranga


-- 
Koodos - stylish brads, smart prices
http://www.Koodos.com