Stopping and starting Tomcat
Is there a way that I can stop and start Tomcat without affecting all of the different applications running on different ports on the same box? We are having problems with our QA machine and our testers are constantly getting booted off the application in development which they are using now each time I stop and start Tomcat after making changes. I am hoping to find a way to stop and start Tomcat for just one port. Thanks. Windows NT 4.0 Tomcat 3.1 Apache 1.3 JDK 1.3 Mark
RE: Memory usage
Correct me if I'm wrong. If for instance I want a bean removed knowing that System.gc() does not happen immediately, would setting the bean equal to null force the bean to be removed from memory right away and not have to rely on the garbage collection to eventually take place? Mark -Original Message- From: William Kaufman [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 10:07 AM To: '[EMAIL PROTECTED]' Subject:RE: Memory usage That your finalize method is called, doesn't mean that the garbage collector has released your objects. The only way to be shure that this happens, is to explicitly run System.gc(). Even that's not sufficient: it just suggests to the VM that garbage-collecting might be a good idea right now. Any actual garbage collection would take place later, in another thread. And, even when it does happen, that doesn't mean all the memory will necessarily be released to the OS: the VM will hold on to some so that it won't need to go back to the OS on the next allocation. You might want to get a memory profiler (like JProbe) and see where the memory is going. At the very least, try doing something like, Runtime rt = Runtime.getRuntime(); System.err.println(Free=+rt.freeMemory()+, total=+rt.totalMemory()); often, to see how much memory is actually in use, and how much is just allocated from the OS. -- Bill K. -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 5:51 AM To: '[EMAIL PROTECTED]' Subject: AW: Memory usage That your finalize method is called, doesn't mean that the garbage collector has released your objects. The only way to be shure that this happens, is to explicitly run System.gc(). Otherwise it's up to the VM when it will free the memory. (Sun's JDK per default only releases memory if otherwise an OutOfMemoryError would occur, so unless you reach this border the VM will constanly grow) See also the options for the JVM: -verbose:gc (Any VM) -Xincgc (Sun SDK 1.3.*) -Xms (Sun + IBM) -Xmx (Sun + IBM) -Ursprüngliche Nachricht- Von: Garry De Toffoli [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 3. Mai 2001 14:34 An: [EMAIL PROTECTED] Betreff: Memory usage snip/ I have in trouble with the memory usage with Tomcat 3.21, WinNt 2000 and Jdk 1.3 of Sun. the problem is that any operation does not release the memory occuped; to control the memory usage I use the Task Manager; when Tomcat start, the memory used from the process Java is of 9608 K; when I request a Jsp page that has an error, like a variable not declared, the memory used is 11868K; if I wait for 1 ay also, this value does not change, so the memory used is not released, running a correct Jsp page, the memory used increase, and this is not released yet; I have written a log on the finalize method of my class, and this is called, so the garbage collector release all my object. This behavoir is normal? Probably changing the version of Tomcat this problem may be corrected. snip/
RE: TOMCAT SHUTDOWN PROBLEM
We have the same problem using HP-UX. I've seen this question posted before with no answers. Can anyone shed some light on this? Thanks. Mark -Original Message- From: Lian, Xiaobu (Alice) (Xiaobu (Alice)) [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 3:36 PM To: '[EMAIL PROTECTED]' Subject:RE: TOMCAT SHUTDOWN PROBLEM I have tomcat shutdown problem on HP-UX. At first I had to kill it. Then I found that it would be shutdown after running "tomcat.sh stop" three times. I have not spent time to figure out why. Anybody has some ideas about it? Should I change the tomcat.sh scripts? Thanks for any input! Alice Xiaobu Alice Lian Database Engineer Agere Systems [EMAIL PROTECTED] (484)397-2583 -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 1:58 PM To: [EMAIL PROTECTED] Subject: RE: TOMCAT SHUTDOWN PROBLEM Possibilities I see: 1. You have disabled AJP12 in your server.xml file (needed to shutdown) 2. Tomcat is only getting halfway shutdown - it stops accepting AJP12 connections but still keeps the HTTP connection open. I've seen reports of this happening on HP-UX (after a few attempts if finally closes) or when using the Kaffe JVM (in which case people have upgraded). You can check this by using ps/TaskManager after issuing the shutdown and check for running processes. 3. Something other than Tomcat is the one using the port. You can check this with netstat (Unix or Windows) in combination with ps/TaskManager. Randy -Original Message- From: Matas Salvador [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 2:19 PM To: [EMAIL PROTECTED] Subject: TOMCAT SHUTDOWN PROBLEM Importance: High When i try to shutdown Tomcat, it throws me the following exception: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112) at java.net.Socket.init(Socket.java:273) at java.net.Socket.init(Socket.java:100) at org.apache.tomcat.task.StopTomcat.execute(StopTomcat.java:104) at org.apache.tomcat.startup.Tomcat.stopTomcat(Tomcat.java:267) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:174) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) It would seem that it is not UP, so i try to LIFT IT UP and throws me the following exception: FATAL:java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397) at java.net.ServerSocket.init(ServerSocket.java:170) at java.net.ServerSocket.init(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(Default ServerSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoi nt.java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.jav a:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) What's wrong with my Tomcat? MATAS SALVADOR JAVA Development Team Soluciones Integrales S.A. 590 Roca Av. 7 Floor Buenos Aires +54.011.4345.0537 int. 132
RE: Shutdown problem
I had the same problem using HP-Unix and Tomcat. The problem had to do with two things trying to share the same port number. We fixed the problem by changing the port number in the server.xml: Connector className="org.apache.tomcat.service.SimpleTcpConnector" -- Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/ -- Parameter name="port" value="8080"/ -- /Connector -- I hope this helps. Mark -Original Message- From: Sambit Mishra [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 3:51 PM To: [EMAIL PROTECTED] Subject:Shutdown problem Hi Folks!! I am using Tomcat 3.2 on Solaris. My problem is I can not shutdown the server and bring it up with the tomcat.sh stop/start command. I get the exception "Fatal: java.net.BindException: Address already in use...". I have to kill a process which reads "../green_thread/.." as a workaround. Any suggestions? Thanks. -Sambit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Recuring problem - please help
I have seen this error before. In my case it was because I was using a JSP keyword for a field name in the database refered to in the JSP. It happened to be the 'page' directive. I hope this helps. Mark -Original Message- From: Arif Shaikh [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 10:55 AM To: [EMAIL PROTECTED] Subject: Recuring problem - please help Hi Everybody; I am having problems with invoking my JSPs. i am using Apache-Tomcat inside VisualAge for Java 3.5. the simple JSPs are working where it has to show only the html (static) content. but if any JSP needs to get something from the database it gives me the following error (i have checked in the debugger to find whether it is able to get the connection, which has no problems whatsoever). java.lang.IllegalStateException: Response has already been committed java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalStateException(java.lang.String) void org.apache.tomcat.core.HttpServletResponseFacade.sendError(int, java.lang.String) void org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.Htt pServletResponse, java.lang.Throwable) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R equest, org.apache.tomcat.core.Response) void org.apache.tomcat.core.RequestDispatcherImpl.forward(javax.servlet.ServletRe quest, javax.servlet.ServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R equest, org.apache.tomcat.core.Response) void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request , org.apache.tomcat.core.Response) void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a pache.tomcat.service.TcpConnection, java.lang.Object []) void org.apache.tomcat.service.TcpConnectionThread.run() void java.lang.Thread.run() i will really appreciate your help guys as i am unable to understand the origin of the problem. Thanks Arif Shaikh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Restarting Tomcat??
I'm using Tomcat 3.2 with Microsoft NT. In my Java Beans I call many Oracle procedures and functions. When I make changes to an Oracle procedure/function do I need to stop-start Tomcat for it to recognize the new changes? It seems to be inconsistent. Thanks in advance. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need help
I'm not sure if this would work or not over a firewall, but a remote access control software product like pcAnywhere or Timbuktu might help. Mark -Original Message- From: Salvady, Gopal [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 2:09 PM To: '[EMAIL PROTECTED]' Subject:RE: Need help The main reason for this question is because if I update a existing servlet, it does not reload the servlet automatically and I have restart the server. When the application is put outside the firewall, I am helpless to restart the tomcat as I do not have access. Gopal -Original Message- From: Salvady, Gopal Sent: Friday, February 02, 2001 2:00 PM To: '[EMAIL PROTECTED]' Subject: RE: Need help Avery Thanks. But I do not admin the firewall and as I said, I can only ftp the application to the machine. Gopal -Original Message- From: Avery Buffington [SMTP:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 1:35 PM To: [EMAIL PROTECTED] Subject:Re: Need help Simplest solution (if you can admin the firewall) would be to put ssh on the tomcat box and allow the firewall to pass the ssh traffic. Sooner or later you are going to need to access the box for maintennence or upgrading and this would allow you access it in a secure manner (and not have to drive to wherever the box is physically located). -Avery "Salvady, Gopal" wrote: Friends, Your help on this woule be highly appreciated. We have put an application outside the firewall and we don't have access to the machine other than ftping our application. How do we start/stop tomcat webserver remotely if it crashes. Any body with any experience or would like give tips please help. This is an immediate problem I am facing. I think I had sent an email in this regard sometime back. Bot sure whether anyone got back on this. Appreciate any help. Thanks Gopal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Out of memory error
Using Apache and Tomcat 3.2 I'm getting an out of memory error. Tomcat was installed on a HP Unix box, version 10.2 and using 128 MB memory. Below is the part of the error message. Is this a thread problem? Thanks in advance. at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compi led Code) at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) at java.lang.Thread.run(Compiled Code) java.lang.OutOfMemoryError at org.apache.tomcat.core.BufferedServletOutputStream.init(Compiled Code) Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]