Re: FW: Issue with tomcat 6 connector
Martin, Thanks for the email. Please find the answers for your questions. Before that this is connector between sun one webserevr and Tomcat 6 not websphere. a)which OS will you be targetting? Windows 2003 b)which JVM are you implementing? Sun Java 1.6 c)which version Tomcat will you be targetting? Tomcat 6.0.20 d)explain what you want to accomplish I am trying to establish a connector between sun java system webserver 7 and tomcat 6. I used the below documentation to configure http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html Redirection is working fine but jsp is not serving. that is the only problem here. If you could help me in that that would be great. On Sun, Mar 20, 2011 at 2:23 PM, Martin Gainty mgai...@hotmail.com wrote: From: mgai...@hotmail.com To: users@tomcat.apache.org Subject: RE: Issue with tomcat 6 connector Date: Sun, 20 Mar 2011 08:59:57 -0400 looks like you're trying to install WebSphere Application Server plugin first you want to gain an understanding of how connectors work so you should read: http://tomcat.apache.org/connectors-doc i would suggest one of 2 avenues: 1)request the functionality you desire be installed to on existing jk connector but look at workers.properties and uriworkers.properties and determine first if the functionality currently exists to support your requirement. 2)Use the configuration, layout identified by placement of folders and files and construct a new connector and build the connector on your OS a)which OS will you be targetting? b)which JVM are you implementing? c)which version Tomcat will you be targetting? d)explain what you want to accomplish cheers, Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Sat, 19 Mar 2011 21:13:13 -0700 Subject: Re: Issue with tomcat 6 connector From: kris...@gmail.com To: mgai...@hotmail.com CC: users@tomcat.apache.org HI Martin, Thanks for the email. I hope you require my magus conf. Here you go. # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # Init fn=load-modules shlib=j2eeplugin.dll Init fn=load-modules shlib=D:/Agent/144703-01/web_agents/sjsws_agent/lib/ames6.dll funcs=web_agent_init,validate_session_policy,append_post_data,process_notification Init fn=web_agent_init dsameconfdir=D:/Agent/144703-01/web_agents/sjsws_agent/Agent_002/config LateInit=yes Init fn=pool-init disable=false Init fn=load-modules funcs=jk_init,jk_service shlib=C:/Program Files/Oracle/WebServer7/https-dca-app-170/config/nsapi_redirect.dll shlib_flags=(global|now) Init fn=jk_init worker_file=C:/Program Files/Oracle/WebServer7/https-dca-app-170/config/workers.properties log_level=debug log_file=C:/Program Files/Oracle/WebServer7/https-dca-app-170/logs/nsapi.log shm_file=C:/Program Files/Oracle/WebServer7/https-dca-app-170/config/logs/jk_shm Krish On Sat, Mar 19, 2011 at 9:03 PM, Martin Gainty mgai...@hotmail.com wrote: you're routing jsp to jk-service what is jk-service Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund
Re: FW: Issue with tomcat 6 connector
2011/3/21 Krish kris...@gmail.com: Martin, Thanks for the email. Please find the answers for your questions. Before that this is connector between sun one webserevr and Tomcat 6 not websphere. a)which OS will you be targetting? Windows 2003 b)which JVM are you implementing? Sun Java 1.6 c)which version Tomcat will you be targetting? Tomcat 6.0.20 d)explain what you want to accomplish I am trying to establish a connector between sun java system webserver 7 and tomcat 6. I used the below documentation to configure http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html You have: NameTrans fn=assign-name from=/*.jsp/ name=jknsapi According to the examples on the above mentioned page you should not have trailing / after *.jsp. BTW, I think that you have seen it: The file obj.conf seems to be sensitive to leading white space in lines, especially in the Object element. (It looks like the two last Object in your conf are intentionally misconfigured with a typo in ppath attribute name). Redirection is working fine but jsp is not serving. that is the only problem here. If you could help me in that that would be great. On Sun, Mar 20, 2011 at 2:23 PM, Martin Gainty mgai...@hotmail.com wrote: -- Krish - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: FW: Issue with tomcat 6 connector
Hi, Thanks for the reply. I changed the obj.conf as u suggested. Still it is same. It is not recognizing any jsp file. It says 404 file not found error. It only looks for html pages. Regards, Krish On Sun, Mar 20, 2011 at 11:40 PM, Konstantin Kolinko knst.koli...@gmail.com wrote: 2011/3/21 Krish kris...@gmail.com: Martin, Thanks for the email. Please find the answers for your questions. Before that this is connector between sun one webserevr and Tomcat 6 not websphere. a)which OS will you be targetting? Windows 2003 b)which JVM are you implementing? Sun Java 1.6 c)which version Tomcat will you be targetting? Tomcat 6.0.20 d)explain what you want to accomplish I am trying to establish a connector between sun java system webserver 7 and tomcat 6. I used the below documentation to configure http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html You have: NameTrans fn=assign-name from=/*.jsp/ name=jknsapi According to the examples on the above mentioned page you should not have trailing / after *.jsp. BTW, I think that you have seen it: The file obj.conf seems to be sensitive to leading white space in lines, especially in the Object element. (It looks like the two last Object in your conf are intentionally misconfigured with a typo in ppath attribute name). Redirection is working fine but jsp is not serving. that is the only problem here. If you could help me in that that would be great. On Sun, Mar 20, 2011 at 2:23 PM, Martin Gainty mgai...@hotmail.com wrote: -- Krish - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Krish
Max value of MaxPermSize
hi friends, I have to increase size of MaxPermSize by altering this line on catalina.sh as i am having memory errors. I wanted to know what is hte max size i can set as i have 3.5 GB RAM (on a VPS) and most of this is free. i am runnign Centos , tomcat 5.5 . if [ -r $CATALINA_HOME/bin/tomcat-juli.jar ]; then JAVA_OPTS=$JAVA_OPTS -server* -Xms1024M -Xmx1024M -XX:MaxPermSize=2048M*-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager LOGGING_CONFIG=-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties else # Bugzilla 45585 LOGGING_CONFIG=-Dnop fi Pl. advice. -- Thanks and kind Regards, Abhishek jain
Re: Session timeouts: ignore periodic polling URL?
On Sun, 20 Mar 2011 22:26:46 +0100, André Warnier wrote: Felix Schumacher wrote: ... The creation or retrieval of a session, as far as I understand it, is totally under application control. In other words, if your servlet (or JSP), when it is called, executes a HttpServletRequest.getSession() call, then it will retrieve the existing session (or create one if none exists yet); and if it does not call getSession(), it will not. If the browser sends a session-id, tomcat will touch the session and mark it as alive. My response above was made on the base of the Servlet Specification and the Javadoc of HttpRequest.getSession(). I am not versed enough in the specifics of the Tomcat code to contradict what you say above. But I remain unconvinced. It sounds illogical that the container would go look for the session, before it is explicitly asked to do so. You are right. I tested it with three simple files. First set an attribute in the session and redirects after 45 seconds to a second page. That page requests no session at all and redirects after 45 seconds to a third page. That page requests a session and tries to display the set attribute. As you suspected, it fails to display the attribute (when session timeout is set to on minute :) So the session is only refreshed (at least with my tested tomcat 6.0.32) when a session is requested by a servlet. So I suspect the OP is requesting a session within his ajax-requests. If he is requesting a session, the thread I mentioned in my earlier post, could help him. Thanks for correcting me Felix So we need a real Tomcat expert here. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Session timeouts: ignore periodic polling URL?
On 21/03/2011 08:52, Felix Schumacher wrote: On Sun, 20 Mar 2011 22:26:46 +0100, André Warnier wrote: You are both right on some counts and both wrong on some counts. The Servlet spec (section 7.6 in Servlet 3.0) requires that processing a request associated with a session (i.e. has a session ID) updates the sessions access time. Since this is can be viewed as inefficient, it is disabled by default. In 5.5.x and 6.0.x it is enabled by the use of the org.apache.catalina.STRICT_SERVLET_COMPLIANCE system property. In Tomcat 7.0.x, there is a separate org.apache.catalina.core.StandardHostValve.ACCESS_SESSION property although the default is changed by org.apache.catalina.STRICT_SERVLET_COMPLIANCE This is all documented in the Tomcat 6 and Tomcat 7 docs: http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 graceful shutdown
On 21/03/2011 02:15, Igor Cicimov wrote: Hi, I'm running Tomcat 6.0.26 on Solaris 10 and have a question about what exactly happens during Tomcat graceful shutdown? I guess first thing it does is stop accepting new sessions on the listening ports. Sessions aren't received on ports, requests are. just for the servelets to finish their current requests? New requests are not processed. Existing requests are allowed to continue. What happens exactly with the servlets and the threads? In general, how the threads and servlets are being destroyed during graceful shutdown? Servlets are given a short time to complete and if they don't the JVM shuts down anyway. Since they run on daemon threads those threads will be forcibly stopped by the JVM during shutdown. Application generated threads should be stopped by the application. When I issue the following command from the unix shell: # $TOMCAT_HOME/bin/catalina.sh stop 600 I can still see the server being shut down in less than 10 seconds although I specify 10 minutes delay. Does that mean that the server has already shut down all the resources properly and doesn't have to wait for 10 minutes? Yes. Is the unloadDelay specified in the application Context the only wait of controlling the shutdown process (the servlet unload time)? Yes. How can I make sure that all the requests finish before the server shutdown? Make sure they always complete in less than unloadDelay. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Max value of MaxPermSize
On 21/03/2011 08:01, abhishek jain wrote: hi friends, I have to increase size of MaxPermSize by altering this line on catalina.sh as i am having memory errors. Those settings look very, very odd. I wanted to know what is hte max size i can set as i have 3.5 GB RAM (on a VPS) and most of this is free. i am runnign Centos , tomcat 5.5 . That will be in the documentation for your JVM. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Max value of MaxPermSize
On Mon, Mar 21, 2011 at 2:40 PM, Mark Thomas ma...@apache.org wrote: On 21/03/2011 08:01, abhishek jain wrote: hi friends, I have to increase size of MaxPermSize by altering this line on catalina.sh as i am having memory errors. Those settings look very, very odd. hi, what should be the appropriate settings, and on what basis should i select them, i want max memory given to java. also am i writing these values in the correct location, thanks abhi
Re: Max value of MaxPermSize
On Mon, Mar 21, 2011 at 10:24, abhishek jain abhishek.netj...@gmail.com wrote: [...] what should be the appropriate settings, and on what basis should i select them, i want max memory given to java. You cannot really know offhand what permgen size you'll need. If you use a recent enough Sun JVM, however, you'll be able to have it dynamically size the heap size by using the -XX:+AggressiveHeap startup option. Unfortunately, it cannot dynamically size permgen the way it does heap :/ also am i writing these values in the correct location, With the tomcat base startup scripts, this should be in $CATALINA_BASE/setenv.sh. This file will be sourced by catalina.sh if it exists. -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Max value of MaxPermSize
also am i writing these values in the correct location, With the tomcat base startup scripts, this should be in $CATALINA_BASE/setenv.sh. This file will be sourced by catalina.sh if it exists. Hi I have a feeling that i am writing in wrong place, setenv.sh dont exist in my system, do i need to create that or can i write directly in catalina.sh, if yes where to place this configuration. -- Thanks and kind Regards, Abhishek jain
tomcat issue with DBCP connection pool
Hi I've an web application (Application + Hibernate + DBCP datasource + Oracle) deployed in tomcat. Problem: I've written a thread program where in the run method I'm opening an HTTPURLConnection and feeding a valid input and reading the server response. Running the program for as many as 600 threads with no delay inbetween thread-calls I can get all the 600 requests processed without any issue. However, when I run the wget command (wget --post-file=ac.xml --header=Content-Type:text/xml http://10.227.30.204:9090/ABCService/ABCService) in a loop of 300 iteration to load-test the application I see that the application is failing after request 297 with the following error java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded BTW, my application calls a stored procedure which in turn uses an oracle SYS_REFCURSOR. As I know ref cursor can not be closed through code. Once the error is encountered the application is not recovering until the application is restarted. If anybody can help me out on the aforesaid issue My Environment : Tomcat 6.0.20 Hiberanet 3 Oracle 11g Configurations: 1. hibernate.cfg.xml hibernate-configuration session-factory property name=hibernate.dialectorg.hibernate.dialect.Oracle10gDialect/property property name=hibernate.connection.datasourcejava:comp/env/jdbc/accdb/property property name=current_session_context_classthread/property property name=show_sqltrue/property mapping class=com.abacus.ac.abcevaluation.db.bean.GroupMapping / mapping class=com.abacus.ac.abcevaluation.db.bean.GroupMappingPK / /session-factory /hibernate-configuration 2. DBCP configuration Resource name=jdbc/accdb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@1.2.3.4:1521:DB1 schema=schema_name2 username=user_name2 password= password=password1$ initialSize =5 maxActive=40 maxIdle=5 maxWait=-1 removeAbandoned = true removeAbandonedTimeout = 60 validationQuery=select 1 from dual / -- View this message in context: http://old.nabble.com/tomcat-issue-with-DBCP-connection-pool-tp31199494p31199494.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Max value of MaxPermSize
What kind of memory errors do you have? I have never seen application that uses 2GB of permanent memory. Usually if you have out of memory errors you need to increase the -Xmx1024M and not the permanent memory size. In your setting you have given the JVM heap only 1GB and the permanent memory 2GB which doesn't make sense to me. The perm size shouldn't be more than 500MB or 1GB in the worst case and I'm talking from my experience with huge production applications. How much memory? I think you have answered that question your self - if you have 3.5GB and it's free than give it all to the JVM, especially if it is the only process running on the box. Basically any 32 bit process can grow up to 4GB. But over 3GB can create some problem in troubleshooting big core files so I would say start with -Xmx2048M and -XX:MaxPermSize=512M and see how you go. On Mon, Mar 21, 2011 at 9:14 PM, abhishek jain abhishek.netj...@gmail.comwrote: also am i writing these values in the correct location, With the tomcat base startup scripts, this should be in $CATALINA_BASE/setenv.sh. This file will be sourced by catalina.sh if it exists. Hi I have a feeling that i am writing in wrong place, setenv.sh dont exist in my system, do i need to create that or can i write directly in catalina.sh, if yes where to place this configuration. -- Thanks and kind Regards, Abhishek jain
http thread stops responding
Hello, I have a situation as follows. 3 jsp pages, using a connection pool to postgres. All 3 pages are the same regarding code, only varies the tables where queries are directed. I have 2 or 3 selects on each page where I store the user selection on the session with session.setattribute I get authenticated in the session and I'm able to reach those 3 pages. Problem is, after 2 or 3 reloads or moving from one jsp to another one, pages are not loaded anymore, browser keeps loading for ever. If a redeploy the app I get a memory leak. Using a profiler the http-8080 threads are the one that looks that enters to wait. Any help will be really helpful. Enviado desde blackberry - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Max value of MaxPermSize
abhishek jain wrote: also am i writing these values in the correct location, With the tomcat base startup scripts, this should be in $CATALINA_BASE/setenv.sh. This file will be sourced by catalina.sh if it exists. Hi I have a feeling that i am writing in wrong place, setenv.sh dont exist in my system, do i need to create that or can i write directly in catalina.sh, if yes where to place this configuration. Hey, this is Open Source, and this mailing list is manned by volunteers who try to help other people to the extent of their own knowledge. But it means that you also are supposed to make some effort at finding and reading the on-line documentation, and even scripts and code if necessary. In catalina.sh, there is this section : if [ -r $CATALINA_BASE/bin/setenv.sh ]; then . $CATALINA_BASE/bin/setenv.sh elif [ -r $CATALINA_HOME/bin/setenv.sh ]; then . $CATALINA_HOME/bin/setenv.sh fi It means that it looks there, and *if it exists*, runs it in the context of the current script. (*) Apart from that, and about your basic problem : my own recommendation would be to start by *removing* all these extra command-line switches about memory allocation etc.., and give a chance to the JVM default settings. They have been carefully chosen by experts, to cover the majority of reasonable cases. *Then*, if you still have a problem, try to identify where the problem is, instead of starting to poke left and right with settings that you may not fully understand. (I have about 10 Tomcat servers running with *no* -XX:MaxPermSize and with -Xms256M -Xmx256M, and they are doing fine. Of course your *applications* are different.) (*) Since what you seem to be running is a third-party repackaged Tomcat, it may or may not even run the catalina.sh script. That is something you would have to find out. There is no easy way for people on this list to tell for sure, as we do not know what the packager has done. You should also check if the system itself is a 32-bit or 64-bit system, and check what JVM you are running on it (32-bit or 64-bit). That also matters for knowing how much memory you /can/ allocate to the JVM. (And note that this still relates to the java JVM, not to Tomcat per se). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat v7 Embedded
Bump! :-) On Thu, Mar 17, 2011 at 5:12 PM, Jesse Farinacci jie...@gmail.com wrote: I am trying to embed Tomcat v7.0.11 into a self-contained, executable jar. The jar is created using Maven (assembly plugin) which packages the required Tomcat embedded classes and also an unpacked WAR archive. The listed Main-Class does a very simple creation of a Tomcat server and launches it. The unpacked WAR exploits Servlet 3.0 classpath scanning. Is there no way to point the docBase at the executable jar itself, again which contains the unpacked WAR, and have it auto-extract itself or otherwise be useful? Embedded Jetty provides this capability and it is exceptionally useful. So, right now Tomcat 7 is firing up and serving requests. I just can not figure out the magic incantation to get it to locate the embedded and unpacked WAR where it itself is executing from. Thanks in advance, -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Can't move files using symbolic links (allowLinking=true)
Hi. I need to use a symbolic link to access a certain path in my server, where I'm using Jakarta Tomcat 4.1.18. We stablished a symbolic link to another path. At first, tomcat didn't see this path through the symlink, but we searched for it and found the allowLinking=true feature. Now, it sees the path. However, and here comes the problem, it doesn't allow to move files to this path. We've tried to move files manually with the same user of tomcat and it works well, but it doesn't via the web application. Besides, this feature worked perfect before making this folder reachable through a symlink. And we don't know what we have done wrong. Any help? This is our config.xml: Context path=/documents docBase=/opt/rware/sgidoc/data debug=0 reloadable=true crossContext=true Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / /Context Context path=/documents/temp docBase=/opt/rware/my_app/pdf_mark debug=0 reloadable=true crossContext=true/ Context path=/my_app docBase=sgidoc debug=5 reloadable=true crossContext=true Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / Resource name=jdbc/YatskivBD auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/YatskivBD parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value30/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value-1/value /parameter parameter namemaxWait/name value1/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql:// 127.0.0.1:5432/my_app/value /parameter parameter nameusername/name valueuser/value /parameter parameter namepassword/name valuepass/value /parameter /ResourceParams /Context Context path=/my_app_2 docBase=/home/my_app_2/webapp debug=5 reloadable=true crossContext=true Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / Resource name=jdbc/YatskivBD auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/YatskivBD parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value30/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value-1/value /parameter parameter namemaxWait/name value1/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql:// 127.0.0.1:5432/my_app_2/value /parameter parameter nameusername/name valueuser/value /parameter parameter namepassword/name valuepass/value /parameter /ResourceParams /Context
Re: Can't move files using symbolic links (allowLinking=true)
Goyo wrote: Hi. I need to use a symbolic link to access a certain path in my server, where I'm using Jakarta Tomcat 4.1.18. Oh, a real old-timer, he ? You know how old this is, right ? I think some people on this list may still have been in primary school when it was released. See http://tomcat.apache.org/whichversion.html (and 4.1.18 is from 2003, as far as I can tell) We stablished a symbolic link to another path. At first, tomcat didn't see this path through the symlink, but we searched for it and found the allowLinking=true feature. Now, it sees the path. However, and here comes the problem, it doesn't allow to move files to this path. We've tried to move files manually with the same user of tomcat and it works well, but it doesn't via the web application. Besides, this feature worked perfect before making this folder reachable through a symlink. Can you explain more precisely what you mean by moving files ? (who is doing the moving, from where to where, using what,..) (and maybe also tell us which platform this Tomcat is running on, etc..) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Tomcat 7: manager application takes forever to deploy - or not
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Francis, On 3/19/2011 5:49 AM, Francis GALIEGUE wrote: On Fri, Mar 18, 2011 at 22:45, Christopher Schultz ch...@christopherschultz.net wrote: [...] I'm interested to see how you are able to launch Tomcat and have your script continue only after all webapps have been deployed. This is the code right now: [snip] Why not just run this part after calling catalina.sh? MAXITERS=120 ITERS=0 while true; do ITERS=$((ITERS+1)) if [ $ITERS -gt $MAXITERS ]; then echo echo 2 BUG: Tomcat not started after $MAXITERS seconds! exit 1 fi perl -ne print if /^$STAMP$/ .. eof() $LOGFILE | \ egrep -q ^INFO: Server startup in [0-9]+ ms$ RC=$? if [ $RC = 0 ]; then break fi echo -n . sleep 1 done echo Done (in $ITERS seconds) That's the only part that Tomcat's scripts doesn't handle on its own. It is with this script that I noticed the long deploying time of /manager. This is the only way I knew of until yesterday, when I noticed that the shutdown port only gets open after webapps are deployed. I'll switch to this technique (using netstat -ltn|grep -w $SHUTDOWN_PORT or something like that) since it is more reliable (and faster) than scanning the log file: the server startup message may change behind me... Ideally, of course, it'd be very nice if the BootStrap class had, said, a fullstart command: I wouldn't need any of these ;) Really? How would you launch a process in the foreground and then have it go into the background to resume your script? I'm just trying to save you some of your own time. I'm not going to argue with you about it :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2HX2wACgkQ9CaO5/Lv0PCnFwCeIt9nFI3i/D/DWTzwtKP8WjDJ /3QAnReSCyf2XnPwZYdVvGCML8L5L7Xx =CMw1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat v7 Embedded
On 21/03/2011 12:55, Jesse Farinacci wrote: Bump! :-) This feature doesn't (yet) exist. Patches welcome. Mark On Thu, Mar 17, 2011 at 5:12 PM, Jesse Farinacci jie...@gmail.com wrote: I am trying to embed Tomcat v7.0.11 into a self-contained, executable jar. The jar is created using Maven (assembly plugin) which packages the required Tomcat embedded classes and also an unpacked WAR archive. The listed Main-Class does a very simple creation of a Tomcat server and launches it. The unpacked WAR exploits Servlet 3.0 classpath scanning. Is there no way to point the docBase at the executable jar itself, again which contains the unpacked WAR, and have it auto-extract itself or otherwise be useful? Embedded Jetty provides this capability and it is exceptionally useful. So, right now Tomcat 7 is firing up and serving requests. I just can not figure out the magic incantation to get it to locate the embedded and unpacked WAR where it itself is executing from. Thanks in advance, -Jesse - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Max value of MaxPermSize
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Abhishek, On 3/21/2011 6:14 AM, abhishek jain wrote: also am i writing these values in the correct location, With the tomcat base startup scripts, this should be in $CATALINA_BASE/setenv.sh. This file will be sourced by catalina.sh if it exists. I have a feeling that i am writing in wrong place, setenv.sh dont exist in my system, do i need to create that Yes, you can create it. It's better to create this file because it won't be overwritten by any Tomcat upgrades you might perform in the future. or can i write directly in catalina.sh, if yes where to place this configuration. You *can* put this into catalina.sh, but it would be better not to. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2HYboACgkQ9CaO5/Lv0PBPLwCgkNB2NMLGWsIHanH7emroXs2C u88An2jZaM3mwkzRvQMTx7Eu0bCFeCDi =xNcw -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat issue with DBCP connection pool
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To whom it may concern, On 3/21/2011 6:59 AM, the_biswa wrote: I've written a thread program where in the run method I'm opening an HTTPURLConnection and feeding a valid input and reading the server response. Do you launch this thread during normal request processing? If so, do you wait on this thread to complete before allowing the request processing thread to continue? I'm asking because if you launch a thread and then complete the request without waiting, there is a high likelihood that you will inappropriately re-use request-scoped objects and create havoc with the container. If you are waiting on the secondary thread anyway, then it's not really necessary at all. Running the program for as many as 600 threads with no delay inbetween thread-calls I can get all the 600 requests processed without any issue. However, when I run the wget command (wget --post-file=ac.xml --header=Content-Type:text/xml http://10.227.30.204:9090/ABCService/ABCService) in a loop of 300 iteration to load-test the application I see that the application is failing after request 297 with the following error java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded Sounds like one of two problems: 1. You are not properly closing your database resources when you are finished with them (see http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/) 2. You need more database resources allocated on the server (see Oracle documentation for configuring server-side resources) BTW, my application calls a stored procedure which in turn uses an oracle SYS_REFCURSOR. As I know ref cursor can not be closed through code. How are you supposed to close that cursor, then? Did you mean you can't close it through Java code, or you can't even close it through PL/SQL? Once the error is encountered the application is not recovering until the application is restarted. Sounds like closing the connection and re-initializing it would probably do the job, too. Is it possible for you to detect the kinds of requests that will allocate these SYS_REFCURSORs and use a one-time connection instead of going through the pool? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2HYRkACgkQ9CaO5/Lv0PAOpQCfWY5OKJoRo1C8Ld//bOTpCC3x t/QAn2qdGxo0uXDU01rf6A+IElsrLDTq =40df -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: http thread stops responding
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexis, On 3/21/2011 8:17 AM, alexis wrote: Problem is, after 2 or 3 reloads or moving from one jsp to another one, pages are not loaded anymore, browser keeps loading for ever. Take some thread dumps. I suspect that you are waiting for a database connection to become available. Are you calling Connection.close() in a finally block in your JSP? Or are you using a tab library that handles all that complexity for you? If a redeploy the app I get a memory leak. :( Have you looked into that? Using a profiler the http-8080 threads are the one that looks that enters to wait. Of course they are: there's virtually nothing else running. The question is *where* are they entering a wait? Any help will be really helpful. Can you post some or all of your JSP? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2HY0wACgkQ9CaO5/Lv0PCXRQCfQbrohH6wQ+Sa5QZvasyvO2MI Ev4An2IOdFF1NSmbNDzr7hS6a/f7XY60 =uwMs -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: http thread stops responding
i made some changes to the code. (posted one jsp at the end of this mail) . change was, to avoid to store values in the session and keeped the values as hiddens in forms. looks like it worked. But . yes, connections are closed, im requesting a connection from the datasource and after use it i close the Statement, the ResultSet and the Connection on every jsp. . im kind a newbie, how can i look into the memory leak? To devel , i run on my laptop (a macbook pro) a local postgres, this postgres has a 5 non-superuser connection limit, but i never had problems with that part since im the only user testing. At first i thought that the database was imposing limits, but i had no logs at all in the database (i have it with logs at debug level). And moving my application to a production server (with 200 connections available) has the same problem (after a while i get a memory heap full message which is logic on this situation i think) Here's one of the jsp's (all the 3 are the same, the only thing that changes are the db tables where the queries are executed) -- %-- Document : displayTime Created on : Feb 13, 2011, 5:27:00 PM Author : alz --% %@page import=java.sql.ResultSet% %@page import=javax.naming.InitialContext% %@page import=javax.sql.DataSource% %@page import=java.util.Enumeration% %@page contentType=text/html pageEncoding=UTF-8% !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; % /* Enumeration e = request.getParameterNames(); while (e.hasMoreElements()) { String parameter = (String) e.nextElement(); out.println(parameter + : + request.getParameter(parameter)); } } */ java.sql.Connection c1; java.sql.Statement s1; java.sql.ResultSet rs1; c1 = null; s1 = null; rs1 = null; DataSource ds = (DataSource) new InitialContext().lookup(java:/comp/env/jdbc/postgres); c1 = ds.getConnection(); s1 = c1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); String query = select distinct(name) from list.vdn where meas='int' order by name; rs1 = s1.executeQuery(query); % html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 link href=css/lcms3.css rel=stylesheet type=text/css / /head body class=bodyframeless % if (request.getParameter(vdnFecha) == null) { % table trtdform name=agentForm action=% request.getRequestURI();% method=POST select name=vdn size=7 % while (rs1.next()) { % option value=%= rs1.getString(name)%%= rs1.getString(name)%/option % } % /selectbr input type=submit name=c_vdn value=vdn /form /td td form name=dateForm action=% request.getRequestURI();% method=POST % if (request.getParameter(vdn) != null) { out.println(input type=\hidden\ name=\vdn\ value=\ + request.getParameter(vdn) + \); } % select name=vdnFecha size=7 % if (request.getParameter(vdn) != null) { rs1 = s1.executeQuery(select distinct(measdate) from list.bcmsvdn where vdnname=' + request.getParameter(vdn) + ' order by measdate desc); while (rs1.next()) { % option value=%= rs1.getString(measdate)%%= rs1.getString(measdate)%/option % } } % /select br input type=submit name=c_measdate value=fecha /form /td/tr/table % } else { //mostrar resultados y poner link de reset out.println(a href=\ + request.getRequestURI() + \Seleccionar otro agente/a); % table tr thID/th thNombre/th
Tomcat 6.0.32, Http11NioProtocol and log poll
Hi, I am using Tomcat 6.0.32 with the Http11NioProtocol connector to implement long polling. My comet processor is holding the HttpSevletResponse (After receiving a CometEvent.BEGIN) on a queue until an event is ready to send back. When it sends back the event, it is writing a binary stream to an applet, so I use response.getOutputStream().write() to send data back. When writing to the stream it is synchronized. I close the OutputStream when finished try { response.setHeader(messageId, messageId); //wrapper for the OutputStream. auctionObjectOutput = new AuctionObjectOutput(response.getOutputStream()); // write to OutputStream auctionObjectOutput.writeObject(event); } finally { try { //internally calls out.flush() and out.close() auctionObjectOutput.close(); } catch (IOException ex) { LogHandler.issueCritical(ex); } } This works and I can continually long poll for new data from the Applet. Problem: Occasionally (like 0.1% of the time), when another web page in a second frame reloads (Independent JSP generated from SpringController in same container) the page loads with what appears to be the byte stream for the applet and I get the following stack trace. It seems from the logs that the when the framed page reloads it is somehow retrieving a stale response object (ie. not recycled properly by the connector). Could this happen and it this likely to be an issue? java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:611) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112) at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118) at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:326) at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:342) at org.apache.jsp.WEB_002dINF.jsp.lot_jsp._jspx_meth_c_005fforEach_005f0(lot_jsp.java:476) at org.apache.jsp.WEB_002dINF.jsp.lot_jsp._jspx_meth_c_005fwhen_005f0(lot_jsp.java:429) at org.apache.jsp.WEB_002dINF.jsp.lot_jsp._jspx_meth_c_005fchoose_005f0(lot_jsp.java:384) at org.apache.jsp.WEB_002dINF.jsp.lot_jsp._jspService(lot_jsp.java:116) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:229) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1031) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:815) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at
RE: Tomcat 6.0.32, Http11NioProtocol and log poll
From: ar...@bca-group.com [mailto:ar...@bca-group.com] Subject: Tomcat 6.0.32, Http11NioProtocol and log poll Occasionally (like 0.1% of the time), when another web page in a second frame reloads (Independent JSP generated from SpringController in same container) the page loads with what appears to be the byte stream for the applet This is pretty much always caused by an application coding error: keeping request information at the wrong scoping level. For example, if you save anything about a specific request as a session attribute, other requests may accidentally use it or overwrite it, causing this kind of confusing. Keeping request-specific information in static fields is another typical example. Nothing absolutely rules out a Tomcat bug, but the odds are against it. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
Yeah, it's a very old version. But we can't change it, anyway. The details about the moving: The application (written in C), first, generates a new file which is stored in one directory, say origin. This step is perfectly made. Then, the application moves this file to another directory target. target was originally a regular directory, but, because of space restrictions, we have changed this folder for a symbolic link which points to another partition in an external drive. So, the path remains the same. The machine is a Red Hat Linux release 7.1 (Seawolf). The server is launched with the same user who is owner of the directory. This directory has the following permissions: drwxr-xr-x And the symbolic link has all the permissions up. Using a terminal, we're able to copy from the first directory to the second directory without problems (it doesn't matter if we do through the symbolic link or directly). Let's write it a little bit clearer: We want to move a file from origin/ to origin/target/ Previously, this movement was made perfect Then, we change origin/target/ for a symlink called target which points to another path in another partition. Now, it doesn't move the file when using the server application (although we can do it manually from the filesystem using the same user of the tomcat server). Any help? 2011/3/21 André Warnier a...@ice-sa.com Goyo wrote: Hi. I need to use a symbolic link to access a certain path in my server, where I'm using Jakarta Tomcat 4.1.18. Oh, a real old-timer, he ? You know how old this is, right ? I think some people on this list may still have been in primary school when it was released. See http://tomcat.apache.org/whichversion.html (and 4.1.18 is from 2003, as far as I can tell) We stablished a symbolic link to another path. At first, tomcat didn't see this path through the symlink, but we searched for it and found the allowLinking=true feature. Now, it sees the path. However, and here comes the problem, it doesn't allow to move files to this path. We've tried to move files manually with the same user of tomcat and it works well, but it doesn't via the web application. Besides, this feature worked perfect before making this folder reachable through a symlink. Can you explain more precisely what you mean by moving files ? (who is doing the moving, from where to where, using what,..) (and maybe also tell us which platform this Tomcat is running on, etc..) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
On 21 March 2011 16:35, Goyo goyocas...@gmail.com wrote: We want to move a file from origin/ to origin/target/ Previously, this movement was made perfect Then, we change origin/target/ for a symlink called target which points to another path in another partition. Now, it doesn't move the file when using the server application (although we can do it manually from the filesystem using the same user of the tomcat server). Can you change the server to move the file to origin/target/. ? Sounds crazy, I know, but you'd be surprised how often referencing the directory that's the target of a symlink resolves such issues. - Peter
RE: Tomcat 6.0.32, Http11NioProtocol and log poll
I don't think I do this but I'm double-checking. Thanks. After writing to the OutputStream, should I just close the OutputStream which seems to generate a CometEvent.CLOSE or explicitly call event.close() after closing the stream? Thanks, Adam Caldarale, Charles R chuck.caldar...@unisys.com 21/03/2011 15:47 Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat 6.0.32, Http11NioProtocol and log poll From: ar...@bca-group.com [mailto:ar...@bca-group.com] Subject: Tomcat 6.0.32, Http11NioProtocol and log poll Occasionally (like 0.1% of the time), when another web page in a second frame reloads (Independent JSP generated from SpringController in same container) the page loads with what appears to be the byte stream for the applet This is pretty much always caused by an application coding error: keeping request information at the wrong scoping level. For example, if you save anything about a specific request as a session attribute, other requests may accidentally use it or overwrite it, causing this kind of confusing. Keeping request-specific information in static fields is another typical example. Nothing absolutely rules out a Tomcat bug, but the odds are against it. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This email and any attachments to it may contain confidential information intended for the addressee only. If you are not the intended addressee, you are strictly prohibited from disclosing, copying, distributing or using this email in any way. Unauthorised use of the information contained in this email is unlawful. If you have received this email in error please notify us on enquir...@bca-group.com and delete the email from your system. Information contained in this email can not be disclosed, copied, distributed or used in any way without the prior consent of the sender. Any opinions, advice or facts given in this email are given without warranty or the intention to enter into an agreement unless specifically stated and confirmed by agreement, letter or such other documentation signed by an authorised signatory of BCA Holdings Limited or any of its subsidiary companies. Any personal information contained in this email is strictly the view of the sender and is in no way authorised or attributable to BCA Holdings Limited or any of its subsidiary companies in any way. All emails through the company gateway are subject to monitoring. The company cannot be held liable for any errors or viruses contained in this message. BCA (438886) Headway House, Crosby Way, Farnham, Surrey GU9 7XG, England VAT registration number: GB 188 1552 38 # This e-mail message has been scanned for Viruses and Content and cleared by NetIQ MailMarshal #
Re: FW: Issue with tomcat 6 connector
Hi, Can somebody help me with this issue. Appreciate your help or let me know what would be the best solution to implement this. Thanks. On Sun, Mar 20, 2011 at 11:17 PM, Krish kris...@gmail.com wrote: Martin, Thanks for the email. Please find the answers for your questions. Before that this is connector between sun one webserevr and Tomcat 6 not websphere. a)which OS will you be targetting? Windows 2003 b)which JVM are you implementing? Sun Java 1.6 c)which version Tomcat will you be targetting? Tomcat 6.0.20 d)explain what you want to accomplish I am trying to establish a connector between sun java system webserver 7 and tomcat 6. I used the below documentation to configure http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html Redirection is working fine but jsp is not serving. that is the only problem here. If you could help me in that that would be great. On Sun, Mar 20, 2011 at 2:23 PM, Martin Gainty mgai...@hotmail.comwrote: From: mgai...@hotmail.com To: users@tomcat.apache.org Subject: RE: Issue with tomcat 6 connector Date: Sun, 20 Mar 2011 08:59:57 -0400 looks like you're trying to install WebSphere Application Server plugin first you want to gain an understanding of how connectors work so you should read: http://tomcat.apache.org/connectors-doc i would suggest one of 2 avenues: 1)request the functionality you desire be installed to on existing jk connector but look at workers.properties and uriworkers.properties and determine first if the functionality currently exists to support your requirement. 2)Use the configuration, layout identified by placement of folders and files and construct a new connector and build the connector on your OS a)which OS will you be targetting? b)which JVM are you implementing? c)which version Tomcat will you be targetting? d)explain what you want to accomplish cheers, Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Sat, 19 Mar 2011 21:13:13 -0700 Subject: Re: Issue with tomcat 6 connector From: kris...@gmail.com To: mgai...@hotmail.com CC: users@tomcat.apache.org HI Martin, Thanks for the email. I hope you require my magus conf. Here you go. # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # Init fn=load-modules shlib=j2eeplugin.dll Init fn=load-modules shlib=D:/Agent/144703-01/web_agents/sjsws_agent/lib/ames6.dll funcs=web_agent_init,validate_session_policy,append_post_data,process_notification Init fn=web_agent_init dsameconfdir=D:/Agent/144703-01/web_agents/sjsws_agent/Agent_002/config LateInit=yes Init fn=pool-init disable=false Init fn=load-modules funcs=jk_init,jk_service shlib=C:/Program Files/Oracle/WebServer7/https-dca-app-170/config/nsapi_redirect.dll shlib_flags=(global|now) Init fn=jk_init worker_file=C:/Program Files/Oracle/WebServer7/https-dca-app-170/config/workers.properties log_level=debug log_file=C:/Program Files/Oracle/WebServer7/https-dca-app-170/logs/nsapi.log shm_file=C:/Program Files/Oracle/WebServer7/https-dca-app-170/config/logs/jk_shm Krish On Sat, Mar 19, 2011 at 9:03 PM, Martin Gainty mgai...@hotmail.com wrote: you're routing jsp to jk-service what is jk-service Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir
Re: Can't move files using symbolic links (allowLinking=true)
The (another) problem is that we can't access the source code :S 2011/3/21 Peter Crowther peter.crowt...@melandra.com On 21 March 2011 16:35, Goyo goyocas...@gmail.com wrote: We want to move a file from origin/ to origin/target/ Previously, this movement was made perfect Then, we change origin/target/ for a symlink called target which points to another path in another partition. Now, it doesn't move the file when using the server application (although we can do it manually from the filesystem using the same user of the tomcat server). Can you change the server to move the file to origin/target/. ? Sounds crazy, I know, but you'd be surprised how often referencing the directory that's the target of a symlink resolves such issues. - Peter
CSRF_NONCE
Hi, On two OSX 10.6.6 machine I try to make a 4 member tomcat cluster. On MachineA tomcat3 and tomcat4, on MachineB tomcat1 and tomcat2. I use MachineA as a reverse proxy. Apache2 is 2.2.17, mod_jk is 1.2.31 and tomcat is 7.0.10 When I try to get to the manager application on one or the other balance members http://bml0066.yalepath.org:8180/manager/html http://bml0065.yalepath.org:8380/manager/html I get a 500 error nyissz HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute org.apache.catalina.filters.CSRF_NONCE org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1440) org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:626) org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:610) org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:154) org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:173) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.10 logs. nyassz Looking the apache error_log on one of the machine I see this: [Mon Mar 21 14:34:43 2011] [error] [client 10.84.2.41] File does not exist: /usr/local/httpd-2.2.17/htdocs/manager So looks like mod_jk did not do its job. However the mod_jk.log file says: [Mon Mar 21 14:13:08.016 2011] [290:140735090613408] [info] init_jk::mod_jk.c (3198): mod_jk/1.2.31 (1026297) initialized Looking into Tomcat's log - catalina.out I see this: nyissz INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost' Mar 21, 2011 2:35:33 PM org.apache.catalina.core.ApplicationContext log INFO: HTMLManager: init: Global resources are available Mar 21, 2011 2:36:18 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [HTMLManager] in context with path [/manager] threw exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute org.apache.catalina.filters.CSRF_NONCE at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1440) at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:626) at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:610) at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:154) at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:173) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:591) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:218) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Mar 21, 2011 2:47:18 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [HTMLManager] in context with path [/manager] threw exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute org.apache.catalina.filters.CSRF_NONCE at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1440) at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:626)
Re: CSRF_NONCE
On 21/03/2011 19:05, János Löbb wrote: When I try to get to the manager application on one or the other balance members http://bml0066.yalepath.org:8180/manager/html http://bml0065.yalepath.org:8380/manager/html Clustering the manager application is a bad idea. It is not designed to be clustered. The main issue is that you can't control the node you are using. That the CSRF_NONCE is not serializable is a separate issue. If you raise a bug in Bugzilla, someone will take a look. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
On 21 March 2011 17:36, Goyo goyocas...@gmail.com wrote: The (another) problem is that we can't access the source code :S *chuckle* Gotta love configurable code. OK, so the issue is that you're short of space. How about mounting a partition at origin/target? Or even origin, depending how short of space you are. If you use loopback, the partition's source doesn't even have to be raw disk - it can be a file. - Peter
Re: CSRF_NONCE
On Mar 21, 2011, at 3:13 PM, Mark Thomas wrote: On 21/03/2011 19:05, János Löbb wrote: When I try to get to the manager application on one or the other balance members http://bml0066.yalepath.org:8180/manager/html http://bml0065.yalepath.org:8380/manager/html Clustering the manager application is a bad idea. It is not designed to be clustered. The main issue is that you can't control the node you are using. That the CSRF_NONCE is not serializable is a separate issue. If you raise a bug in Bugzilla, someone will take a look. Mark Mark, Ok, I moved the distributable/ tag into the examples' web.xml. Now manager/html is happy :-) Thanks a lot, János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
Goyo wrote: Yeah, it's a very old version. But we can't change it, anyway. The details about the moving: The application (written in C), first, generates a new file which is stored in one directory, say origin. This step is perfectly made. Then, the application moves this file to another directory target. target was originally a regular directory, but, because of space restrictions, we have changed this folder for a symbolic link which points to another partition in an external drive. So, the path remains the same. The machine is a Red Hat Linux release 7.1 (Seawolf). The server is launched with the same user who is owner of the directory. This directory has the following permissions: drwxr-xr-x And the symbolic link has all the permissions up. Using a terminal, we're able to copy from the first directory to the second directory without problems (it doesn't matter if we do through the symbolic link or directly). Let's write it a little bit clearer: Maybe you should have started this way. :-) We want to move a file from origin/ to origin/target/ Previously, this movement was made perfect Then, we change origin/target/ for a symlink called target which points to another path in another partition. Now, it doesn't move the file when using the server application (although we can do it manually from the filesystem using the same user of the tomcat server). Maybe a guess : under Unix/Linux, move (mv) is a rename, and it is not the same as copy + delete original. And a move (rename) works as long as the source and target are inside the same filesystem, but not if they are on different filesystems. (copy + delete does work in that case). Maybe your C application (of which you do not have the source code), tries to do a move internally ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat issue with DBCP connection pool
And to thisis it absolutely necessary to use the SYS_REFCURSOR in Oracle? I use several packages and procesures and never use this! Granted, I may have many less records than you in your DB table, but I was just wondering. Perhaps it is. BTW, my application calls a stored procedure which in turn uses an oracle SYS_REFCURSOR. As I know ref cursor can not be closed through code. How are you supposed to close that cursor, then? Did you mean you can't close it through Java code, or you can't even close it through PL/SQL? Once the error is encountered the application is not recovering until the application is restarted. Sounds like closing the connection and re-initializing it would probably do the job, too. Is it possible for you to detect the kinds of requests that will allocate these SYS_REFCURSORs and use a one-time connection instead of going through the pool? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2HYRkACgkQ9CaO5/Lv0PAOpQCfWY5OKJoRo1C8Ld//bOTpCC3x t/QAn2qdGxo0uXDU01rf6A+IElsrLDTq =40df -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat issue with DBCP connection pool
Are you sure it is due to the stored procedure? You can get that error if you don't close all database objects. Make sure you close resultsets, statements, etc in a finally block throughout all your code. On Mon, Mar 21, 2011 at 4:59 PM, Propes, Barry L barry.l.pro...@citi.com wrote: And to thisis it absolutely necessary to use the SYS_REFCURSOR in Oracle? I use several packages and procesures and never use this! Granted, I may have many less records than you in your DB table, but I was just wondering. Perhaps it is. BTW, my application calls a stored procedure which in turn uses an oracle SYS_REFCURSOR. As I know ref cursor can not be closed through code. How are you supposed to close that cursor, then? Did you mean you can't close it through Java code, or you can't even close it through PL/SQL? Once the error is encountered the application is not recovering until the application is restarted. Sounds like closing the connection and re-initializing it would probably do the job, too. Is it possible for you to detect the kinds of requests that will allocate these SYS_REFCURSORs and use a one-time connection instead of going through the pool? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2HYRkACgkQ9CaO5/Lv0PAOpQCfWY5OKJoRo1C8Ld//bOTpCC3x t/QAn2qdGxo0uXDU01rf6A+IElsrLDTq =40df -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
session replication question in 7.0.10
Hi, I have two machines MachineA and MachineB with osx 10.6.6 on them. Both machines have one tomcat 7.0.10 running. On both machine the server.xml was modified minimally: - Uncommented the Cluster tag - added jvmRoute=tomcat(x) to the Engine tag where x member of {1,3}, - changed ports: for example: Engine name=Catalina defaultHost=localhost jvmRoute=tomcat3 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ If I am reading the documentation right I should have the default configuration listed in the how-to, that is I should have the ReplicationValve working. Unfortunately session replication does not work. session variables using the SessionExample application are not carried over to restarted tomcats. I am getting the following on one machine: nyissz Mar 21, 2011 4:39:50 PM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions INFO: Manager [localhost#/examples], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 84, 2, 66}:4000,{10, 84, 2, 66},4000, alive=33001, securePort=-1, UDP Port=-1, id={-43 -8 -66 47 -12 -83 72 -110 -105 -3 -61 111 -111 95 5 113 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds. Mar 21, 2011 4:40:50 PM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions SEVERE: Manager [localhost#/examples]: No session state send at 3/21/11 4:39 PM received, timing out after 60,103 ms. nyassz and somewhat different on the other machine at about the same time: nyissz Mar 21, 2011 4:39:49 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples Mar 21, 2011 4:40:55 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples Mar 21, 2011 4:40:55 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples Mar 21, 2011 4:41:17 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples nyassz With 6.0.18 I had a ReplicationContect in server.xml. I understand that is a No-No these days, so, for the examples webapp should I create a META-INF directory with a contect.xml in it ? I thought examples should work out of box Thanks ahead, János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
On 21 March 2011 20:39, André Warnier a...@ice-sa.com wrote: Maybe a guess : under Unix/Linux, move (mv) is a rename, and it is not the same as copy + delete original. And a move (rename) works as long as the source and target are inside the same filesystem, but not if they are on different filesystems. (copy + delete does work in that case). Nice one André! I'd completely missed that. Maybe your C application (of which you do not have the source code), tries to do a move internally ? Running strace on the process containing the C code would show that up fairly quickly. You'd see rename(2) calls returning EXDEV. If that's the case, changing the symlink to be at origin or mounting a new filesystem at origin would solve this particular problem - but might cause more chaos if there are other moves going on! - Peter
RE: Can't move files using symbolic links (allowLinking=true)
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther Subject: Re: Can't move files using symbolic links (allowLinking=true) Maybe a guess : under Unix/Linux, move (mv) is a rename, and it is not the same as copy + delete original. And a move (rename) works as long as the source and target are inside the same filesystem, but not if they are on different filesystems. Nice one André! I'd completely missed that. Except... I have no problem issuing a shell mv command across filesystems; the shell recognizes that this is not just a simple rename() operation, and acts accordingly. Note that there is no move() API (for filesystems); the concept is a figment of the shell's imagination. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Response Swapping
Hey Mark, Thanks for the response. I have answered your questions below. Mark Thomas wrote: On 18/03/2011 21:05, SQ wrote: Environment: Solaris 10 Apache 2.2.16 mod_jk 1.2.31 Tomcat 5.5.30 JVM 1.6.0_14 Which AJP connector are you using? Is APR/native being used? AJP13. No, I don't see APR being loaded at startup. Only mention of APR in the config is a default setting in server.xml: Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / An upgrade to the latest 5.5.33 wouldn't hurt but I don't see anything in the changelog. Yes, we'll probably give that a go soon, but like you said there isn't much in the changelog that addresses an issue like this. There is this https://issues.apache.org/bugzilla/show_bug.cgi?id=47714 which is tracking various reports of various quality of a similar issue. There are some suggestions about possible work-arounds there too. Yes, I did see this bug listing, but there didn't seem to be a definite result. A couple people mentioned DisableReuse, which we can try, but according to the docs, there is a performance hit. Also, without being able to replicate the issue, its hard to determine if that would help. One of the JSP that got wrong responses in testing contained nothing but html - it doesn't look like code in the JSPs themselves are causing this. That is a useful indicator. Assuming no filters etc. are in the mix then that tends to rule out the app. In earlier, less-intensive testing, we found that requests directly to Tomcat weren't experiencing response swapping, but requests through Apache to Tomcat were - this has not yet been confirmed with the testing tool. This tends to point towards something in Tomcat's AJP connector although based on past experience nothing is certain until we understand exactly what the problem is. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Response-Swapping-tp31185040p31204558.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: session replication question in 7.0.10
On 21/03/2011 21:34, János Löbb wrote: Hi, I have two machines MachineA and MachineB with osx 10.6.6 on them. Both machines have one tomcat 7.0.10 running. On both machine the server.xml was modified minimally: - Uncommented the Cluster tag - added jvmRoute=tomcat(x) to the Engine tag where x member of {1,3}, - changed ports: for example: Engine name=Catalina defaultHost=localhost jvmRoute=tomcat3 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ If I am reading the documentation right I should have the default configuration listed in the how-to, that is I should have the ReplicationValve working. Unfortunately session replication does not work. session variables using the SessionExample application are not carried over to restarted tomcats. What is the SessionExample application? No such application ships with Apache Tomcat. With 6.0.18 I had a ReplicationContect in server.xml. I understand that is a No-No these days, so, for the examples webapp should I create a META-INF directory with a contect.xml in it ? That is context.xml not contect.xml and there should be no need to create it. My guess is that the web application you are using is not marked as distributable/ in web.xml. I thought examples should work out of box That sort of comment isn't going to encourage folks to help you. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: session replication question in 7.0.10
Sorry for the noise, one of the web.xml did not have the distributable/ tag :( Now it is working fine. János On Mar 21, 2011, at 5:34 PM, János Löbb wrote: Hi, I have two machines MachineA and MachineB with osx 10.6.6 on them. Both machines have one tomcat 7.0.10 running. On both machine the server.xml was modified minimally: - Uncommented the Cluster tag - added jvmRoute=tomcat(x) to the Engine tag where x member of {1,3}, - changed ports: for example: Engine name=Catalina defaultHost=localhost jvmRoute=tomcat3 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ If I am reading the documentation right I should have the default configuration listed in the how-to, that is I should have the ReplicationValve working. Unfortunately session replication does not work. session variables using the SessionExample application are not carried over to restarted tomcats. I am getting the following on one machine: nyissz Mar 21, 2011 4:39:50 PM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions INFO: Manager [localhost#/examples], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 84, 2, 66}:4000,{10, 84, 2, 66},4000, alive=33001, securePort=-1, UDP Port=-1, id={-43 -8 -66 47 -12 -83 72 -110 -105 -3 -61 111 -111 95 5 113 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds. Mar 21, 2011 4:40:50 PM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions SEVERE: Manager [localhost#/examples]: No session state send at 3/21/11 4:39 PM received, timing out after 60,103 ms. nyassz and somewhat different on the other machine at about the same time: nyissz Mar 21, 2011 4:39:49 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples Mar 21, 2011 4:40:55 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples Mar 21, 2011 4:40:55 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples Mar 21, 2011 4:41:17 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/examples nyassz With 6.0.18 I had a ReplicationContect in server.xml. I understand that is a No-No these days, so, for the examples webapp should I create a META-INF directory with a contect.xml in it ? I thought examples should work out of box Thanks ahead, János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Response Swapping
On 21/03/2011 22:06, SQ wrote: Mark Thomas wrote: On 18/03/2011 21:05, SQ wrote: Environment: Solaris 10 Apache 2.2.16 mod_jk 1.2.31 Tomcat 5.5.30 JVM 1.6.0_14 Which AJP connector are you using? Is APR/native being used? AJP13. That doesn't answer my question. There are multiple AJP connectors and they all implement the AJP1.3 protocol. Exactly which one are you using? No, I don't see APR being loaded at startup. OK. For confirmation and the detailed connector info I'd like to see the startup log messages for the connectors. There is this https://issues.apache.org/bugzilla/show_bug.cgi?id=47714 which is tracking various reports of various quality of a similar issue. There are some suggestions about possible work-arounds there too. Yes, I did see this bug listing, but there didn't seem to be a definite result. A couple people mentioned DisableReuse, which we can try, but according to the docs, there is a performance hit. Also, without being able to replicate the issue, its hard to determine if that would help. There are varied views on how seriously to take that warning. Personally, I tend to ignore it in 99.9% of cases. disableReuse makes configuration a lot simpler and rarely impacts performance. YMMV so test it before using it in production. One of the JSP that got wrong responses in testing contained nothing but html - it doesn't look like code in the JSPs themselves are causing this. That is a useful indicator. Assuming no filters etc. are in the mix then that tends to rule out the app. Some confirmation that this is the case would be helpful here. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
Caldarale, Charles R wrote: From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther Subject: Re: Can't move files using symbolic links (allowLinking=true) Maybe a guess : under Unix/Linux, move (mv) is a rename, and it is not the same as copy + delete original. And a move (rename) works as long as the source and target are inside the same filesystem, but not if they are on different filesystems. Nice one André! I'd completely missed that. Except... I have no problem issuing a shell mv command across filesystems; the shell recognizes that this is not just a simple rename() operation, and acts accordingly. Note that there is no move() API (for filesystems); the concept is a figment of the shell's imagination. And me thinking I'd had a brilliant insight. There's always got to be someone to spoil it.. ;-) The perl documentation for rename() though, has this to say : rename OLDNAME,NEWNAME Changes the name of a file; an existing file NEWNAME will be clobbered. Returns true for success, false otherwise. Behavior of this function varies wildly depending on your system implementation. For example, it will usually not work across file system boundaries, even though the system mv command sometimes compensates for this. Other restrictions include whether it works on directories, open files, or pre-existing files. Check the perlport manpage and either the rename(2) manpage or equivalent system documentation for details. perl itself being written in C, is usually pretty close to the C library. But maybe the above is a bit dated. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't move files using symbolic links (allowLinking=true)
André Warnier wrote: Caldarale, Charles R wrote: From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther Subject: Re: Can't move files using symbolic links (allowLinking=true) Maybe a guess : under Unix/Linux, move (mv) is a rename, and it is not the same as copy + delete original. And a move (rename) works as long as the source and target are inside the same filesystem, but not if they are on different filesystems. Nice one André! I'd completely missed that. Except... I have no problem issuing a shell mv command across filesystems; the shell recognizes that this is not just a simple rename() operation, and acts accordingly. Note that there is no move() API (for filesystems); the concept is a figment of the shell's imagination. And me thinking I'd had a brilliant insight. There's always got to be someone to spoil it.. ;-) The perl documentation for rename() though, has this to say : rename OLDNAME,NEWNAME Changes the name of a file; an existing file NEWNAME will be clobbered. Returns true for success, false otherwise. Behavior of this function varies wildly depending on your system implementation. For example, it will usually not work across file system boundaries, even though the system mv command sometimes compensates for this. Other restrictions include whether it works on directories, open files, or pre-existing files. Check the perlport manpage and either the rename(2) manpage or equivalent system documentation for details. perl itself being written in C, is usually pretty close to the C library. But maybe the above is a bit dated. Well, maybe my idea had something to it anyway. I find this : 14.7 Renaming Files The rename function is used to change a file's name. — Function: int rename (const char *oldname, const char *newname) The rename function renames the file oldname to newname. The file formerly accessible under the name oldname is afterwards accessible as newname instead. (If the file had any other names aside from oldname, it continues to have those names.) The directory containing the name newname must be on the same file system as the directory containing the name oldname. ... Re: http://www.gnu.org/s/libc/manual/html_node/Renaming-Files.html What I am getting at is : what if, for reasons of efficiency (but not to the benefit of portability obviously) the developer of this C application of which the OP does not have the source, used a rename() call in order to move a file from one directory to the other, instead of a copy-and-delete sequence ? That would at least have the benefit of keeping my earlier guess on the clever side. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Response Swapping
Mark Thomas wrote: On 21/03/2011 22:06, SQ wrote: Mark Thomas wrote: On 18/03/2011 21:05, SQ wrote: Environment: Solaris 10 Apache 2.2.16 mod_jk 1.2.31 -- Tomcat 5.5.30 JVM 1.6.0_14 Which AJP connector are you using? Is APR/native being used? AJP13. That doesn't answer my question. There are multiple AJP connectors and | they all implement the AJP1.3 protocol. Exactly which one are you using? - Maybe the one above there ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Can't move files using symbolic links (allowLinking=true)
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Can't move files using symbolic links (allowLinking=true) The perl documentation for rename() though, has this to say : rename OLDNAME,NEWNAME perl itself being written in C, is usually pretty close to the C library. But maybe the above is a bit dated. No, the description is perfectly valid - for the rename function. What I am getting at is : what if, for reasons of efficiency (but not to the benefit of portability obviously) the developer of this C application of which the OP does not have the source, used a rename() call in order to move a file from one directory to the other, instead of a copy-and-delete sequence ? Quite possible; as noted earlier, there is no move() API. The C programmer has to understand the limitations of rename() and compensate for them where needed. One could probably run strace to find out just what the program is doing. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 graceful shutdown
Hi Mark, Thanks for your reply. I guess this means that if Tomcat hangs during shutdown then something is wrong with the application and it can't close the threads? What can I do to trouble shoot this and find exactly where the problem is? (except taking stack trace on the hanged process of course) Igor On Mon, Mar 21, 2011 at 8:07 PM, Mark Thomas ma...@apache.org wrote: On 21/03/2011 02:15, Igor Cicimov wrote: Hi, I'm running Tomcat 6.0.26 on Solaris 10 and have a question about what exactly happens during Tomcat graceful shutdown? I guess first thing it does is stop accepting new sessions on the listening ports. Sessions aren't received on ports, requests are. just for the servelets to finish their current requests? New requests are not processed. Existing requests are allowed to continue. What happens exactly with the servlets and the threads? In general, how the threads and servlets are being destroyed during graceful shutdown? Servlets are given a short time to complete and if they don't the JVM shuts down anyway. Since they run on daemon threads those threads will be forcibly stopped by the JVM during shutdown. Application generated threads should be stopped by the application. When I issue the following command from the unix shell: # $TOMCAT_HOME/bin/catalina.sh stop 600 I can still see the server being shut down in less than 10 seconds although I specify 10 minutes delay. Does that mean that the server has already shut down all the resources properly and doesn't have to wait for 10 minutes? Yes. Is the unloadDelay specified in the application Context the only wait of controlling the shutdown process (the servlet unload time)? Yes. How can I make sure that all the requests finish before the server shutdown? Make sure they always complete in less than unloadDelay. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6 graceful shutdown
From: Igor Cicimov [mailto:icici...@gmail.com] Subject: Re: Tomcat 6 graceful shutdown What can I do to trouble shoot this and find exactly where the problem is? (except taking stack trace on the hanged process of course) Taking a thread dump is pretty much the only way. Other than perhaps a thorough code inspection of the webapp... - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org