Re: Problems with logout with Tomcat JDBCRealm
Hi André I'm using Tomcat JDBCRealm to authentication and authorization in my app. Login works fine, and when the user press the logout button(calls the session.invalidate()), he cannot login again. You could try adding: session.removeAttribute(User); before you invalidate the session. When the user tries to login, the application is redirected to the page which is configured in form-error-page in the web.xml. It is like the user entered the wrong password. When you say user can only login do you mean tomcat gives them the option to enter their user/pass and it's denied? Tom - 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: Rebuilding Tomcat from sources
Hello Chuck, thank you very much for your answer, this helps me JLZ Message du 27/06/08 15:14 De : Caldarale, Charles R A : Tomcat Users List Copie à : Objet : RE: Rebuilding Tomcat from sources From: JLucas ZB [mailto:[EMAIL PROTECTED] Subject: Re: Rebuilding Tomcat from sources Where can I get tomcat-dbcp.jar, which URL ? (to rebuild tomcat, i had to retrieve it from the binary distrib.) Look in the build.xml and build.properties.default files for source locations. You'll see that tomcat-dbcp.jar is actually constructed from several commons- sources: collections, pool, and dbcp. The default locations of each are under http://archive.apache.org/dist/commons: collections/source/commons-collections-3.2-src.tar.gz pool/source/commons-pool-1.4-src.tar.gz dbcp/source/commons-dbcp-1.2.2-src.tar.gz Since you can't run the ant download target in your environment, you can do the downloads manually, then run the ant build-tomcat-dbcp target to construct the .jar file. Look at lines 676 and following (that's for 6.0.16, may be different in 6.0.14) in the build.xml script. - 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]
Help configuring Tomcat 5.5.15 with Apache 2.0.58
Hi, I need to configure Tomcat 5.5.15 with Apache 2.0.58 so that I can then install ArcIMS 9.2. I am following the instructions in http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShowd=31218, It says there that the HelloWorld example should be working before ArcIMS 9.2 is installed http:// mymachinename /examples/servlets/servlet/HelloWorldExample I cannot get HelloWorld to work at the address http://ling-map.ling.su.se/examples/servlets/servlet/HelloWorldExample However, it does work at http://ling-map.ling.su.se/servlets-examples/servlet/HelloWorldExample Which config file and which path should I change to get the first address to work as required in the installation instructions. Any help or pointers to relevant documentation will be greatly appreciated. Thanks a lot for the help, Ljuba -- === Ljuba Veselinova Dept of Linguistics, Stockholm University, S-10691 Stockholm, Sweden Phone: +46-8-16-2332 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 bottleneck on InternalInputBuffer.parseRequestLine
Thanks for your replies. Charles, I am logging long request in my client code, and a POST request like http://S:8080/solr/select/ can take 250s with 12 posted NameValuePair while this same request can pass OK in hundreds of ms. So I *think* our requests are well formed (I log the request after the Solr server response). According to you, what can cause tomcat to expect more data ? I like the multithread problem on our client suggestion and am going to investigate in this way. Filip, I have many doubts about an expected behaviour. When our server behaves correctly, almost all http threads have the following call stack : at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442) at java.lang.Thread.run(Thread.java:619) They are waiting, not reading... My understanding of Tomcat (please correct me if i am wrong) is that the Coyotte connector dispatches http requests to http threads when needed, though awaking them from their waiting state. The http threads should only read one single request, process and return, shouldn't they? An http thread which is reading (executing parseRequestLine) is not able to handle http request. Eventually they were already processing some request. (again please correct me if i'm wrong). Can you give me more details about why you think that an http thread which is reading a socket for hundreds of seconds is a normal behaviour? After a while, under heavy load, every http thread is doing parseRequestLine and tomcat is not able to serve any more request until these method calls finish. It can last 10 minutes before Tomcat is able to serve new requests. When Tomcat starts to respond again, we can clearly see that some http threads returned to their waiting state. Thank you. Christophe. - Original Message - From: Filip Hanik - Dev Lists [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 02, 2008 5:43 AM Subject: Re: Tomcat bottleneck on InternalInputBuffer.parseRequestLine if you are using keep alive connections, (Tomcat default config) then once a request is done, the system goes into reading the next request, and that is done by calling parseRequestLine, so this is not a bottleneck, but expected behavior. if you switch to the NIO connector, that doesn't do block reading during a keep alive, your numbers would show differently. however, the perf numbers you are looking at are no cause for concern Filip Caldarale, Charles R wrote: From: Christophe Fondacci [mailto:[EMAIL PROTECTED] Subject: Tomcat bottleneck on InternalInputBuffer.parseRequestLine This problem may be related to the one listed here : http://grokbase.com/profile/id:hNxqA0ZEdnD-6GYFRNs-iIkKEvF907F NWdczKYQ719Q I would have my doubts about a five-year-old problem description being pertinent to today's Tomcat. When the problem occurs, we can see threads which are stucked with the following call stack : at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill (InternalInputBuffer.java:700) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine (InternalInputBuffer.java:366) It looks like the parser is waiting for more of the request to show up. Are you positive that the stalled requests are well-formed? Is it possible that there's something not quite thread safe in your client on Server A that might be corrupting the request stream as it's being generated? Can you run a Wireshark or equivalent trace and observe one of the slow ones? (That may be tricky.) - 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
proxy_ajp sticky sessions troubles
According with the documentation, I've tried to setup a load balancer apache2.2.x/tomcat5.5.x; I'm unable to maintain the session. my conf: apache2.2.9/tomcat5.5.26/jdk1.5.0_15,linux redhat5.2 apache side: RewriteEngine On ProxyPreserveHost On ProxyRequests Off ProxyViaOff Proxy balancer://a Order deny,allow Allow from all BalancerMember ajp://vmwaretest08:8009 route=vmwaretest08 loadfactor=1 BalancerMember ajp://vmwaretest08:8010 route=vmwaretest08 loadfactor=1 BalancerMember ajp://vmwaretest08:8011 route=vmwaretest08 loadfactor=1 /Proxy RewriteRule ^\/(.+)\.jsp(.+)? balancer://a/$1.jsp$2 [P,L] ProxyPass /favicon.ico ! ProxyPass /robots.txt ! ProxyPass /images/ ! ProxyPass /a/ balancer://a/ ProxySet balancer://a stickysession=JSESSIONID|jsessionid lbmethod=byrequests nofailover=On tomcat side (server.xml) ... Engine name=Standalone defaultHost=localhost jvmRoute=vmwaretest08 ... It seems ignoring the parameter stickysession=JSESSIONID|jsessionid and/or the parameter nofailover=On The same env. with apache2.0.x/mod_jk1.2.x works instead. Any suggestion[s]/idea[s] Michele
Re: proxy_ajp sticky sessions troubles
Hi Michele, Michele Mase' wrote: According with the documentation, I've tried to setup a load balancer apache2.2.x/tomcat5.5.x; I'm unable to maintain the session. my conf: apache2.2.9/tomcat5.5.26/jdk1.5.0_15,linux redhat5.2 apache side: RewriteEngine On ProxyPreserveHost On ProxyRequests Off ProxyViaOff Proxy balancer://a Order deny,allow Allow from all BalancerMember ajp://vmwaretest08:8009 route=vmwaretest08 loadfactor=1 BalancerMember ajp://vmwaretest08:8010 route=vmwaretest08 loadfactor=1 BalancerMember ajp://vmwaretest08:8011 route=vmwaretest08 loadfactor=1 If all of those share the same route, then the balancer has no way of distinguishing between them when deciding about stickyness. You need to give different routes to the BalancerMembers. /Proxy RewriteRule ^\/(.+)\.jsp(.+)? balancer://a/$1.jsp$2 [P,L] ProxyPass /favicon.ico ! ProxyPass /robots.txt ! ProxyPass /images/ ! ProxyPass /a/ balancer://a/ ProxySet balancer://a stickysession=JSESSIONID|jsessionid lbmethod=byrequests nofailover=On tomcat side (server.xml) ... Engine name=Standalone defaultHost=localhost jvmRoute=vmwaretest08 ... Here you need to use different routes as well, namely the same ones, you configured in the balancer. It seems ignoring the parameter stickysession=JSESSIONID|jsessionid and/or the parameter nofailover=On The same env. with apache2.0.x/mod_jk1.2.x works instead. Any suggestion[s]/idea[s] 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: proxy_ajp sticky sessions troubles
thanx; changing it both apache and tomcat side solved my issue! I've also followed this blog http://www.felixwu.com/blog/?tag=proxy_ajp where the simple config i well explained. Ciao Michele On Wed, Jul 2, 2008 at 3:15 PM, Rainer Jung [EMAIL PROTECTED] wrote: Hi Michele, Michele Mase' wrote: According with the documentation, I've tried to setup a load balancer apache2.2.x/tomcat5.5.x; I'm unable to maintain the session. my conf: apache2.2.9/tomcat5.5.26/jdk1.5.0_15,linux redhat5.2 apache side: RewriteEngine On ProxyPreserveHost On ProxyRequests Off ProxyViaOff Proxy balancer://a Order deny,allow Allow from all BalancerMember ajp://vmwaretest08:8009 route=vmwaretest08 loadfactor=1 BalancerMember ajp://vmwaretest08:8010 route=vmwaretest08 loadfactor=1 BalancerMember ajp://vmwaretest08:8011 route=vmwaretest08 loadfactor=1 If all of those share the same route, then the balancer has no way of distinguishing between them when deciding about stickyness. You need to give different routes to the BalancerMembers. /Proxy RewriteRule ^\/(.+)\.jsp(.+)? balancer://a/$1.jsp$2 [P,L] ProxyPass /favicon.ico ! ProxyPass /robots.txt ! ProxyPass /images/ ! ProxyPass /a/ balancer://a/ ProxySet balancer://a stickysession=JSESSIONID|jsessionid lbmethod=byrequests nofailover=On tomcat side (server.xml) ... Engine name=Standalone defaultHost=localhost jvmRoute=vmwaretest08 ... Here you need to use different routes as well, namely the same ones, you configured in the balancer. It seems ignoring the parameter stickysession=JSESSIONID|jsessionid and/or the parameter nofailover=On The same env. with apache2.0.x/mod_jk1.2.x works instead. Any suggestion[s]/idea[s] 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]
Help with authentication and file upload
Hello, I have two problems using Tomcat while developing a jsp web application, I've been trying to solve them for quite some time but I wasn't able to do so... The first problem is about Tomcat's automatic authentication mechanism. I need to authenticate users that are stored on an HSQL database, and I have this database in the /data folder of my web application project. I am using a form-based authentication, I have correctly set up the login and error pages, and in the login page the form action is j_security_check and the fields have the names j_username and j_password. When I try to access a protected resource, the mechanism correctly prompts me the login form, I enter correct username and password (stored in the database) but then I get redirected to the error page instead of the protected resource. As everything looks correctly set to me, I think that maybe the problem is in the server.xml file, where I have written the following lines to connect the j_security_check with the database: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.hsqldb.jdbcDriver connectionURL=jdbc:hsqldb:hsql://localhost connectionName=SA connectionPassword= userTable=users userNameCol=username userCredCol=password userRoleTable=user_roles roleNameCol=rolename / So I'm guessing... where am I doing some mistake? Everything looks correct to me... The other problem I am having with Tomcat may be easier to solve: I can't upload files greater than 1Mb. I tried specifying the maxpostsize attribute in the server.xml file, like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxPostSize=10/ but I still can't send 1025Kb. Any suggestion? Thanks in advance for your help! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IIS 6.0 / JK1.2.25 / Tomcat 5.5.20 - Service temporary unavailable
I have migrated a customer's server system to the following configuration: MS IIS 6.0 (port 80) Unlimited connections Connection timeout: 120s keep-alive JK 1.2.25 AJP/1.3 Connector isapi_redirect.properties: uri_select=parsed workers.properties: connect_timeout=1 prepost_timeout=1 socket_timeout=10 connection_pool_timeout=60 connection_pool_size=350 Apache Tomcat 5.5.20 (ports 8080 / 8009) Apache Portable Runtime tcnative-1.dll 1.1.12 installed Java options: -XX:MaxPermSize=512m -Xloggc:D:\logs\gc\tomcat-gc.log -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Xms4096m -Xmx5120m server.xml connector 8009: acceptCount=100 maxThreads=400 minSpareThreads=25 maxSpareThreads=75 connectionTimeout=6 This is a dual-core Xeon machine running Windows Server 2003 x64 with 6 GB RAM and Sun Java JDK 1.5. I have to reboot Tomcat every night, and even then I have to restart Tomcat manually almost every day because of a Service temporary unavailable message. When Tomcat is hanging, JK Status Manager shows a Bad/Stopped worker. A reset of the worker doesn't fix the problem, neither does a restart of IIS. Only restarting Tomcat fixes the problem. The isapi_redirect log contains a lot of these lines: [Wed Jul 02 16:19:16.908 2008] [11604:13424] [info] ajp_send_request::jk_ajp_common.c (1265): (ajp13w) all endpoints are disconnected [Wed Jul 02 16:19:16.908 2008] [11604:13424] [info] ajp_service::jk_ajp_common.c (2085): (ajp13w) sending request to tomcat failed, recoverable operation attempt=1 I have also tried the 1.2.26 connector. It seemed like it needed a restart even sooner with that one. These lines were in isapi_redirect.log a lot of times with the 1.2.26 version: [Wed Jul 02 15:44:51.040 2008] [11604:12396] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (ajp13w) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=60) [Wed Jul 02 15:44:51.040 2008] [11604:12396] [error] ajp_get_reply::jk_ajp_common.c (1658): (ajp13w) Tomcat is down or refused connection. No response has been sent to the client (yet) [Wed Jul 02 15:44:51.040 2008] [11604:12396] [info] ajp_service::jk_ajp_common.c (2046): (ajp13w) receiving from tomcat failed, recoverable operation attempt=0 [Wed Jul 02 15:44:51.040 2008] [11604:12396] [info] ajp_service::jk_ajp_common.c (2085): (ajp13w) sending request to tomcat failed, recoverable operation attempt=1 [Wed Jul 02 15:44:51.946 2008] [11604:13156] [error] ajp_service::jk_ajp_common.c (2097): (ajp13w) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jul 02 15:44:51.962 2008] [11604:13156] [info] service::jk_lb_worker.c (1128): service failed, worker ajp13w is in error state [Wed Jul 02 15:44:51.962 2008] [11604:13156] [info] service::jk_lb_worker.c (1191): All tomcat instances are busy or in error state [Wed Jul 02 15:44:51.962 2008] [11604:13156] [error] HttpExtensionProc::jk_isapi_plugin.c (1537): service() failed with http error 503 Nothing important seems to be in the stdout logs right before the problems occur. Only when I was using 1.2.26 of the connector, lots of these messages show up in the stdout: Jul 2, 2008 1:14:17 PM org.apache.jk.common.ChannelSocket processConnection WARNING: processCallbacks status 2 Jul 2, 2008 1:14:17 PM org.apache.jk.core.MsgContext action WARNING: Error sending end packet java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112) at org.apache.jk.core.MsgContext.action(MsgContext.java:293) at org.apache.coyote.Response.action(Response.java:182) at org.apache.coyote.Response.finish(Response.java:304) at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:281) at org.apache.catalina.connector.Response.finishResponse(Response.java:476) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 51) 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:595) I'm starting to be
Re: IIS 6.0 / JK1.2.25 / Tomcat 5.5.20 - Service temporary unavailable
Additional information: When using version 1.2.26 of the connector, these messages appear in isapi_redirect.log before the messages I quoted in my previous mail: [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] service::jk_lb_worker.c (1221): Forcing recovery once for 1 workers [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_connection_tcp_send_message::jk_ajp_common.c (965): sendfull returned -53 (errno=53) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] ajp_handle_cping_cpong::jk_ajp_common.c (803): can't send cping query [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_connect_to_endpoint::jk_ajp_common.c (904): (ajp13w) cping/cpong after connecting to the backend server failed (errno=53) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13w) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=53) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] ajp_service::jk_ajp_common.c (2186): (ajp13w) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_connection_tcp_send_message::jk_ajp_common.c (965): sendfull returned -53 (errno=53) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] ajp_handle_cping_cpong::jk_ajp_common.c (803): can't send cping query [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_connect_to_endpoint::jk_ajp_common.c (904): (ajp13w) cping/cpong after connecting to the backend server failed (errno=53) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13w) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=53) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] ajp_service::jk_ajp_common.c (2186): (ajp13w) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2) [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] ajp_service::jk_ajp_common.c (2204): (ajp13w) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] service::jk_lb_worker.c (1168): service failed, worker ajp13w is in error state [Wed Jul 02 15:39:34.690 2008] [11800:10604] [info] service::jk_lb_worker.c (1245): All tomcat instances are busy or in error state [Wed Jul 02 15:39:34.690 2008] [11800:10604] [error] HttpExtensionProc::jk_isapi_plugin.c (1527): service() failed with http error 503 Jesse Klaasse wrote: I have also tried the 1.2.26 connector. It seemed like it needed a restart even sooner with that one. These lines were in isapi_redirect.log a lot of times with the 1.2.26 version: [Wed Jul 02 15:44:51.040 2008] [11604:12396] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (ajp13w) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=60) [Wed Jul 02 15:44:51.040 2008] [11604:12396] [error] ajp_get_reply::jk_ajp_common.c (1658): (ajp13w) Tomcat is down or refused connection. No response has been sent to the client (yet) [Wed Jul 02 15:44:51.040 2008] [11604:12396] [info] ajp_service::jk_ajp_common.c (2046): (ajp13w) receiving from tomcat failed, recoverable operation attempt=0 [Wed Jul 02 15:44:51.040 2008] [11604:12396] [info] ajp_service::jk_ajp_common.c (2085): (ajp13w) sending request to tomcat failed, recoverable operation attempt=1 [Wed Jul 02 15:44:51.946 2008] [11604:13156] [error] ajp_service::jk_ajp_common.c (2097): (ajp13w) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jul 02 15:44:51.962 2008] [11604:13156] [info] service::jk_lb_worker.c (1128): service failed, worker ajp13w is in error state [Wed Jul 02 15:44:51.962 2008] [11604:13156] [info] service::jk_lb_worker.c (1191): All tomcat instances are busy or in error state [Wed Jul 02 15:44:51.962 2008] [11604:13156] [error] HttpExtensionProc::jk_isapi_plugin.c (1537): service() failed with http error 503 -- View this message in context: http://www.nabble.com/IIS-6.0---JK1.2.25---Tomcat-5.5.20---%22Service-temporary-unavailable%22-tp18238896p18239267.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: Help configuring Tomcat 5.5.15 with Apache 2.0.58
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ljuba Veselinova Subject: Help configuring Tomcat 5.5.15 with Apache 2.0.58 I need to configure Tomcat 5.5.15 with Apache 2.0.58 so that I can then install ArcIMS 9.2. Two questions: 1) Why such an old level of Tomcat? The current 5.5 version is 5.5.26. 2) Do you really need httpd at all? I cannot get HelloWorld to work at the address http://ling-map.ling.su.se/examples/servlets/servlet/HelloWorldExample However, it does work at http://ling-map.ling.su.se/servlets-examples/servlet/HelloWorldExample The second address is the correct one. The instructions you're following are in error. - 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]
Configuring DataSources using jsp: reload context.xml?
Hello, I'm trying to write a configuration frontend for a webapp. This application uses several data sources, and it should be possible to change the username/password/database/... using the configuration frontend. My idea was that the configuration servlet would modify the META-INF/context.xml file of my webapp, more precicely the Resource entries in this file. However, it seems that changes to those entries are not recognized by Tomcat. Later I read on this mailing list ( http://marc.info/?l=tomcat-userm=121431733620462w=2 ) that JNDI resources are only reloaded on redeploy, so I think my approach is somewhat wrong... Are there any ideas on how to change JNDI resources from a webapp? One Idea of mine was to create a DataSource manually and then use Context.bind(). This seems to destroy the whole portability benefit of using JNDI, though. Also I'm unsure whether such a binding would persist if Tomcat is restarted. I'd appreciate any tipps. Jonas - 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: Configuring DataSources using jsp: reload context.xml?
On Wed, Jul 2, 2008 at 8:53 AM, Jonas Wagner [EMAIL PROTECTED] wrote: I'm trying to write a configuration frontend for a webapp. This application uses several data sources, and it should be possible to change the username/password/database/... using the configuration frontend. My idea was that the configuration servlet would modify the META-INF/context.xml file of my webapp, more precicely the Resource entries in this file. Are these data sources known in advance, or can the configuration tool user come up with an arbitrary new one at any time? -- Hassan Schroeder [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: Help configuring Tomcat 5.5.15 with Apache 2.0.58
Date sent: Wed, 02 Jul 2008 12:32:58 +0200 From: Ljuba Veselinova [EMAIL PROTECTED] Subject:Help configuring Tomcat 5.5.15 with Apache 2.0.58 To: users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Hi, I need to configure Tomcat 5.5.15 with Apache 2.0.58 so that I can then install ArcIMS 9.2. I am following the instructions in http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articl eShowd=31218, It says there that the HelloWorld example should be working before ArcIMS 9.2 is installed http:// mymachinename /examples/servlets/servlet/HelloWorldExample I cannot get HelloWorld to work at the address http://ling-map.ling.su.se/examples/servlets/servlet/HelloWorldExample However, it does work at http://ling-map.ling.su.se/servlets-examples/servlet/HelloWorldExample The ArcIMS instructions say to use (from the url you provided) http://server_name/servlets-examples/servlet/HelloWorldExample not the first url you are trying. I'm not sure where you got the first url from. -Steve O. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to turn off tomcat daemon?
I ran tomcat as a daemon via the command below: ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap How to turn if off? Thanks for any thoughts. -- View this message in context: http://www.nabble.com/How-to-turn-off-tomcat-daemon--tp18243892p18243892.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 turn off tomcat daemon?
On 2 Jul 2008 at 11:29, kjwchu wrote: Date sent: Wed, 02 Jul 2008 11:29:36 -0700 (PDT) From: kjwchu [EMAIL PROTECTED] Subject:How to turn off tomcat daemon? To: users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org I ran tomcat as a daemon via the command below: ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap How to turn if off? from the Tomcat5.sh in jsvc.tar.gz: $DAEMON_HOME/src/native/unix/jsvc \ -stop \ -pidfile $PID_FILE \ org.apache.catalina.startup.Bootstrap -Steve O. - 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 turn off tomcat daemon?
Just kill the jsvc process. It'll trap the signal and send a proper shutdown to tomcat. See the sample service script provided with jsvc source. --David kjwchu wrote: I ran tomcat as a daemon via the command below: ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap How to turn if off? Thanks for any thoughts. - 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 turn off tomcat daemon?
Thanks, but I also noticed there is a java process. Kill it too? There is no graceful shutodwn or exit? /jdk1.5.0_15/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/nreg/apache-tomcat-6.0.16/conf/logging.properties -Djava.endorsed.dirs=/nreg/apache-tomcat-6.0.16/endorsed -classpath :/nreg/apache-tomcat-6.0.16/bin/bootstrap.jar -Dcatalina.base=/nreg/apache-tomcat-6.0.16 -Dcatalina.home=/nreg/apache-tomcat-6.0.16 -Djava.io.tmpdir=/nreg/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start David Smith-2 wrote: Just kill the jsvc process. It'll trap the signal and send a proper shutdown to tomcat. See the sample service script provided with jsvc source. --David kjwchu wrote: I ran tomcat as a daemon via the command below: ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap How to turn if off? Thanks for any thoughts. - 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/How-to-turn-off-tomcat-daemon--tp18243892p18244392.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 turn off tomcat daemon?
I started tomcat with sudo. So I think I should use sudo to turn it off. However, the jsvc process is still there. [EMAIL PROTECTED] bin]$ sudo ./jsvc -stop -pidfile ../temp/jsvc.pid org.apache.catalina.startup.Bootstrap Password: [EMAIL PROTECTED] bin]$ ps -ef | grep jsvc root 30117 1 0 Jul01 ?00:00:00 jsvc.exec -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -pidfile ./temp/jsvc.pid org.apache.catalina.startup.Bootstrap root 30118 30117 0 Jul01 ?00:00:04 jsvc.exec -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -pidfile ./temp/jsvc.pid org.apache.catalina.startup.Bootstrap [EMAIL PROTECTED] bin]$ Steve Ochani wrote: On 2 Jul 2008 at 11:29, kjwchu wrote: Date sent:Wed, 02 Jul 2008 11:29:36 -0700 (PDT) From: kjwchu [EMAIL PROTECTED] Subject: How to turn off tomcat daemon? To: users@tomcat.apache.org Send reply to:Tomcat Users List users@tomcat.apache.org I ran tomcat as a daemon via the command below: ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap How to turn if off? from the Tomcat5.sh in jsvc.tar.gz: $DAEMON_HOME/src/native/unix/jsvc \ -stop \ -pidfile $PID_FILE \ org.apache.catalina.startup.Bootstrap -Steve O. - 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/How-to-turn-off-tomcat-daemon--tp18243892p18244593.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: IIS 6.0 / JK1.2.25 / Tomcat 5.5.20 - Service temporary unavailable
Hi Jesse, Jesse Klaasse schrieb: I have migrated a customer's server system to the following configuration: MS IIS 6.0 (port 80) Unlimited connections Connection timeout: 120s keep-alive JK 1.2.25 AJP/1.3 Connector isapi_redirect.properties: uri_select=parsed workers.properties: connect_timeout=1 prepost_timeout=1 socket_timeout=10 connection_pool_timeout=60 connection_pool_size=350 Apache Tomcat 5.5.20 (ports 8080 / 8009) Apache Portable Runtime tcnative-1.dll 1.1.12 installed Java options: -XX:MaxPermSize=512m -Xloggc:D:\logs\gc\tomcat-gc.log -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Xms4096m -Xmx5120m server.xml connector 8009: acceptCount=100 maxThreads=400 minSpareThreads=25 maxSpareThreads=75 connectionTimeout=6 This is a dual-core Xeon machine running Windows Server 2003 x64 with 6 GB RAM and Sun Java JDK 1.5. I have to reboot Tomcat every night, and even then I have to restart Tomcat manually almost every day because of a Service temporary unavailable message. When Tomcat is hanging, JK Status Manager shows a Bad/Stopped worker. A reset of the worker doesn't fix the problem, neither does a restart of IIS. Only restarting Tomcat fixes the problem. Double check: The worker is a member of a load balancer. the member is *not* in state STOP (because that is a configuration state) but in ERROR (which is a runtime detected state). If this state doesn't go away, we have a persistent comminucation problem with Tomcat (which is what your log files confirm). In order to analyze, why this is, we can check the state of Tomcat itself, and we can think about the state of the communication between IIS and Tomcat. First: you don't use a reply_timeout? At this stage you shouldn't, just want to make sure. Regarding error codes: the two digit error codes XX (like 60 or 53) corrspond to winsock error codes 100XX. Those are listed e.g. on http://support.microsoft.com/kb/819124 53=10053=WSAECONNABORTED 60=10060=WSAETIMEDOUT Now what are possible reasons, and how to analyze? 1) Check the internal status of Tomcat, when the problem shows up. For this make a couple of thread dumps, e.g. three thread dumps each about 3 seconds apart from each other. Thread dumps contain the information, in which method stack each Tomcat thread is. So we can see, how many Tomcat threads actually are working on a request, and often we can only see, what type of request, if they are waiting for database responses etc. With this test we can check whether there is congestion inside Tomcat, or if the problem lies in the communication layer between IIS and Tomcat. How to do thread dumps: if Tomcat is running from a DOS box, you can use CTRL-Break on the keyboard (and the dumps go directly to the DOS box), if it is running as a service, there is an entry in the context menue of the tomcat monitor icon (system tray), and the dumps go to the service log file. You can post the Dumps here, maybe it's better to open an issue, because then you can attach the files to Bugzilla. 2) Assume, that Tomcat seems to be mostly idle, once the problem shows up. Then we would need to understand the communication layer: Use netstat -an on the IIS system and the Tomcat system (if they are not the same) to produce a list of TCP connections and their state. If possible use wireshark to produce a full packet dump of the communications between the two for a minute or so, namely long enough, that the cited log message occur a few times. 3) General suggestion (shot in the dark) You could do a simple test to quickly check: - remove the socket_timeout and - remove the APR connector (tcnative) If this solves the problem, check, if removing only of of them suffices. If this quick test indicates APR connector as problematic, upgrade to 1.1.13 (or the soon to appear 1.1.14). The isapi_redirect log contains a lot of these lines: [Wed Jul 02 16:19:16.908 2008] [11604:13424] [info] ajp_send_request::jk_ajp_common.c (1265): (ajp13w) all endpoints are disconnected [Wed Jul 02 16:19:16.908 2008] [11604:13424] [info] ajp_service::jk_ajp_common.c (2085): (ajp13w) sending request to tomcat failed, recoverable operation attempt=1 Those are only higher level messages, not indicating the root cause. I have also tried the 1.2.26 connector. It seemed like it needed a restart even sooner with that one. These lines were in The log information in 1.2.26 should be more precise though. At least for me ;) isapi_redirect.log a lot of times with the 1.2.26 version: [Wed Jul 02 15:44:51.040 2008] [11604:12396] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (ajp13w) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=60) The line number tells me, that is still 1.2.25, but I assume you get the same message text for 1.2.26. Here I guess: since
[OT] Performance Requirements
Hi all, recently I was asked by someone to define performance requirements for a site without even knowing it (the site). The task was to deliver standard requirements valid for most sites (or portal-like sites). I answered that it's probably impossible without knowing the type of media delivered, whether its web 2.0 or 1.0, and so on... but I think as long as the webserver starts delivering content in between 50 and 100 ms (measured at webserver) the site should be ok. What do you think could be the site-independent performance criterion? best regards Leon - 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 bottleneck on InternalInputBuffer.parseRequestLine
Christophe Fondacci wrote: Thanks for your replies. Charles, I am logging long request in my client code, and a POST request like http://S:8080/solr/select/ can take 250s with 12 posted NameValuePair while this same request can pass OK in hundreds of ms. So I *think* our requests are well formed (I log the request after the Solr server response). According to you, what can cause tomcat to expect more data ? I like the multithread problem on our client suggestion and am going to investigate in this way. Filip, I have many doubts about an expected behaviour. When our server behaves correctly, almost all http threads have the following call stack : at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442) at java.lang.Thread.run(Thread.java:619) They are waiting, not reading... My understanding of Tomcat (please correct me if i am wrong) is that the Coyotte connector dispatches http requests to http threads when needed, though awaking them from their waiting state. The http threads should only read one single request, process and return, shouldn't they? this is what happens, 1. thread goes into socketAccept, waiting for connection 2. thread reads request - parseRequestLine 3. thread executes the request - this is your servlet 4. thread goes into read request - parseRequestLine if 4 times out (which it almost always does at some point, but using the connectionTimeout value, 20sec) then it closes the connection and goes back to the thread pool since you most likely have a fair amount of timeouts happening, then you most likely will show lots of time shown in that method using a profiler. set maxKeepAliveRequests=1 for your connector, and see if you see a different behavior Filip An http thread which is reading (executing parseRequestLine) is not able to handle http request. Eventually they were already processing some request. (again please correct me if i'm wrong). Can you give me more details about why you think that an http thread which is reading a socket for hundreds of seconds is a normal behaviour? After a while, under heavy load, every http thread is doing parseRequestLine and tomcat is not able to serve any more request until these method calls finish. It can last 10 minutes before Tomcat is able to serve new requests. When Tomcat starts to respond again, we can clearly see that some http threads returned to their waiting state. Thank you. Christophe. - Original Message - From: Filip Hanik - Dev Lists [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 02, 2008 5:43 AM Subject: Re: Tomcat bottleneck on InternalInputBuffer.parseRequestLine if you are using keep alive connections, (Tomcat default config) then once a request is done, the system goes into reading the next request, and that is done by calling parseRequestLine, so this is not a bottleneck, but expected behavior. if you switch to the NIO connector, that doesn't do block reading during a keep alive, your numbers would show differently. however, the perf numbers you are looking at are no cause for concern Filip Caldarale, Charles R wrote: From: Christophe Fondacci [mailto:[EMAIL PROTECTED] Subject: Tomcat bottleneck on InternalInputBuffer.parseRequestLine This problem may be related to the one listed here : http://grokbase.com/profile/id:hNxqA0ZEdnD-6GYFRNs-iIkKEvF907F NWdczKYQ719Q I would have my doubts about a five-year-old problem description being pertinent to today's Tomcat. When the problem occurs, we can see threads which are stucked with the following call stack : at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill (InternalInputBuffer.java:700) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine (InternalInputBuffer.java:366) It looks like the parser is waiting for more of the request to show up. Are you positive that the stalled requests are well-formed? Is it possible that there's something not quite thread safe in your client on Server A that might be corrupting the request stream as it's being generated? Can you run a Wireshark or equivalent trace and observe one of the slow ones? (That may be tricky.) - 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 5.5.25 freezes
Hi Anthony, i have same problem sometimes in version 6.0.16, when the thread stuck occurs again, execute the follow shell script, please adjust for your scenario. #!/bin/bash today=`date +%Y%m%d%H%M%S` psId=`/opt/java/jdk1.6.0_06/bin/jps | grep Bootstrap | cut -d' ' -f1` /opt/java/jdk1.6.0_06/bin/jstack -l $psId /mnt/logs/stack/stack${today}.txt execute some times, then post results here, for us to take a look, regards Clóvis On Mon, Jun 30, 2008 at 5:00 AM, Anthony Chamas [EMAIL PROTECTED] wrote: Hello everyone, I am having quite a weird situation on a production server : tomcat seems to be stuck somewhere when handling http requests. The activity being slow (10 users), some requests take exactly 30 minutes to be processed. I have put aside the following : -it happens on any page (not linked to a particular path) -client issue : sniffing the network did not show anything special : POST is ok, ACK is received by the client which waits for the server's reply -database lock : when that happens, I do not see any lock in the database. -filters : we tried to deactivate all of them : same result -I see no errors, warning or something significant in the log files. I am wondering why I am having the 30 minutes delay... maybe someone has encountered the same situation... Thanks in advance for helping me on this one ! Anthony * Here is the architecture : -struts-, spring-, hibernate- based application with loads of pojos and db tables (700) oracle 10g + Tomcat 5.5.25 creating the following DS : Resource name=jdbc/ORACLEDS scope=Shareable type=com.mchange.v2.c3p0.ComboPooledDataSource / ResourceParams name=jdbc/ORACLEDS parameter namefactory/name valueorg.apache.naming.factory.BeanFactory/value /parameter parameter namedriverClass/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namejdbcUrl/name valuejdbc:oracle:thin:@10.10.10.10:1521:SID/value /parameter parameter nameuser/name valueuser/value /parameter parameter namepassword/name valuepwd/value /parameter parameter nameinitialPoolSize/name value10/value /parameter parameter nameminPoolSize/name value10/value /parameter parameter namemaxPoolSize/name value400/value /parameter parameter namemaxIdleTime/name value1/value /parameter parameter nameautoCommitOnClose/name valuefalse/value /parameter parameter namenumHelperThreads/name value50/value /parameter parameter namemaxStatements/name value0/value /parameter /ResourceParams The server.xml dealing with the connector : Connector port=8081 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
nsapi_redirector.so file
Hi, Can anyone help me providing nsapi_redirector.so file(64-bit version). My application is running on solaris sparc os 9, and sunone webserver 6.1 sp9. When i used the one available in the apache website, i am getting ELFCLASS64 error. I tried building it, but getting the following error during the make file. gcc: unrecognised option pthread. However, i am still getting the build file which is just 250 kb. and also the class version error. Thanks Sandeep