Re: How to specify windows user in runtime in tomcat?
You can try with jcifs (http://jcifs.samba.org/). It should allow you to access a remote share using a different user context, though I'd reccommend using a dedicated account for this kind of job. Hope it helps, b. nitin403 wrote: > > > > Juha Laiho wrote: >> >> nitin403 wrote: >>> I have create a servlet which needs to read a file on a share folder. >>> When I run tomcat service as anonymous it is not able to access read >>> this >>> file. >>> But when I run tomcat service as a user who as access to this file, then >>> it >>> runs fine. >>> >>> My Question is, is it possible to something similar to this in servlet >>> code >>> at run time for running the servlet in tomcat. >> >> No, you can't change Tomcat user at runtime. What you can do is to >> run Tomcat as a specific user, and allow that spcific user to access >> the files it needs to (via group membership or a per-account permission). >> -- >> ..Juha >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > Thanks for your help Juha Laiho. > > The reason for my asking this question was that every time I deploy this > servlet on any system then I have to always make the tomcat to with the > user. > > Is there no other way in java to read a file. > > Thanks for your help in advance. > > -- View this message in context: http://www.nabble.com/How-to-specify-windows-user-in-runtime-in-tomcat--tp14247742p14331680.html Sent from the Tomcat - User mailing list archive at Nabble.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: How to specify windows user in runtime in tomcat?
Thanks for your help. I will try JCIFS. Your are correct about using a dedicated account. But on the tomcat server which I am deploying the servlet, has other servlets and It is not feasible for me to change its access rights. Once again thanks a lot. br1 wrote: > > You can try with jcifs (http://jcifs.samba.org/). > It should allow you to access a remote share using a different user > context, though I'd reccommend using a dedicated account for this kind of > job. > > Hope it helps, > b. > > > nitin403 wrote: >> >> >> >> Juha Laiho wrote: >>> >>> nitin403 wrote: I have create a servlet which needs to read a file on a share folder. When I run tomcat service as anonymous it is not able to access read this file. But when I run tomcat service as a user who as access to this file, then it runs fine. My Question is, is it possible to something similar to this in servlet code at run time for running the servlet in tomcat. >>> >>> No, you can't change Tomcat user at runtime. What you can do is to >>> run Tomcat as a specific user, and allow that spcific user to access >>> the files it needs to (via group membership or a per-account >>> permission). >>> -- >>> ..Juha >>> >>> - >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> Thanks for your help Juha Laiho. >> >> The reason for my asking this question was that every time I deploy this >> servlet on any system then I have to always make the tomcat to with the >> user. >> >> Is there no other way in java to read a file. >> >> Thanks for your help in advance. >> >> > > -- View this message in context: http://www.nabble.com/How-to-specify-windows-user-in-runtime-in-tomcat--tp14247742p14331879.html Sent from the Tomcat - User mailing list archive at Nabble.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]
Tomcat 6.0: placement JAAS config file?
Hi all, I just got my JAAS example working on Tomcat 6.0. To accomplish that I created a directory in webapps called myjaas, placed my jsp file, and jaas.config file in that directory, and placed my jar-file in myjaas\WEB-INF\lib. Next I added the placement of my jaas.config to the 'Java Options' in the tab 'Java' in the 'Apache Tomcat Properties' window, and restarted Tomcat. My question. I tried different places of the jaas.config file. One of them in the $CATALINA_HOME\conf directory (while changing the 'Apache Tomcat Properties' accordingly). But I now had the error that the LoginModule I made could not be found. I would think a jaas configuration file should belong in the conf/ directory. I could not make it happen. Is the place correct which I described in the first paragraph, or should it be placed in $CATALINA_HOME\conf? Do you have any other comments (like the wisdom of setting the location of my jaas.config in 'Apache Tomcat Properties' ) Looking forward to your comments. Abel
Tomcat does not stay on as a windows service
I am trying to get Tomcat going on a windows machine. There are running and woking installations of Java 2 Standard Edition Development Kit version 2, update 6, with JRE and Java Web Start Apache 2.0.58 Tomcat seems to install fine; I have created and checked the paths of the system variables CATALINA_HOME and JAVA_HOME for spelling errors. However, Tomcat does not stay on as a service. It starts and a second later it is off again. I have consulted the log files and really need help interpreting what they say Thanks, Ljuba catalina-2007-12-14.log 2007-dec-14 12:14:08 org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 2007-dec-14 12:14:08 org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 2007-dec-14 12:14:08 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1594 ms 2007-dec-14 12:14:08 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 2007-dec-14 12:14:08 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 2007-dec-14 12:14:09 org.apache.catalina.core.StandardHost start INFO: XML validation disabled 2007-dec-14 12:14:13 org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 2007-dec-14 12:14:14 org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 2007-dec-14 12:14:14 org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource 2007-dec-14 12:14:14 org.apache.catalina.startup.Catalina start INFO: Server startup in 5734 ms 2007-dec-14 12:14:14 org.apache.catalina.core.StandardServer await ALLVARLIG: StandardServer.await: create[8005]: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.(ServerSocket.java:185) at org.apache.catalina.core.StandardServer.await(StandardServer.java:372) at org.apache.catalina.startup.Catalina.await(Catalina.java:615) at org.apache.catalina.startup.Catalina.start(Catalina.java:575) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) 2007-dec-14 12:14:14 org.apache.coyote.http11.Http11AprProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 localhost-2007-12-14.log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() jakarta_service_20071214.log 2007-12-14 11:53:25] [info] Service Tomcat5 name Apache Tomcat [2007-12-14 11:53:25] [info] Service Tomcat5 installed [2007-12-14 11:53:25] [info] Procrun finished. [2007-12-14 11:53:25] [info] Updating service... [2007-12-14 11:53:25] [info] Service Tomcat5 updated [2007-12-14 11:53:25] [info] Update service finished. [2007-12-14 11:53:25] [info] Procrun finished. [2007-12-14 11:53:36] [info] Updating service... [2007-12-14 11:53:36] [info] Service Tomcat5 updated [2007-12-14 11:53:36] [info] Update service finished. [2007-12-14 11:53:36] [info] Procrun finished. [2007-12-14 11:53:36] [info] Updating service... [2007-12-14 11:53:36] [info] Service Tomcat5 updated [2007-12-14 11:53:37]
Intermittent blank page after log-n
Chris, To answer your question, Chris, I do a post to j_security_check. Actually, my "login" link really just does a GET for a secured resource and Tomcat serves up a standard j_security_check form. I only post j_username and j_password, so don't expect max size to be a problem. I was not able to reproduce the problem this morning, but after pouring through the logs I found an exception that shed some light on the problem. I saw a "connection already closed" message from one of my DAOs and I found a SQLExceptions from MOD_JK. It looks like on of my DAOs left a transaction open and the login error is really just fallout from that. I have a TODO to replace my transaction logic with Spring transactions. I'll see if the problem goes away after I do that. Here is the error: ERROR | 2007-12-13 20:53:36,085 [TP-Processor11] org.apache.catalina.core.ContainerBase.[Catalina].[www.homesassn.com].[/] - Exception performing authentication java.sql.SQLException: Communications link failure during commit(). Transaction resolution unknown. at com.mysql.jdbc.Connection.commit(Connection.java:2171) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java :568) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java :399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java :347) at org.apache.catalina.authenticator.FormAuthenticator.authenticate( FormAuthenticator.java:257) at org.apache.catalina.authenticator.AuthenticatorBase.invoke( AuthenticatorBase.java:416) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:105) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke( FastCommonAccessLogValve.java:495) at org.apache.catalina.valves.AccessLogValve.invoke( AccessLogValve.java:541) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java :199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java :282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection( ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt( ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:619) The realm is nothing unusual: Thanks, Steve Chris wrote: > Steve, > >> Steve Mitchell wrote: >> I'm using a JDBC realm with a site and sometimes when you try to >> access a secured resource you get a blank page after logging in. You >> have to refresh the page to get the secured resource to appear. After >> that everything works great. > >Does it happen to be a POST request that initiates the login? Tomcat has >a certain maximum size (can't remember off the top of my head) for POST >requests that it will properly re-process after a login. > >> This appears to only happen on the first login. > >First login when? After a server restart? Ever on a given browser? >First login for whom? The first user to hit the server at all after a >restart, or the first time a particular user logs in from anywhere? > >- -chris
Re: problem in loading class file
Thank you very much for replying. The tomcat version is 5.5 and Java version is 1.5.0_14 and platform is Windows XP. The class is located in webapps/axis/WEB-INF/classes/WebService.class Thanking you, Faisal David Smith-2 wrote: > > Hi Faisal. > > Could you post a few very important additional details? > > Tomcat version > Platform > Tomcat relative path to the class/jar you're having trouble with. > > --David > > Faisal wrote: > >>Hello, >>I can execute the following java code in a standalone application very well >>but when i put the same code in a web service and deploy it on the Tomcat >>5.5 then it gives error: >> >>exception classNotFoundException: can not find the class >>cib.expserver.plugin.basics.ExpressServer >> >>Some one please help me out in this regard. >> >>The code is following: >> >>mport java.io.*; >>import java.net.*; >> >>public class WebService { >>public byte[] run(byte[] inputFile) throws Exception >>{ >>URL url = new URL("file:/c:Tud/Server/program/bin"); >>System.out.println("successfully created the url"); >>URL[] pluginURLs = new URL[1]; >>pluginURLs[0]=url; >>URLClassLoader pluginClassLoader = new >>URLClassLoader(pluginURLs); >>System.out.println("The class loader has been created successfully "); >>String pluginClassName = >>"cib.expserver.plugin.basics.ExpressParser"; >> >>// The following line of code gives the Exception when run >>// under Tomcat but runs fine in a standalone application >>Class pluginClass = >>pluginClassLoader.loadClass(pluginClassName); >>// The following line of code is not executed under Tomcat >>System.out.println("successfully loaded the class"); >> >> >>return inputFile; >>} >> >> > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/problem-in-loading-class-file-tp14335434p14335821.html Sent from the Tomcat - User mailing list archive at Nabble.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 stay on as a windows service
I've also found the TcpDump tool available from Microsoft's website extremely helpful in looking at this stuff. I would say it should be safe to stop the instance of java.exe holding on to 8005, but you should try to be sure it's not used for anything. Various third party software companies have been known to leverage tomcat in their own products. --David Ljuba Veselinova wrote: I found info about netstat in the windows help files. I apologize for this simple question. I'm looking at the results produced by netstat and tasklist right now. It looks like java is listening to port 8005; there appear to be two instances of java.exe running and each one of them is listening to several ports. I need java to run though. Is it safe to end the instance of java.exe listening to port 8005? Ljuba On Dec 14, 2007 2:03 PM, Markus Schönhaber <[EMAIL PROTECTED]> wrote: Ljuba Veselinova wrote: Apache is running but it uses port 80. As far as I can tell (via the Task manager panel) there are no other instances of tomcat running on the machine. How do I check what's running specifically on port 8005? If you're using XP or better netstat -ano will show you which process id listens on what address and port. Or you could use something like TcpView: http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx Regards mks - 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: problem in loading class file
Thanks David, I have used this form of the url as well but with the same result. Thanks any way, Faisal David Smith-2 wrote: > > I mean the path to cib.expserver.plugin.basics.ExpressServer, which your > tomcat is complaining about not being able to find. > > Anyway... taking a closer look at the code you posted, I think the URI > you are using won't work > > file:/c:Tud/Server/program/bin should probably be more like > file:///c:/Tud/Server/program/bin. > > --David > > Faisal wrote: > >>Thank you very much for replying. The tomcat version is 5.5 and Java version >>is 1.5.0_14 and platform is Windows XP. >> >>The class is located in webapps/axis/WEB-INF/classes/WebService.class >> >>Thanking you, >>Faisal >> >>David Smith-2 wrote: >> >> >>>Hi Faisal. >>> >>>Could you post a few very important additional details? >>> >>>Tomcat version >>>Platform >>>Tomcat relative path to the class/jar you're having trouble with. >>> >>>--David >>> >>>Faisal wrote: >>> >>> >>> Hello, I can execute the following java code in a standalone application very >>well >> >> but when i put the same code in a web service and deploy it on the Tomcat 5.5 then it gives error: exception classNotFoundException: can not find the class cib.expserver.plugin.basics.ExpressServer Some one please help me out in this regard. The code is following: mport java.io.*; import java.net.*; public class WebService { public byte[] run(byte[] inputFile) throws Exception { URL url = new URL("file:/c:Tud/Server/program/bin"); System.out.println("successfully created the url"); URL[] pluginURLs = new URL[1]; pluginURLs[0]=url; URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs); System.out.println("The class loader has been created successfully "); String pluginClassName = "cib.expserver.plugin.basics.ExpressParser"; // The following line of code gives the Exception when run // under Tomcat but runs fine in a standalone application Class pluginClass = pluginClassLoader.loadClass(pluginClassName); // The following line of code is not executed under Tomcat System.out.println("successfully loaded the class"); return inputFile; } >>>- >>>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] > > > -- View this message in context: http://www.nabble.com/problem-in-loading-class-file-tp14335434p14336136.html Sent from the Tomcat - User mailing list archive at Nabble.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: problem in loading class file
I mean the path to cib.expserver.plugin.basics.ExpressServer, which your tomcat is complaining about not being able to find. Anyway... taking a closer look at the code you posted, I think the URI you are using won't work file:/c:Tud/Server/program/bin should probably be more like file:///c:/Tud/Server/program/bin. --David Faisal wrote: Thank you very much for replying. The tomcat version is 5.5 and Java version is 1.5.0_14 and platform is Windows XP. The class is located in webapps/axis/WEB-INF/classes/WebService.class Thanking you, Faisal David Smith-2 wrote: Hi Faisal. Could you post a few very important additional details? Tomcat version Platform Tomcat relative path to the class/jar you're having trouble with. --David Faisal wrote: Hello, I can execute the following java code in a standalone application very well but when i put the same code in a web service and deploy it on the Tomcat 5.5 then it gives error: exception classNotFoundException: can not find the class cib.expserver.plugin.basics.ExpressServer Some one please help me out in this regard. The code is following: mport java.io.*; import java.net.*; public class WebService { public byte[] run(byte[] inputFile) throws Exception { URL url = new URL("file:/c:Tud/Server/program/bin"); System.out.println("successfully created the url"); URL[] pluginURLs = new URL[1]; pluginURLs[0]=url; URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs); System.out.println("The class loader has been created successfully "); String pluginClassName = "cib.expserver.plugin.basics.ExpressParser"; // The following line of code gives the Exception when run // under Tomcat but runs fine in a standalone application Class pluginClass = pluginClassLoader.loadClass(pluginClassName); // The following line of code is not executed under Tomcat System.out.println("successfully loaded the class"); return inputFile; } - 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: problem in loading class file
David Smith wrote: > I mean the path to cib.expserver.plugin.basics.ExpressServer, which your > tomcat is complaining about not being able to find. > > Anyway... taking a closer look at the code you posted, I think the URI > you are using won't work > > file:/c:Tud/Server/program/bin should probably be more like > file:///c:/Tud/Server/program/bin. > > --David also, where have you put the jar which contains the class "cib.expserver.plugin.basics.ExpressServer" ? p > Faisal wrote: > >> Thank you very much for replying. The tomcat version is 5.5 and Java >> version >> is 1.5.0_14 and platform is Windows XP. >> >> The class is located in webapps/axis/WEB-INF/classes/WebService.class >> >> Thanking you, >> Faisal >> >> David Smith-2 wrote: >> >> >>> Hi Faisal. >>> >>> Could you post a few very important additional details? >>> >>> Tomcat version >>> Platform >>> Tomcat relative path to the class/jar you're having trouble with. >>> >>> --David >>> >>> Faisal wrote: >>> >>> Hello, I can execute the following java code in a standalone application very >> well >> >> but when i put the same code in a web service and deploy it on the Tomcat 5.5 then it gives error: exception classNotFoundException: can not find the class cib.expserver.plugin.basics.ExpressServer Some one please help me out in this regard. The code is following: mport java.io.*; import java.net.*; public class WebService { public byte[] run(byte[] inputFile) throws Exception { URL url = new URL("file:/c:Tud/Server/program/bin"); System.out.println("successfully created the url"); URL[] pluginURLs = new URL[1]; pluginURLs[0]=url; URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs); System.out.println("The class loader has been created successfully "); String pluginClassName = "cib.expserver.plugin.basics.ExpressParser"; // The following line of code gives the Exception when run // under Tomcat but runs fine in a standalone application Class pluginClass = pluginClassLoader.loadClass(pluginClassName); // The following line of code is not executed under Tomcat System.out.println("successfully loaded the class"); return inputFile; } >>> - >>> 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] > > - 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: User roles
I wonder if the OP means the shutdown password? That's in server.xml, and the only consequence of changing it that I know of is that your shutdown script needs to be kept in sync. with this or it won't work. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is "intuitive" he means the exact opposite. pgp2m04ozUWAV.pgp Description: PGP signature
Tomcat 5 SSI crossContext
Hello, I have an application that needs to use server side includes (SSI ). The jsp server side includes work well from the ROOT application, but I am unable to use the jsp from another context as a server side include. I searched the archives and found other folks with this issue, but no solution. To be clear, if my .shtml lokks like this: The first include works but the second shows this on the page: [an error occurred while processing this directive] I have set crossContext to true. Has anyone found a solution to this problem? Thank you for any pointers or advice. Shannon - 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: problem in loading class file
Try using: URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs, Thread.currentThread().getContextClassLoader()); -Tim Faisal wrote: Hello, I can execute the following java code in a standalone application very well but when i put the same code in a web service and deploy it on the Tomcat 5.5 then it gives error: exception classNotFoundException: can not find the class cib.expserver.plugin.basics.ExpressServer Some one please help me out in this regard. The code is following: mport java.io.*; import java.net.*; public class WebService { public byte[] run(byte[] inputFile) throws Exception { URL url = new URL("file:/c:Tud/Server/program/bin"); System.out.println("successfully created the url"); URL[] pluginURLs = new URL[1]; pluginURLs[0]=url; URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs); System.out.println("The class loader has been created successfully "); String pluginClassName = "cib.expserver.plugin.basics.ExpressParser"; // The following line of code gives the Exception when run // under Tomcat but runs fine in a standalone application Class pluginClass = pluginClassLoader.loadClass(pluginClassName); // The following line of code is not executed under Tomcat System.out.println("successfully loaded the class"); return inputFile; } - 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 stay on as a windows service
netstat -a | grep 8005 Sverige Altid Martin- - Original Message - From: "Ljuba Veselinova" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, December 14, 2007 7:18 AM Subject: Re: Tomcat does not stay on as a windows service > Apache is running but it uses port 80. As far as I can tell (via the > Task manager panel) there are no other instances of tomcat running on > the machine. How do I check what's running specifically on port 8005? > > Thanks a lot for answering! > > Ljuba > > On Dec 14, 2007 12:37 PM, dirk ooms <[EMAIL PROTECTED]> wrote: > > there is another process that already uses port 8005. check whether there are > > other servers (apache?) or instances of tomcat running on your machine. > > > > dirk > > > > > > On Friday 14 December 2007 12:31, Ljuba Veselinova wrote: > > > I am trying to get Tomcat going on a windows machine. There are > > > running and woking installations of > > > > > > Java 2 Standard Edition Development Kit version 2, update 6, with JRE > > > and Java Web Start > > > Apache 2.0.58 > > > > > > Tomcat seems to install fine; I have created and checked the paths of > > > the system variables CATALINA_HOME and JAVA_HOME for spelling errors. > > > > > > However, Tomcat does not stay on as a service. It starts and a second > > > later it is off again. I have consulted the log files and really need > > > help interpreting what they say > > > > > > Thanks, > > > Ljuba > > > > > > catalina-2007-12-14.log > > > > > > 2007-dec-14 12:14:08 org.apache.coyote.http11.Http11AprProtocol init > > > INFO: Initializing Coyote HTTP/1.1 on http-8080 > > > 2007-dec-14 12:14:08 org.apache.coyote.ajp.AjpAprProtocol init > > > INFO: Initializing Coyote AJP/1.3 on ajp-8009 > > > 2007-dec-14 12:14:08 org.apache.catalina.startup.Catalina load > > > INFO: Initialization processed in 1594 ms > > > 2007-dec-14 12:14:08 org.apache.catalina.core.StandardService start > > > INFO: Starting service Catalina > > > 2007-dec-14 12:14:08 org.apache.catalina.core.StandardEngine start > > > INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 > > > 2007-dec-14 12:14:09 org.apache.catalina.core.StandardHost start > > > INFO: XML validation disabled > > > 2007-dec-14 12:14:13 org.apache.coyote.http11.Http11AprProtocol start > > > INFO: Starting Coyote HTTP/1.1 on http-8080 > > > 2007-dec-14 12:14:14 org.apache.coyote.ajp.AjpAprProtocol start > > > INFO: Starting Coyote AJP/1.3 on ajp-8009 > > > 2007-dec-14 12:14:14 org.apache.catalina.storeconfig.StoreLoader load > > > INFO: Find registry server-registry.xml at classpath resource > > > 2007-dec-14 12:14:14 org.apache.catalina.startup.Catalina start > > > INFO: Server startup in 5734 ms > > > 2007-dec-14 12:14:14 org.apache.catalina.core.StandardServer await > > > ALLVARLIG: StandardServer.await: create[8005]: > > > java.net.BindException: Address already in use: JVM_Bind > > > at java.net.PlainSocketImpl.socketBind(Native Method) > > > at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) > > > at java.net.ServerSocket.bind(ServerSocket.java:319) > > > at java.net.ServerSocket.(ServerSocket.java:185) > > > at org.apache.catalina.core.StandardServer.await(StandardServer.java:372) > > > at org.apache.catalina.startup.Catalina.await(Catalina.java:615) > > > at org.apache.catalina.startup.Catalina.start(Catalina.java:575) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 > > >9) at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > > >l.java:25) at java.lang.reflect.Method.invoke(Method.java:585) > > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) > > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) > > > 2007-dec-14 12:14:14 org.apache.coyote.http11.Http11AprProtocol pause > > > INFO: Pausing Coyote HTTP/1.1 on http-8080 > > > > > > localhost-2007-12-14.log > > > INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: > > > [org.apache.webapp.balancer.RuleChain: > > > [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: > > > News / Redirect URL: http://www.cnn.com], > > > [org.apache.webapp.balancer.rules.RequestParameterRule: Target param > > > name: paramName / Target param value: paramValue / Redirect URL: > > > http://www.yahoo.com], > > > [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: > > > http://jakarta.apache.org]] > > > 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log > > > INFO: ContextListener: contextInitialized() > > > 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log > > > INFO: SessionListener: contextInitialized() > > > 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log > > > INFO: ContextListener: contextInitialized() > > > 2007-dec-14 12:14:13 org.apache.catalina.core.Applica
Re: swith of a connector
I'm guessing you mean switch OFF. Apart from chucking the connector config from the XML, not really. One kludge: you could try and make the connector port a property, And on startup with JAVA_OPTS='-Dfoo=-1' and ignore the exception which gets thrown by tomcat. (I can't recall if tomcat aborts startup on this type of exception) -Tim Kovacs, Robert wrote: Hello All, I'm looking for a method how I can switch of a configured connector. Do you know any system property or other possibility for it ? Thanks: Robert - 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: problem in loading class file
Hi Faisal. Could you post a few very important additional details? Tomcat version Platform Tomcat relative path to the class/jar you're having trouble with. --David Faisal wrote: Hello, I can execute the following java code in a standalone application very well but when i put the same code in a web service and deploy it on the Tomcat 5.5 then it gives error: exception classNotFoundException: can not find the class cib.expserver.plugin.basics.ExpressServer Some one please help me out in this regard. The code is following: mport java.io.*; import java.net.*; public class WebService { public byte[] run(byte[] inputFile) throws Exception { URL url = new URL("file:/c:Tud/Server/program/bin"); System.out.println("successfully created the url"); URL[] pluginURLs = new URL[1]; pluginURLs[0]=url; URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs); System.out.println("The class loader has been created successfully "); String pluginClassName = "cib.expserver.plugin.basics.ExpressParser"; // The following line of code gives the Exception when run // under Tomcat but runs fine in a standalone application Class pluginClass = pluginClassLoader.loadClass(pluginClassName); // The following line of code is not executed under Tomcat System.out.println("successfully loaded the class"); return inputFile; } - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem in loading class file
Hello, I can execute the following java code in a standalone application very well but when i put the same code in a web service and deploy it on the Tomcat 5.5 then it gives error: exception classNotFoundException: can not find the class cib.expserver.plugin.basics.ExpressServer Some one please help me out in this regard. The code is following: mport java.io.*; import java.net.*; public class WebService { public byte[] run(byte[] inputFile) throws Exception { URL url = new URL("file:/c:Tud/Server/program/bin"); System.out.println("successfully created the url"); URL[] pluginURLs = new URL[1]; pluginURLs[0]=url; URLClassLoader pluginClassLoader = new URLClassLoader(pluginURLs); System.out.println("The class loader has been created successfully "); String pluginClassName = "cib.expserver.plugin.basics.ExpressParser"; // The following line of code gives the Exception when run // under Tomcat but runs fine in a standalone application Class pluginClass = pluginClassLoader.loadClass(pluginClassName); // The following line of code is not executed under Tomcat System.out.println("successfully loaded the class"); return inputFile; } -- View this message in context: http://www.nabble.com/problem-in-loading-class-file-tp14335434p14335434.html Sent from the Tomcat - User mailing list archive at Nabble.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 stay on as a windows service
I found info about netstat in the windows help files. I apologize for this simple question. I'm looking at the results produced by netstat and tasklist right now. It looks like java is listening to port 8005; there appear to be two instances of java.exe running and each one of them is listening to several ports. I need java to run though. Is it safe to end the instance of java.exe listening to port 8005? Ljuba On Dec 14, 2007 2:03 PM, Markus Schönhaber <[EMAIL PROTECTED]> wrote: > Ljuba Veselinova wrote: > > > Apache is running but it uses port 80. As far as I can tell (via the > > Task manager panel) there are no other instances of tomcat running on > > the machine. How do I check what's running specifically on port 8005? > > If you're using XP or better > netstat -ano > will show you which process id listens on what address and port. > Or you could use something like TcpView: > http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx > > Regards > mks > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- === Ljuba Veselinova Dept of Linguistics Email: [EMAIL PROTECTED] Stockholm University Phone: +46-8-16 2332 106 91 Stockholm Fax : +46-8-15 5389 Sweden URL : http://www.ling.su.se/staff/ljuba/ "We learn by going where we want to go." Julia Cameron - 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 stay on as a windows service
Ljuba Veselinova wrote: > Apache is running but it uses port 80. As far as I can tell (via the > Task manager panel) there are no other instances of tomcat running on > the machine. How do I check what's running specifically on port 8005? If you're using XP or better netstat -ano will show you which process id listens on what address and port. Or you could use something like TcpView: http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
swith of a connector
Hello All, I'm looking for a method how I can switch of a configured connector. Do you know any system property or other possibility for it ? Thanks: Robert
Re: Tomcat does not stay on as a windows service
Apache is running but it uses port 80. As far as I can tell (via the Task manager panel) there are no other instances of tomcat running on the machine. How do I check what's running specifically on port 8005? Thanks a lot for answering! Ljuba On Dec 14, 2007 12:37 PM, dirk ooms <[EMAIL PROTECTED]> wrote: > there is another process that already uses port 8005. check whether there are > other servers (apache?) or instances of tomcat running on your machine. > > dirk > > > On Friday 14 December 2007 12:31, Ljuba Veselinova wrote: > > I am trying to get Tomcat going on a windows machine. There are > > running and woking installations of > > > > Java 2 Standard Edition Development Kit version 2, update 6, with JRE > > and Java Web Start > > Apache 2.0.58 > > > > Tomcat seems to install fine; I have created and checked the paths of > > the system variables CATALINA_HOME and JAVA_HOME for spelling errors. > > > > However, Tomcat does not stay on as a service. It starts and a second > > later it is off again. I have consulted the log files and really need > > help interpreting what they say > > > > Thanks, > > Ljuba > > > > catalina-2007-12-14.log > > > > 2007-dec-14 12:14:08 org.apache.coyote.http11.Http11AprProtocol init > > INFO: Initializing Coyote HTTP/1.1 on http-8080 > > 2007-dec-14 12:14:08 org.apache.coyote.ajp.AjpAprProtocol init > > INFO: Initializing Coyote AJP/1.3 on ajp-8009 > > 2007-dec-14 12:14:08 org.apache.catalina.startup.Catalina load > > INFO: Initialization processed in 1594 ms > > 2007-dec-14 12:14:08 org.apache.catalina.core.StandardService start > > INFO: Starting service Catalina > > 2007-dec-14 12:14:08 org.apache.catalina.core.StandardEngine start > > INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 > > 2007-dec-14 12:14:09 org.apache.catalina.core.StandardHost start > > INFO: XML validation disabled > > 2007-dec-14 12:14:13 org.apache.coyote.http11.Http11AprProtocol start > > INFO: Starting Coyote HTTP/1.1 on http-8080 > > 2007-dec-14 12:14:14 org.apache.coyote.ajp.AjpAprProtocol start > > INFO: Starting Coyote AJP/1.3 on ajp-8009 > > 2007-dec-14 12:14:14 org.apache.catalina.storeconfig.StoreLoader load > > INFO: Find registry server-registry.xml at classpath resource > > 2007-dec-14 12:14:14 org.apache.catalina.startup.Catalina start > > INFO: Server startup in 5734 ms > > 2007-dec-14 12:14:14 org.apache.catalina.core.StandardServer await > > ALLVARLIG: StandardServer.await: create[8005]: > > java.net.BindException: Address already in use: JVM_Bind > > at java.net.PlainSocketImpl.socketBind(Native Method) > > at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) > > at java.net.ServerSocket.bind(ServerSocket.java:319) > > at java.net.ServerSocket.(ServerSocket.java:185) > > at > > org.apache.catalina.core.StandardServer.await(StandardServer.java:372) > > at org.apache.catalina.startup.Catalina.await(Catalina.java:615) > > at org.apache.catalina.startup.Catalina.start(Catalina.java:575) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 > >9) at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > >l.java:25) at java.lang.reflect.Method.invoke(Method.java:585) > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) > > 2007-dec-14 12:14:14 org.apache.coyote.http11.Http11AprProtocol pause > > INFO: Pausing Coyote HTTP/1.1 on http-8080 > > > > localhost-2007-12-14.log > > INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: > > [org.apache.webapp.balancer.RuleChain: > > [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: > > News / Redirect URL: http://www.cnn.com], > > [org.apache.webapp.balancer.rules.RequestParameterRule: Target param > > name: paramName / Target param value: paramValue / Redirect URL: > > http://www.yahoo.com], > > [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: > > http://jakarta.apache.org]] > > 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log > > INFO: ContextListener: contextInitialized() > > 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log > > INFO: SessionListener: contextInitialized() > > 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log > > INFO: ContextListener: contextInitialized() > > 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log > > INFO: SessionListener: contextInitialized() > > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > > INFO: SessionListener: contextDestroyed() > > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > > INFO: ContextListener: contextDestroyed() > > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > > INFO: SessionListener: contextDestroyed() > >
Re: Tomcat does not stay on as a windows service
there is another process that already uses port 8005. check whether there are other servers (apache?) or instances of tomcat running on your machine. dirk On Friday 14 December 2007 12:31, Ljuba Veselinova wrote: > I am trying to get Tomcat going on a windows machine. There are > running and woking installations of > > Java 2 Standard Edition Development Kit version 2, update 6, with JRE > and Java Web Start > Apache 2.0.58 > > Tomcat seems to install fine; I have created and checked the paths of > the system variables CATALINA_HOME and JAVA_HOME for spelling errors. > > However, Tomcat does not stay on as a service. It starts and a second > later it is off again. I have consulted the log files and really need > help interpreting what they say > > Thanks, > Ljuba > > catalina-2007-12-14.log > > 2007-dec-14 12:14:08 org.apache.coyote.http11.Http11AprProtocol init > INFO: Initializing Coyote HTTP/1.1 on http-8080 > 2007-dec-14 12:14:08 org.apache.coyote.ajp.AjpAprProtocol init > INFO: Initializing Coyote AJP/1.3 on ajp-8009 > 2007-dec-14 12:14:08 org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 1594 ms > 2007-dec-14 12:14:08 org.apache.catalina.core.StandardService start > INFO: Starting service Catalina > 2007-dec-14 12:14:08 org.apache.catalina.core.StandardEngine start > INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 > 2007-dec-14 12:14:09 org.apache.catalina.core.StandardHost start > INFO: XML validation disabled > 2007-dec-14 12:14:13 org.apache.coyote.http11.Http11AprProtocol start > INFO: Starting Coyote HTTP/1.1 on http-8080 > 2007-dec-14 12:14:14 org.apache.coyote.ajp.AjpAprProtocol start > INFO: Starting Coyote AJP/1.3 on ajp-8009 > 2007-dec-14 12:14:14 org.apache.catalina.storeconfig.StoreLoader load > INFO: Find registry server-registry.xml at classpath resource > 2007-dec-14 12:14:14 org.apache.catalina.startup.Catalina start > INFO: Server startup in 5734 ms > 2007-dec-14 12:14:14 org.apache.catalina.core.StandardServer await > ALLVARLIG: StandardServer.await: create[8005]: > java.net.BindException: Address already in use: JVM_Bind > at java.net.PlainSocketImpl.socketBind(Native Method) > at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) > at java.net.ServerSocket.bind(ServerSocket.java:319) > at java.net.ServerSocket.(ServerSocket.java:185) > at > org.apache.catalina.core.StandardServer.await(StandardServer.java:372) > at org.apache.catalina.startup.Catalina.await(Catalina.java:615) > at org.apache.catalina.startup.Catalina.start(Catalina.java:575) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 >9) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp >l.java:25) at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) > 2007-dec-14 12:14:14 org.apache.coyote.http11.Http11AprProtocol pause > INFO: Pausing Coyote HTTP/1.1 on http-8080 > > localhost-2007-12-14.log > INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: > [org.apache.webapp.balancer.RuleChain: > [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: > News / Redirect URL: http://www.cnn.com], > [org.apache.webapp.balancer.rules.RequestParameterRule: Target param > name: paramName / Target param value: paramValue / Redirect URL: > http://www.yahoo.com], > [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: > http://jakarta.apache.org]] > 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextInitialized() > 2007-dec-14 12:14:12 org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextInitialized() > 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextInitialized() > 2007-dec-14 12:14:13 org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextInitialized() > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextDestroyed() > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextDestroyed() > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > INFO: SessionListener: contextDestroyed() > 2007-dec-14 12:14:15 org.apache.catalina.core.ApplicationContext log > INFO: ContextListener: contextDestroyed() > > jakarta_service_20071214.log > 2007-12-14 11:53:25] [info] Service Tomcat5 name Apache Tomcat > [2007-12-14 11:53:25] [info] Service Tomcat5 installed > [2007-12-14 11:53:25] [info] Procrun finished. > [2007-12-14 11:53:25] [info] Updating service... > [2007-12-14 11:53:25] [info] Service Tomcat5 updated > [2007-12-14 11:53:25] [info] Update service finished. > [2007-12-14 1
Re: Tomcat does not stay on as a windows service
I have tried to kill java.exe that's listening to port 8005 several times now without success. How do I assign other ports to either java.exe or tomcat? Thanks, Ljuba On Dec 14, 2007 2:48 PM, David Smith <[EMAIL PROTECTED]> wrote: > I've also found the TcpDump tool available from Microsoft's website > extremely helpful in looking at this stuff. > > I would say it should be safe to stop the instance of java.exe holding > on to 8005, but you should try to be sure it's not used for anything. > Various third party software companies have been known to leverage > tomcat in their own products. > > --David > > > Ljuba Veselinova wrote: > > >I found info about netstat in the windows help files. I apologize for > >this simple question. I'm looking at the results produced by netstat > >and tasklist right now. > > > >It looks like java is listening to port 8005; there appear to be two > >instances of java.exe running and each one of them is listening to > >several ports. I need java to run though. Is it safe to end the > >instance of java.exe listening to port 8005? > > > >Ljuba > > > >On Dec 14, 2007 2:03 PM, Markus Schönhaber > ><[EMAIL PROTECTED]> wrote: > > > > > >>Ljuba Veselinova wrote: > >> > >> > >> > >>>Apache is running but it uses port 80. As far as I can tell (via the > >>>Task manager panel) there are no other instances of tomcat running on > >>>the machine. How do I check what's running specifically on port 8005? > >>> > >>> > >>If you're using XP or better > >>netstat -ano > >>will show you which process id listens on what address and port. > >>Or you could use something like TcpView: > >>http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx > >> > >>Regards > >> mks > >> > >> > >>- > >>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] > > -- === Ljuba Veselinova Dept of Linguistics Email: [EMAIL PROTECTED] Stockholm University Phone: +46-8-16 2332 106 91 Stockholm Fax : +46-8-15 5389 Sweden URL : http://www.ling.su.se/staff/ljuba/ "We learn by going where we want to go." Julia Cameron - 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 Process Memory Leak?
> From: Bill Clarke-Fields [mailto:[EMAIL PROTECTED] > Subject: Tomcat Process Memory Leak? > > Any ideas about what could be causing this? I realize it > could be an application-related leak Not just could be, it almost definitely is, since this behavior isn't seen normally. > but in that case wouldn't we see it running out of heap? Is there any native code in the app? Does it create its own threads and forget to terminate them? Is it opening files and not closing them? Is it making connections to external resources and not disposing of them? Since it died trying to create more threads, it sounds like the webapp is doing something under the covers not within Tomcat's control. - 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 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 and IIS losing their link
Thanks for the reply Per... Tomcat and IIS are running on the same machine, with no external load balancer or firewall between IIS and Tomcat. When the connection is lost, IIS displays either "service is unavailable" or a "503 error" message. I only have maxThreads=400, because I didn't think it would hurt anything. I was running with far fewer maxThreads and had the same problem. The machine is a quad-core CPU with 4 gigs of ram and the load is very light. I'll look into your other suggestions. Also, I noticed in my original post that the redirectPort was wrong and I fixed that :) Any other ideas out there? -Travis - Original Message - From: "Per Johnsson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2007 11:52 PM Subject: FW: Tomcat and IIS losing their link (Tomcat maillist bounced my mail so I send it to you directly./per) Hi! Some questions: - Is the tomcat and IIS running on the same machine? - What's the result when the connection is lost? Service unavaible from IIS? - Is there any loadbalancer, firewall between the IIS and tomcat? - You have maxThreads=400, are there 400 concurrant requests ever during high load? We had some similar issues and we didn't find any good solution for it but a lot of small adjustments made it better like: - Lower the maxthreads (we had very cpu consuming requests at some times) we went from like 300 to 20 I beleive. - Installing java 1.6 which is much more efficient. - Using the latest APR and Isapi dll. /Per Jonsson -Original Message- From: Travis Haagen [mailto:[EMAIL PROTECTED] Sent: den 14 december 2007 05:08 To: Tomcat Posts Subject: Tomcat and IIS losing their link Hello, I've got IIS 6.0 linked with Tomcat 5.5.25 (with JDK 1.5.0_14-b03 and AJP dll) via the ISAPI connector (JK 1.2.25) on Windows 2003 Server, and during high traffic periods, the connection between IIS and Tomcat is being severed. This has been occurring in the mid-afternoon every day since this server went live and to get it running again, I've had to restart Tomcat. The peak connections to IIS during one of the days was just under 100, so this isn't really all that high of traffic. The isapi_redirect.log isn't much help. It has only been logging errors after the connection to Tomcat has been broken. Tomcat itself hasn't logged anything of relevance and I don't actually think that Tomcat is affected when the link is broken, but as I mentioned earlier, I have to restart Tomcat to get it to reconnect with IIS. Most of my configuration settings came from this website: http://wiki.jboss.org/wiki/Wiki.jsp?page=OptimalMod_jk1.2Configuration Here are the relevant workers.properties settings: worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 worker.ajp13w.lbfactor=1 worker.ajp13w.connect_timeout=1 worker.ajp13w.prepost_timeout=1 worker.ajp13w.socket_timeout=10 worker.ajp13w.connection_pool_timeout=600 worker.ajp13w.connection_pool_size=350 Here are the relevant server.xml settings: I just configured IIS 6.0 to run in IIS 5.0 isolation mode and that's the end of my ideas for fixing this issue. The only other ISAPI filters that I'm running are ASP.NET_1.1.4322.2307 and ISAPI_Rewrite3 (for URL rewriting). IIS web site connections is set to 'unlimited', connection timeout is 120 seconds, HTTP Keep-Alives is enabled. Until the crazy thing stops working, everything is fine. Any help will be greatly appreciated. Thanks, Travis - 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 Process Memory Leak?
Hi All, I am looking for some help. We are running into what appears to be a memory leak situation. The Java heap usage looks fine, but the overall Tomcat process memory usage continuously goes up and up, until it reaches the Windows 2GB per process limit, at which point it crashes. Using the Windows Performance Monitor, I am tracking the "Virtual Bytes" value of the Tomcat process. Upon Tomcat startup, it is at around 1.1GB. It then increases over time, sometimes fluctuating up and down a small degree, but the general trend is always upwards. Sometimes it jumps 40MB or more at a time. Eventually it hits the 2GB limit, and then the application stops responding and we get out of memory errors: "unable to create new native thread". Sometimes this takes 20 hours, sometimes it only takes 8 hours. We are running a third-party app on Tomcat 5.0.28 with Java 1.4.2_11. The machine is running Windows Server 2003 and has 2.5GB physical memory. We have the heap size set to 928MB. We have plans to upgrade to Tomcat 5.5.16 and Java 1.5_06 (which is also supported by the application vendor), but this will take some time, since we are in a validated environment. Any ideas about what could be causing this? I realize it could be an application-related leak, but in that case wouldn't we see it running out of heap? Thanks! -Bill -- View this message in context: http://www.nabble.com/Tomcat-Process-Memory-Leak--tp14337929p14337929.html Sent from the Tomcat - User mailing list archive at Nabble.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 stay on as a windows service
I don't think that's the best solution. The java.exe which is bound to 8005 is probably your tomcat service started but not active. From previous emails I assume you are running under Windows. Here's a suggestion (you may have tried this) 1. Go to the windows services manager and make sure that tomcat is set to 'manual start' 2. Reboot the machine. 3. Try the netstat to see if anything is bound to 8005. If so, investigate exactly what. 4. Start tomcat either from the task bar or the services manager 5. Check the logs to see if it started OK. I'd guess that it is possible that tomcat was already running but not responding and when you attempted to start it again you were getting the 'already bound' error message. Regards Alan Ljuba Veselinova wrote: I have tried to kill java.exe that's listening to port 8005 several times now without success. How do I assign other ports to either java.exe or tomcat? Thanks, Ljuba On Dec 14, 2007 2:48 PM, David Smith <[EMAIL PROTECTED]> wrote: I've also found the TcpDump tool available from Microsoft's website extremely helpful in looking at this stuff. I would say it should be safe to stop the instance of java.exe holding on to 8005, but you should try to be sure it's not used for anything. Various third party software companies have been known to leverage tomcat in their own products. --David Ljuba Veselinova wrote: I found info about netstat in the windows help files. I apologize for this simple question. I'm looking at the results produced by netstat and tasklist right now. It looks like java is listening to port 8005; there appear to be two instances of java.exe running and each one of them is listening to several ports. I need java to run though. Is it safe to end the instance of java.exe listening to port 8005? Ljuba On Dec 14, 2007 2:03 PM, Markus Schönhaber <[EMAIL PROTECTED]> wrote: Ljuba Veselinova wrote: Apache is running but it uses port 80. As far as I can tell (via the Task manager panel) there are no other instances of tomcat running on the machine. How do I check what's running specifically on port 8005? If you're using XP or better netstat -ano will show you which process id listens on what address and port. Or you could use something like TcpView: http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx Regards mks - 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] - 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: Intermittent blank page after log-n
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve, Steve Mitchell wrote: > I saw a "connection already closed" message from one of my DAOs and I > found a SQLExceptions from MOD_JK. mod_jk shouldn't be throwing any exceptions. I think you mean that the database driver is doing that. > It looks like on of my DAOs left a transaction open and the login > error is really just fallout from that. Probably. > I have a TODO to replace my transaction logic with Spring > transactions. I'll see if the problem goes away after I do that. I would set logAbandoned and friends on your connection pool to find out where the problem is before you move to Spring. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHYqwe9CaO5/Lv0PARAuJUAKC4FyUG2sKhu62gZuHAiDyOQC5LwgCfX3GG SXB1E0FjE1N/mas1zouyClo= =++J4 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about tomcat bugzilla which is resolved but not fixed.
Hi, We've come across a problem in Tomcat 5.5.17 not completely dissimilar to the following issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=33374 I notice that this issue has been marked fixed, but the comments on there indicate that the bug isnt actually fixed, and that the problem remains. Indeed, looking in the source of 5.5.25 it does not seem to contain the code in the patch in this issue. Can anyone answer why not? I wonder if i should attempt to patch the current 5.5.25 and try this fix to see if it solves our problem? Any other suggestions? ( The problem we have is threads in tomcat stuck in socketRead up to the maxThreads, yet no similar connections on apache webserver. (modjk)) Thanks, Dan Message sent using UebiMiau 2.7.10 - 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 stay on as a windows service
Ljuba Veselinova wrote: > It looks like java is listening to port 8005; there appear to be two > instances of java.exe running and each one of them is listening to > several ports. I need java to run though. Is it safe to end the > instance of java.exe listening to port 8005? If you don't know what the already running instance of java.exe does, "safe" is the wrong word. But since you are experimenting with Tomcat, I'd call it a "safe" bet that it's a Tomcat instance that's already running. You could do a telnet localhost 8005 If telnet is able to connect, type SHUTDOWN an press the Enter key (by default with Windows' telnet you won't get any visual feedback of what you type). Wait a few seconds and check whether the java.exe process bound to 8005 is still running. Regards mks - 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 and IIS losing their link
Travis Haagen wrote: Hello, I've got IIS 6.0 linked with Tomcat 5.5.25 (with JDK 1.5.0_14-b03 and AJP dll) via the ISAPI connector (JK 1.2.25) on Windows 2003 Server, and during high traffic periods, the connection between IIS and Tomcat is being severed. This has been occurring in the mid-afternoon every day since this server went live and to get it running again, I've had to restart Tomcat. The peak connections to IIS during one of the days was just under 100, so this isn't really all that high of traffic. The isapi_redirect.log isn't much help. It has only been logging errors after the connection to Tomcat has been broken. Tomcat itself hasn't logged anything of relevance and I don't actually think that Tomcat is affected when the link is broken, but as I mentioned earlier, I have to restart Tomcat to get it to reconnect with IIS. Nevertheless at least i would be curious to know, what the exact contents of the isapi redirector log files are. We don't need all of it, but the first 100 lines or so could be interesting. What's you log level? Have a look at the other thread running on this list the last few days ("ISAPI JK2 ran better than JK, how can that be?"). To get a slightly better idea what's happening when, you could also introduce a load balancer and a status worker. Most likely it would help to take Java Thread Dumps and look inside the JVM, what your request threads are doing, when IIS gets stuck. Regards, Rainer - 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: Question about tomcat bugzilla which is resolved but not fixed.
Dan wrote: > Hi, > I notice that this issue has been marked fixed, but the comments on there > indicate that the bug isnt actually fixed, and that the problem remains. > Indeed, looking in the source of 5.5.25 it does not seem to contain the code > in the patch in this issue. The actual patch applied is here. http://marc.info/?l=tomcat-dev&m=110740182826539&w=2 > Can anyone answer why not? Only generally. I haven't looked at the patch in detail but Bill knows what he is doing. I suspect the proposed patch worked but didn't do things in the correct manner given how the Handler was designed. > I wonder if i should attempt to patch the > current 5.5.25 and try this fix to see if it solves our problem? Any other > suggestions? You could try but I doubt it would work any better than Bill's patch. > ( The problem we have is threads in tomcat stuck in socketRead up to the > maxThreads, yet no similar connections on apache webserver. (modjk)) Can you reproduce this for one thread with a single request? A reliable test case is what is really needed to track any further problems down. Mark - 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 Process Memory Leak?
> Any ideas about what could be causing this? I realize it could be an > application-related leak, but in that case wouldn't we see it running out of > heap? Server-side application leaks are really hard to figure out, because they usually only happen in a high-traffic production environment and are difficult to produce on development machines. Basically, you should look at bug reports (e.g., bugzilla) for all of the 3rd party libraries that your application uses, or at least those libraries that have been added/upgraded since this problem started occuring. For each component, search for 'memory leak' and see where that gets you. Good luck, Travis - 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 stay on as a windows service
Thank you Alan and Markus! I followed the instructions of both you and I kept getting info (via netstat) about a java.exe listening on port 8005 on localhost. I went and uninstalled both Tomcat and java; made sure all references to them are gone from the system variables and also deleted their keys from the registry. To make sure all java is gone from the computer I typed java -version at the command prompt and got a response that java is not a recognized command. Then I rebooted the machine. However, after all this, I am still getting info about two instances of java.exe listening on several ports, one of which is 8005. So I still need help. Thanks, Ljuba On Dec 14, 2007 5:38 PM, Markus Schönhaber <[EMAIL PROTECTED]> wrote: > Ljuba Veselinova wrote: > > > It looks like java is listening to port 8005; there appear to be two > > instances of java.exe running and each one of them is listening to > > several ports. I need java to run though. Is it safe to end the > > instance of java.exe listening to port 8005? > > If you don't know what the already running instance of java.exe does, > "safe" is the wrong word. But since you are experimenting with Tomcat, > I'd call it a "safe" bet that it's a Tomcat instance that's already > running. You could do a > telnet localhost 8005 > If telnet is able to connect, type > SHUTDOWN > an press the Enter key (by default with Windows' telnet you won't get > any visual feedback of what you type). Wait a few seconds and check > whether the java.exe process bound to 8005 is still running. > > > Regards > mks > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- === Ljuba Veselinova Dept of Linguistics Email: [EMAIL PROTECTED] Stockholm University Phone: +46-8-16 2332 106 91 Stockholm Fax : +46-8-15 5389 Sweden URL : http://www.ling.su.se/staff/ljuba/ "We learn by going where we want to go." Julia Cameron - 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 stay on as a windows service
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Ljuba Veselinova > Subject: Re: Tomcat does not stay on as a windows service > > However, after all this, I am still getting info about two instances > of java.exe listening on several ports, one of which is 8005. You have one or more applications installed that include their own JRE and likely some version of Tomcat for internal use. You'll need to find these and either remove them or reconfigure your Tomcat to use a different set of 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Comet position of CRLF in request chunks
I've proposed a patch for this behavior http://svn.apache.org/viewvc?view=rev&revision=604274 http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?r1=604274&r2=604273&pathrev=604274 Filip Filip Hanik - Dev Lists wrote: that's correct, that's how it works. I'll go over the specs to see if this is not what it is supposed to do Filip Paul Dumais wrote: I am using Comet for by directional communication between a native java client and a tomcat server. I noticed that when sending chunks to the Tomcat server over the request stream Tomcat does not like to receive a CRLF at the end of a chunk, it is only accepting the CRLF at the beginning of the following chunk. According to rfc2616 the CRLF should be at the end of each chunk: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 For example tomcat likes this type of chunk to be sent: CRLF chunk-size CRLF chunk-data But it does not like this format: chunk-size CRLF chunk-data CRLF Tomcat basically fires a Comet Read event to the CometProcessor with the chunk data, but afterward fires an ERROR event with subevent type IOEXCEPTION. I have tested this with Tomcat 6.0.14 as well as the trunk (Dec 11th, 2007). Here is the sample code of a java client that connects to a simple CometEcho processor: Socket s = new Socket("localhost", 8080); OutputStream out = s.getOutputStream(); out.write(("POST /CometEcho HTTP/1.1\r\n" + "Host: localhost:8080\r\n" + "Transfer-Encoding: chunked\r\n" + "\r\n").getBytes()); out.flush(); boolean first = true; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); while (s.isConnected()) { String line = reader.readLine(); //String chunk = (first?"":"\r\n")+Integer.toHexString(line.length())+"\r\n"+line; // tomcat only accepts this kind of chunk String chunk = Integer.toHexString(line.length())+"\r\n"+line+"\r\n"; // this format should work according to rfc2616 first = false; out.write(chunk.getBytes()); out.flush(); } I was wondering if someone could explain this, and if this is by design, or if I am using Comet incorrectly. Thank you, Paul - 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] - 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: Comet processor blocks if chunk includes final CRLF
I've proposed a patch for this behavior http://svn.apache.org/viewvc?view=rev&revision=604274 http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?r1=604274&r2=604273&pathrev=604274 Filip Filip Hanik - Dev Lists wrote: hi Chris, Paul Dumais just posted the same issue. I've been bit by it too, I'm gonna review the spec again, and see if and how we can make adjustments to the code Filip Chris Pettitt wrote: Hello, I'm using Tomcat 6.0.14 and its CometProcessor to create a long running connection between an HTTP client and my server. The client posts requests to the server using chunked transfer encoding (each chunk is a complete XML request processed by the servlet). I'm using a servlet that is heavily derived from the example[1] on Tomcat's website. I've found that this implementation blocks the worker thread - which I would not expect - if the client sends a complete chunk and then wait some time before sending the next chunk. I'm using the W3C specification[2] of a chunk: chunk-size CRLF chunk-data CRLF Surprisingly, if I send a chunk that does not include the last CRLF, then the CometProcessor works correctly and does not block. My analysis of the blocking condition follows: ChunkedInputFilter.doRead() reads everything in the chunk except the last CRLF. It defers reading of the last CRLF until the next read() call by setting needCRLFParse to true at line 157. Calling ChunkedInputFilter.available() before receiving new data will therefore return 2, because the CRLF at the end of the chunk have not yet been read. The implementation of org.apache.catalina.connector.InputBuffer.available() always delegates to coyoteRequest.getAvailable() (in my environment, state is not BYTE_STATE or CHAR_STATE during this call). // org.apache.catalina.connector.InputBuffer, ~ line 260 public int available() { int available = 0; if (state == BYTE_STATE) { available = bb.getLength(); } else if (state == CHAR_STATE) { available = cb.getLength(); } if (available == 0) { coyoteRequest.action(ActionCode.ACTION_AVAILABLE, null); available = (coyoteRequest.getAvailable() > 0) ? 1 : 0; // <--- delegates here } return available; } The value that is returned by coyoteRequest.getAvailable() is set by Http11NioProcessor (see processing of ActionCode.ACTION_AVAILABLE at line 1218) to the value returned by its inputBuffer.available(). This method delegates to the ChunkedInputFilter, which returns 2, indicating two available bytes (CR, LF). Ultimately the InputBuffer.available() method above returns 1, because coyoteRequest.getAvailable() returned a non-zero value. Because in.available() in the attached servlet is non-zero, the servlet calls read() again. This time the call blocks, because when it calls read ChunkedInputFilter.doRead() finishes reading the CRLF it has in its buffer, it calls parseChunkHeader which makes a blocking call to readBytes(). Is this misuse of CometProcessor? Is there best practice guidance for managing long running connections with multiple requests with Tomcat? Thanks, Chris [1]: http://tomcat.apache.org/tomcat-6.0-doc/aio.html [2]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 - 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] - 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 and IIS losing their link
Travis take a look at this excerpt from Tomcat committer Mladen Turk.. "Just like Apache Web server for Windows, Microsoft IIS maintains a separate child process and thread pool for serving concurrent client connections. For non server products like Windows 2000 Professional or Windows XP the number of concurrent connections is limited to 10. This mean that you can not use workstation products for production servers unless the 10 connections limit will fulfil your needs. The server range of products does not impose that 10 connection limit, but just like Apache, the 2000 connections is a limit when the thread context switching will take its share and slow down the effective number of concurrent connections. If you need higher load you will need to deploy additional web servers and use Windows Network Load Balancer (WNLB) in front of Tomcat servers. " http://people.apache.org/~mturk/docs/article/ftwai.html this means that Windows 2000 Pro or Windows XP has an artificial limit of 10..2 solutions another (more capable) OS existing OS with WindowsNetworkLoadBalancer Nota Bene: Any diagnosis is incomplete without looking at Java Thread Dumps as Rainier suggested earlier.. Martin- - Original Message - From: "Rainer Jung" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, December 14, 2007 12:20 PM Subject: Re: Tomcat and IIS losing their link > Travis Haagen wrote: > > Hello, > > > > I've got IIS 6.0 linked with Tomcat 5.5.25 (with JDK 1.5.0_14-b03 and > > AJP dll) via the ISAPI connector (JK 1.2.25) on Windows 2003 Server, > > and during high traffic periods, the connection between IIS and > > Tomcat is being severed. This has been occurring in the mid-afternoon > > every day since this server went live and to get it running again, > > I've had to restart Tomcat. The peak connections to IIS during one of > > the days was just under 100, so this isn't really all that high of > > traffic. > > > > The isapi_redirect.log isn't much help. It has only been logging > > errors after the connection to Tomcat has been broken. Tomcat itself > > hasn't logged anything of relevance and I don't actually think that > > Tomcat is affected when the link is broken, but as I mentioned > > earlier, I have to restart Tomcat to get it to reconnect with IIS. > > Nevertheless at least i would be curious to know, what the exact > contents of the isapi redirector log files are. We don't need all of it, > but the first 100 lines or so could be interesting. What's you log level? > > Have a look at the other thread running on this list the last few days > ("ISAPI JK2 ran better than JK, how can that be?"). To get a slightly > better idea what's happening when, you could also introduce a load > balancer and a status worker. > > Most likely it would help to take Java Thread Dumps and look inside the > JVM, what your request threads are doing, when IIS gets stuck. > > Regards, > > Rainer > > - > 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]
directory listings per webapp
I want to create a webapp that just lists the content of a directory - but I don't want to turn on directory listing globally. I've seen lots of people say it can be done, just do but I've yet to find a working example. Can someone tell me what I'm missing here? I have a file: tomcat/conf/Catalina/localhost/foo.xml The contents are: Now this, all by itself works for creating the webapp, and it will get a directory listing if I enable global directory listing in the web.xml file, but I don't want that. So, I created: tomcat/server/webapps/billing/WEB-INF/web.xml The contents are: http://java.sun.com/dtd/web-app_2_3.dtd";> foo org.apache.catalina.servlets.DefaultServlet debug 0 listings true 1 foo /foo/* But this doesn't work. What do I need to do to make this happen? Thanks, Dan - 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: directory listings per webapp
There is a typo in the below. This > tomcat/server/webapps/billing/WEB-INF/web.xml Should have been tomcat/server/webapps/foo/WEB-INF/web.xml So thats not the problem. Dan On Dec 14, 2007 3:10 PM, Dan Armbrust <[EMAIL PROTECTED]> wrote: > I want to create a webapp that just lists the content of a directory - > but I don't want to turn on directory listing globally. > > I've seen lots of people say it can be done, just do but I've yet > to find a working example. Can someone tell me what I'm missing here? > > I have a file: > > tomcat/conf/Catalina/localhost/foo.xml > > The contents are: > > > > > > > Now this, all by itself works for creating the webapp, and it will get > a directory listing if I enable global directory listing in the > web.xml file, but I don't want that. > > So, I created: > > tomcat/server/webapps/billing/WEB-INF/web.xml > > The contents are: > > > Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";> > > > foo > > org.apache.catalina.servlets.DefaultServlet > > debug > 0 > > > listings > true > > 1 > > > > foo > /foo/* > > > > > > But this doesn't work. > > What do I need to do to make this happen? > > Thanks, > > Dan > - 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: directory listings per webapp
> From: Dan Armbrust [mailto:[EMAIL PROTECTED] > Subject: directory listings per webapp > > > Broken record: take out the path attribute; it's not allowed (but it's not this problem). > > foo > /foo/* > Change the to this: / - 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 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 is unable to startup in Windows 2003 Server
Looks like you have an invalid / missing server.xml file. Dan On Dec 12, 2007 3:35 AM, marsulein <[EMAIL PROTECTED]> wrote: > > System configuration is as follow: > OS : Windows 2003 Server > Tomcat: 4.1.36 > JSDK: 1.4.2.13 > > Attached are the error logs generated by tomcat. > http://www.nabble.com/file/p14291662/stderr_20071212.log stderr_20071212.log > http://www.nabble.com/file/p14291662/stdout_20071212.log stdout_20071212.log > > Thank you in advance. > -- > View this message in context: > http://www.nabble.com/Tomcat-is-unable-to-startup-in-Windows-2003-Server-tp14291662p14291662.html > Sent from the Tomcat - User mailing list archive at Nabble.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] > > - 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: directory listings per webapp
> From: Dan Armbrust [mailto:[EMAIL PROTECTED] > Subject: Re: directory listings per webapp > I made those two changes - but I still don't get any directory listing What do you get? Did you restart Tomcat (or insure that the webapp was otherwise redeployed)? What version of Tomcat are you using? To test what's under discussion, I changed webapps/docs/WEB-INF/web.xml to include the following: docsListing org.apache.catalina.servlets.DefaultServlet debug 0 listings true 1 docsListing / References to http://localhost:8080/docs/appdev/printer/docs/ now return a directory listing, whereas before a 404 came back. > Is my path correct for the web.xml file? Probably not. You specified a docBase of /dir/foo for the foo webapp, but appear to have been editing webapps/foo/WEB-INF/web.xml, which is not where you've told Tomcat the app is deployed. It's extremely bad practice to have a directory under the appBase that's the same as one for an app with a docBase that points somewhere else. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: directory listings per webapp
I made those two changes - but I still don't get any directory listing (I can get a file if I name it specifically - so I know that that context is working) Is my path correct for the web.xml file? Or am I missing something else? Thanks, Dan On Dec 14, 2007 3:17 PM, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > From: Dan Armbrust [mailto:[EMAIL PROTECTED] > > Subject: directory listings per webapp > > > > > > > > Broken record: take out the path attribute; it's not allowed (but it's > not this problem). > > > > > foo > > /foo/* > > > > Change the to this: > / > > - 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 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: directory listings per webapp
> Probably not. You specified a docBase of /dir/foo for the foo webapp, > but appear to have been editing webapps/foo/WEB-INF/web.xml, which is > not where you've told Tomcat the app is deployed. It's extremely bad > practice to have a directory under the appBase that's the same as > one for an app with a docBase that points somewhere else. Ahh - there we go. I had tried putting the web.xml file there before - but at the time, I had the incorrect in my web.xml. Thanks a lot. I'll see if I can get access to http://wiki.apache.org/tomcat/FAQ/Miscellaneous and update the answer to this question - since the current answer is pretty poor. It would be nice if someone could update http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html as well, because in general, having documentation basically say "if you don't know how to do this already, too bad" is just bad practice ;) Thanks again, Dan - 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: directory listings per webapp
> From: Dan Armbrust [mailto:[EMAIL PROTECTED] > Subject: Re: directory listings per webapp > > Thanks a lot. I'll see if I can get access to > http://wiki.apache.org/tomcat/FAQ/Miscellaneous and update the answer > to this question - since the current answer is pretty poor. In what way? It describes exactly what must be done - it really is that simple. You created your own problem by putting in a docBase attribute telling Tomcat where the webapp was locating and then editing a web.xml for an entirely different deployment. > It would be nice if someone could update > http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html > as well, because in general, having documentation basically say "if > you don't know how to do this already, too bad" is just bad practice > ;) I think you misunderstand the meaning of "customize" and perhaps are confusing it with "configure". The section on customization discusses only how directory listings are presented. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Joakim T Monstad is out of the office.
I will be out of the office starting 12/14/2007 and will not return until 01/02/2008. I will respond to your message when I return, but can be reached at 952 836 4385.
Re: directory listings per webapp
On Dec 14, 2007 4:17 PM, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > From: Dan Armbrust [mailto:[EMAIL PROTECTED] > > Subject: Re: directory listings per webapp > > > > Thanks a lot. I'll see if I can get access to > > http://wiki.apache.org/tomcat/FAQ/Miscellaneous and update the answer > > to this question - since the current answer is pretty poor. > > In what way? It describes exactly what must be done - it really is that > simple. You created your own problem by putting in a docBase attribute > telling Tomcat where the webapp was locating and then editing a web.xml > for an entirely different deployment. Well, it does now :) Previously - it said "This is done in TOMCAT_HOME/conf/web.xml by changing the listings property for the default servlet." Not exactly very useful in finding out how to do it on a per-app basis. > > > It would be nice if someone could update > > http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html > > as well, because in general, having documentation basically say "if > > you don't know how to do this already, too bad" is just bad practice > > ;) > > I think you misunderstand the meaning of "customize" and perhaps are > confusing it with "configure". The section on customization discusses > only how directory listings are presented. > Its about the only other official doc reference that I came up with after doing a search - so between that and the lacking FAQ, I was left hunting the mailing list where about 50 people seem to have asked the question, and most go away with only turning it on globally. Thanks for your help. Dan - 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: CATALINA_HOME
My Tomcat directory is c:\Tomcat6\apache-tomcat-6.0.14. I tried starting startup.bat but got the error: The CATALINA_HOME environment variable is not defined correctly This environment variable is needed to run this program My CATALINA_HOME environment variable is set to c:\Tomcat6\apache-tomcat-6.0.14\conf Drop the "\conf" directory as catalina home should point to the tomcat base for most deployments and not the conf folder. Also, if you are using the Windows Tomcat Monitor process, this value should be set in the Java tab where you configure things, with an entry like -Dcatalina.home=c:\Tomcat6\apache-tomcat-6.0.14 Note that I'm only running 5.5, so pardon my answer if it doesn't apply to 6. David - 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: Question about tomcat bugzilla which is resolved but not fixed.
"Mark Thomas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan wrote: >> Hi, >> I notice that this issue has been marked fixed, but the comments on there >> indicate that the bug isnt actually fixed, and that the problem remains. >> Indeed, looking in the source of 5.5.25 it does not seem to contain the >> code >> in the patch in this issue. > > The actual patch applied is here. > http://marc.info/?l=tomcat-dev&m=110740182826539&w=2 > >> Can anyone answer why not? > > Only generally. I haven't looked at the patch in detail but Bill knows > what > he is doing. I suspect the proposed patch worked but didn't do things in > the correct manner given how the Handler was designed. > The committed patch actually errors out sooner then the patch in 33374. Also, the committed patch works for e.g. ChannelNioSocket as well. Also, the failure to throw an IOException back to the servlet was fixed in a later patch. >> I wonder if i should attempt to patch the >> current 5.5.25 and try this fix to see if it solves our problem? Any >> other >> suggestions? > > You could try but I doubt it would work any better than Bill's patch. > Actually, my patch should prevent that patch from doing much of anything at all. But feel free to knock yourself out ;). >> ( The problem we have is threads in tomcat stuck in socketRead up to the >> maxThreads, yet no similar connections on apache webserver. (modjk)) > Some firewalls forget to close the socket to the backend when it is closed on the frontend. A work-around is to set a connectionTimeout on the element similar to what is configured on the Apache side. Personally, on a system that I actually care about the maxThreads value, I prefer to set the connectionTimeout only on the Tomcat side and configure to use CPING/CPONG on the Apache side. > Can you reproduce this for one thread with a single request? A reliable > test case is what is really needed to track any further problems down. > > Mark > > > - > 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]
DBCP with tomcat
Hello I am trying to trace database connection leak from my application installed in Tomcat 6.0. I have set up the connection with "logAbandoned="true"". But I do not see log trace. How do I enable this log trace. Regards Sam -- View this message in context: http://www.nabble.com/DBCP-with-tomcat-tp14348564p14348564.html Sent from the Tomcat - User mailing list archive at Nabble.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]