RE: tomcat shutdown

2003-08-14 Thread Strecker, Mark
open a command window as ntpriv or whoever the service is owned by :
set stop tomcat service name

To start :
net start tomcat service name

Mark

-Original Message-
From: Chris Daly [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 11:05 AM
To: mailto:@magic.lif.icnet.uk
Subject: tomcat shutdown


hi

i have two instances of tomcat runnign as a stand olone but on different 
ports - i can neither stop nor start either tomcat as all that i'm getting is

Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
   at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
 at java.net.Socket.init(Socket.java:273)
 at java.net.Socket.init(Socket.java:100)
 at org.apache.catalina.startup.Catalina.stop(Catalina.java:831)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:683)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

how do i stop the service  ?  i'm trying to use bin/shutdown.sh but its not 
working.

i have two instances of tomcat runnign as a stand olone but on different ports

cheers

chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat service running at 100% cpu ... formerly RE: -Xincgc, -Xms600, -Xmx600

2003-06-06 Thread Strecker, Mark
Here's the situation :
Tomcat 4.x installed as windows service running continuously at 100% cpu for no 
apparent reason.
Apache forwarding requests to tomcat via jk.

I have some thread dumps that look very interesting. It appears that there is a thread 
issue with jk. Open normal.txt and onehundred.txt in a comparison tool like xdiff and 
you will see what I am talking about.

I attached 3 thread dumps :
- normal.txt is the thread dump when tomcat is running as expected
- onehundred.txt is the thread dump when tomcat is at 100% cpu. NOTE that no 
applications are running inside Tomcat.
- moreinfo.txt is the thread dump after I logged into the admin page to check the 
debug options for the jk Connector. Interestingly enough, the Connector page didn't 
load when I clicked on it(exceptions logged) AND there are even more threads in a wait 
state.


I am looking for suggestions on what to do next. Any thoughts/suggestions are welcome.

TIA,
Mark

PS. Thanks to John Smith for the tip on this, 
http://www.mycgiserver.com/~tmitevski/adaptj/ , thread dump tool.

Full thread dump:

Stack Trace Remote Thread prio=5 tid=0x2763f1d0 nid=0x51c runnable [0..0x2adbfc44]

MonitorRunnable daemon prio=5 tid=0x27937c28 nid=0x7d0 waiting on monitor 
[0x2ac5f000..0x2ac5fdc4]
at java.lang.Object.wait(Native Method)
at 
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:420)
at java.lang.Thread.run(Thread.java:479)

Thread-9 daemon prio=5 tid=0x27d4b950 nid=0x7d4 runnable [0x2ab5f000..0x2ab5fdc4]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:463)
at java.net.ServerSocket.implAccept(ServerSocket.java:238)
at java.net.ServerSocket.accept(ServerSocket.java:217)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:268)
at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:559)
at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:688)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:479)

Thread-8 daemon prio=5 tid=0x27d4b818 nid=0x7d8 runnable [0x2aa5f000..0x2aa5fdc4]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
at java.io.BufferedInputStream.read(BufferedInputStream.java:275)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:526)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:464)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:579)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:479)

Thread-7 daemon prio=5 tid=0x27ab9960 nid=0x7dc runnable [0x2a95f000..0x2a95fdc4]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
at java.io.BufferedInputStream.read(BufferedInputStream.java:275)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:526)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:464)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:579)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:479)

Thread-6 daemon prio=5 tid=0x27ab9018 nid=0x770 waiting on monitor 
[0x2a85f000..0x2a85fdc4]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:415)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:509)
at java.lang.Thread.run(Thread.java:479)

MonitorRunnable daemon prio=5 tid=0x27a4ac70 nid=0x7e4 waiting on monitor 
[0x2a75f000..0x2a75fdc4]
at java.lang.Object.wait(Native Method)
at 
org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:420)
at java.lang.Thread.run(Thread.java:479)

Thread-4 daemon prio=5 tid=0x27a1dc48 nid=0x7ec runnable [0x2a65f000..0x2a65fdc4]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:463)
at java.net.ServerSocket.implAccept(ServerSocket.java:238)
at java.net.ServerSocket.accept(ServerSocket.java:217)
at 

RE: Sharing a connection pool among contexts

2003-06-06 Thread Strecker, Mark
I have a simple solution for you. All you need to do is create a global DataSource 
then go to your context and add it as a Resource Link. You can share it between as 
many contexts as you want. In Tomcat 4.x and above, this is quite simple with the 
admin app ... otherwise, you have to go add it by hand.

Mark

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 3:42 PM
To: Tomcat Users List
Subject: Re: Sharing a connection pool among contexts


I do it in a different way :

I have a servlet in charge to set all pools, and I have a class with  
statics methods to manage the pools, creating, test, and show their use.
This class is shared with all contexts through a jar in common/lib.

So I have a servlet, with all configuration of the pools in param in the 
web.xml. this servlet can create pools (in its init method), test and 
show it, and show statistics.
I works great, and I can share a pool among contexts.
I use the bitmechanic connection pool, a little old, but still works. 
http://www.bitmechanic.com/projects/jdbcpool/dist/jdbcpool-1.0b1.zip
  
I put the jar of the pool in the common/lib dir. I f anyone is 
interested in the ConnectionManager, I can share it, it's an eclipse 
project with ant build file that generates both war and the lib jar.

Hope it can help :)

Emerson

Scott wrote:

 Hi, I have configured the commons-dbcp datasource as a JNDI resource 
 for MSSQL and Oracle and all is working as expected. However, as I 
 understand, it is only possible to keep a factory as a resource and so 
 a new datapool must be created everytime a JNDI lookup is done. I 
 would like to share a single connection pool among different contexts.

 My first attempt was to create a listener that put a single instance 
 of a pool into the JNDI only to find that it is read-only. For my next 
 attempt I am thinking of creating a javabean with a static collection 
 of datasources and name keys that can be gotten as a JNDI resource so 
 that the different applications can just retrieve the bean and do a 
 lookup of the datasource that way.

 Am I missing an easier or better way to do this? I do not have any 
 experience with Javabeans and based on the stuff I've seen on the web 
 beans are usually graphic oriented. Is this an appropriate use of a 
 bean (or perhaps an Enterprise Javabean)?

 Thank you in advance,
 Scott



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
Emerson Cargnin
Analista de Sitemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: -Xincgc, -Xms600, -Xmx600

2003-06-03 Thread Strecker, Mark
I question whether this is a memory issue. Even if you use 600MB, why does tomcat run 
at 100% cpu forever??? Shouldn't the gc finish???

I have had this same problem with Tomcat for quite some time too. It seems to be an 
issue with Tomcat installed as a service ... or possibly some issue with the jk 
connector. I run Tomcat in my development environment and never see this behavior. The 
only differences between my development and production environments are :
- the server VM is used in production ... using the client VM doesn't clear this up
- Hardware and OS ... 1 machine is identical to my development machine and the other 
isn't ... it occurs on NT, W2K, single and dual-cpu machines ... I'm confident this 
isn't a hardware issue
- Tomcat communicates with Apache via jk ... Is there some way to investigate this?

I am using jdk1.3.1_07. I know that people upgraded to jdk1.4 and the problem persists 
... so it's probably not a JVM issue.

As far as recreating this problem, I thought that I could reliably recreate it at one 
time, but I can't. I can restart the Tomcat service, not execute anything,  and within 
an hour the problem is back.

I really don't have any good leads, but I have eliminated some possibilities. Any 
suggestions would be greatly appreciated.

Mark

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 9:36 AM
To: Tomcat Users List
Subject: RE: -Xincgc, -Xms600, -Xmx600



Howdy,
You can enable the -verbose:gc switch and see how often GC is occurring.
Incremental GC will occur all the time pretty much.

Note that your core problem may be deeper.  Why did memory consumption
hit 600MB?  Is that expected?  If so, you should ensure the heap has
more allocated than what you expect to need.  

If this is not expected, find out what's holding on to data and modify
the relevant code so that garbage collection can reclaim this space.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jason Efting [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 01, 2003 9:36 AM
To: [EMAIL PROTECTED]
Subject: -Xincgc, -Xms600, -Xmx600

Hi,
Recently my tomcat (jvm rather) 4 server started running at 100% CPU
utilization and not service any request for long periods of time. This
must
be due to the JVM doing garbase collection.

I modified my system register appropriatly and but a few days later
(when
memory consuption hit 600MB) tomcat started acting funny again.

Here is what I did to modify my register:
1. Stop Apache Tomcat service
2. Stop Apache service.
3. Modify/Add registry keys.
4. Start Apache Tomcat service
5. Start Apache service

Please not that I did not restart the entire box.

Platform:
Windows 2000 Server SP3
Tomcat 4
1GB Physical RAM

I cannot see any change I the servers behaviour since I modifeid the
registry. What would you suggest I do to test my new settings and
ensure
that incremental garbage collection is happening?

Thanks
Jason


-
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: -Xincgc, -Xms600, -Xmx600

2003-06-03 Thread Strecker, Mark
Howdy,

I question whether this is a memory issue. Even if you use 600MB, why
does
tomcat run at 100% cpu forever??? Shouldn't the gc finish???

GC may finish and immediately restart if memory is still full.  That
would keep CPU usage pegged.

Sure, it is possible that the gc could run as long as your process is running, but it 
should stop after your process completes. If tomcat keeps running at 100% cpu forever, 
you have a problem ... something that looks like an infinite loop.

I am using jdk1.3.1_07. I know that people upgraded to jdk1.4 and the
problem persists ... so it's probably not a JVM issue.

I don't think that's a possible conclusion without significant further
investigation.  There are simply too many variables, too many difference
between JDK 1.3.x and 1.4.x, and people vs your specific situation.

All I'm saying is, just upgrading the VM is a waste of time. If it's a VM issue it's 
not fixed yet ... or it's been reintroduced. Maybe the answer is to do what Hua Hou 
suggested, upgrade to 1.4.1_02 and replace the setLength() method with the 1.3.1_07 
version.

Can you see if it's actually GC that's using the CPU?  If not, what is?
One way to find out is to ctrl-break your tomcat when it's using 100%
CPU.  You will get output showing what exactly every thread in the VM
was doing.

I would like to know this too ... actually any information about what it is doing 
would be great. I tried to attach the MS debugger ... but had problems doing so on NT. 
Now that I have a W2K installation too, I will try again.

How do I ctrl-break a service ... or make it dump this information?

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help with tomcat running as service with ajp13

2003-03-21 Thread Strecker, Mark
This sounds eerily familiar. The box I am running on is a dual processor box too. 
Thanks for your info.
What else have you tried to debug this? Anything logged that looks interesting?

Mark

-Original Message-
From: Mark Prins [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 6:45 AM
To: Tomcat Users List; Jake Robb
Subject: Re: Need help with tomcat running as service with ajp13


Citeren Jake Robb [EMAIL PROTECTED]:

 The very first thing I'd try is upgrading to the latest version of the
 JDK (1.4.1_01). 

1.4.1_02 is the latest.
I have had this problem with 4.0.6 running standalone with 1.3.x Upgrading 
to 1.4.1_01 helped.

I have a NT4 box with 4.0.6 standalone on 1.4.1_02 with coyote connector 
RC1 that has this behaviour (cpu hogging) (I upgraded the JDK from 
1.4.1_01 - but that doesn't seem to help)
Both are dual processor boxes...

Mark


--
_
Zon Breedband Family, 2 keer zo snel als alle andere ADSL aanbieders.
Voor maar 34 euro per maand. Bestel nu op www.zonnet.nl/breedband
Tijdelijk gratis modem en geen aansluitkosten!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need help with tomcat running as service with ajp13

2003-03-20 Thread Strecker, Mark
Hello All,

   I have Tomcat 4.1.18 running as a service on an NT4.0 machine with Java 1.3.1 ... 
also it is getting requests via ajp13 from an apache server. It starts and works fine, 
but I am seeing a problem where it gets stuck and pegs the cpu. I can still connect 
to the administration page and connect to applications in a reasonable amount of time, 
but I am concerned about why it is using 100% cpu to do nothing.
   Has anyone experienced this or have a suggestion as to what I can log to figure out 
what is happening? (I have tried to log everything with no success.)

TIA,
Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]