Re: displaying an image from outside the webapps directory
Great - got it working! Thanks so much for that again! Kimberly On Tue, Apr 1, 2008 at 12:07 AM, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kimberly, Kimberly Begley wrote: | I was hoping to use the jsp:include tag to include the snippet (no html or | body tags) - I tried with the same code that Chris sent to open a jpeg - | thinking it might be the same solution for the html but have gotten an | internal error at the jsp include line. The problem is that JSPs use HttpServletResponse.getWriter (because JSPs are used to produce text output) while the servlet you write uses HttpServletRequest.getOutputStream. The two are incompatible for the same request, and getWriter has already been called, to getOutputStream fails. You have a couple of options: * Write another version of OpenFile called OpenTextFile or whatever * Modify OpenFile to try getOutputStream first, then getWriter * Put a special flag in the request, and have OpenFile detect that flag ~ to determine whether getWriter or getOutputStream should be called If you want to use Writers instead of Streams, you should probably open your file using a Reader instead of a Stream as well. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfw8D4ACgkQ9CaO5/Lv0PCzxwCfYMDYRCHCjLxo5bCmq+wiuvMG 0JAAn3+hBtaGqJx6Oucn/ufDBos+G6bi =pp7j -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kimberly Begley
parsing of .jsp not functional
Hi List, i have a Problem with parsing .jsp Files using Apache/mod_jk My Setup: Apache 2.2.8 mod_jk 1.2.26 Tomcat 5.5.26 on Suse Linux 10.1 Tomcat/Apache is up and running, on TomcatPort i can parse .jsp files domain.com:8080/file.jsp is working but domain.com/file.jsp is not and i dont know how. This is my mod_jk.conf LoadModulejk_module /usr/lib/apache/mod_jk.so JkWorkersFile /usr/share/tomcat5/conf/workers.properties JkLogFile /usr/share/tomcat5/logs/mod_jk.log JkLogLevel info JKMount /*.jsp ajp13 JKMount /*.srv ajp13 JKMount /admin/* ajp13 JKMount /manager/* ajp13 This is my workers.properties: workers.tomcat_home=/usr/share/tomcat5/ workers.java_home=/usr/lib/jvm/java ps=/ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 #worker.ajp14.port=8010 #worker.ajp14.host=localhost #worker.ajp14.type=ajp14 #worker.ajp14.secretkey=secret #worker.ajp14.credentials=myveryrandomentropy #worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr System comes up with no errors. But i see sourcecode when requesting .jps Files over Apache. Unfortunately, i do not find the mistake. There are some warnings in mod_jk.log [Tue Apr 01 09:03:23.826 2008] [32636:3081734336] [warn] map_uri_to_worker::jk_uri_worker_map.c (608): Uri * is invalid. Uri must start with / [Tue Apr 01 09:04:07.877 2008] [14898:3081734336] [warn] map_uri_to_worker::jk_uri_worker_map.c (608): Uri * is invalid. Uri must start with / What could be wrong in my case? Is there any help? Thank you Andre - 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: Cluster Memory Leak - ClusterData and LinkObject classes
On Mon Mar 31 21:13:25 CEST 2008 Tomcat Users List users@tomcat.apache.org wrote: On Mon, Mar 31, 2008 at 3:38 AM, Ronald Klop [EMAIL PROTECTED] wrote: See my previous mail about send/receive buffers filling because Ack wasn't read by FastAsyncSender. The option waitForAck=true did the trick for me. But for FastAsyncSender you should set sendAck=false on the receiving side. Thanks for the information, Ronald. Can you clarify your settings by by posting a minimal configuration? I looked for the option sendAck on the Tomcat cluster page and couldn't find any reference to that configuration parameter: http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html It looks like doing something like one of the two is a good idea for a barebones setup to make sure that the acking behavior is consistent since Tomcat doesn't seem to ensure that they are sane: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster receiver.sendAck=true sender.waitForAck=true/ Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster receiver.sendAck=false sender.waitForAck=false/ I'm a bit confused as to why this issue only affects one of my clusters (out of 3 production clusters with identical setups) and not more people are seeing it. Are most people specifying their Ack settings? Or do most people not see enough traffic between restarts to trigger this issue? Granted, the one that's affected also happens to handle the most traffic by far. I'll have to do more testing on my test cluster to verify (I've already turned on waitForAck everywhere in production), hopefully I can reproduce it. Anyone have information on how using Acks in the cluster affects performance? -Dave Hello Dave, I attached my server.xml file. I hope the mailinglist doesn't filter it. I think a lot of people don't send enough sessions between the nodes to see this or they use sticky sessions. The problem is in the Acks not being read by Tomcat. The network receive buffer fills. Only after the receive buffer is full the send buffer on the other node (send acks) is filling. And only after that send buffer is full the node stops sending acks and reading sessions, but blocks in Socket.write(ack_buffer). After this node is not reading new session data from the network anymore and only after that moment you will experience failures in your application. An Ack is 3 bytes, so you need to sync a lot of sessions, before the receive buffer and send buffer fill up. My receive buffers are about 90KB and send buffers are 32 KB. (90KB + 32KB) / 3 bytes = 41643 acks before the syncing stops. I see (at this moment) on average 1.5 session messages per second. So it takes me 3 seconds = 8 hours before my clustering stops. But I could see the receive buffer filling up with 3 bytes a time also in a lab environment. (Use netstat for example to see this.) Why I was seeing this problems only since two weeks is a mistery to me too. Ronald. Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=300 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=1024 connectionTimeout=2 disableUploadTimeout=true compression=on compressableMimeTypes=text/html,text/xml,text/plain,text/javascript,text/css/ !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- !-- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / -- Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster manager.className=org.apache.catalina.cluster.session.DeltaManager manager.stateTransferTimeout=60 manager.sendAllSessions=false manager.sendAllSessionsSize=500 manager.sendAllSessionsWaitTime=20 receiver.sendAck=false sender.waitForAck=false/ Host name=localhost
status worker
Hello, I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing. Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing: worker.properties file: worker.list=lb1 , lb2 , jkstatus [...] jkstatus.host=rh02 jkstatus.port=10001 jkstatus.username=manager jkstatus.password=tomcat jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus jkstatus.testlb=lb1 jkstatus.testworker=worker42 uriworkermap.properties file: /jkmanager=jkstatus Apache httpd.conf file: JkWorkersFile /usr/local/apache2/conf/workers.properties JkMountFile /usr/local/apache2/conf/uriworkermap.properties Include /usr/local/apache2/conf/tomcat-55.conf Include /usr/local/apache2/conf/tomcat-50.conf Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :( Regards, Nuno
Slow Tomcat - IIS ISAPI Filter
Hello @ll From outside the Server, all the Requests to the Tomcat Website very, very slow (Build time 8-15 seconds for 50 kb Textsites!!), on the Server themselves (Remote Desktop) the Sites was build lower than 1 Second. I have a Hosting Server with Windows 2003 Server x64 Edition and a Tomcat 6.0.16 and ISAPI (isapi_redirect-1.2.26.dll). I connect the IIS to the Tomcat and everything seems to be good. Is there any break which I have to open? Greetings Alex
Tomcat on AMD64 System
Hello @ll, It is very stupid. I get not ran a Tomcat 6.0.16 Server on a Windows 2003 Standard Edition x64 Edition with Java 1.5 AMD64 Edition. I found may workarounds (replace the Tomcat5.exe but I have a Tomcat 6 Version!!, Recompile the Files u). Some points are very unclear: - After JRE and JDK Installation the Command java -version doesn´t work. On a normal 32 Bit Server then will be shown the Version without manually editing the PATH Variable in System Settings. - The Tomcat Installer doesn´t found automatically the fitted JRE... on all other Installations I have done on W32 Systems everything was found without manually work. - The Tomcat server doesn´t start and in Logfile is a message like This 32Bit Application does not ran on 64 Bit Has anybody a very clear and easy Step-by-Step Manual to Install Tomcat 6.x on a W2K3 Server x64? Greetings Alexander
Re: status worker
Nuno Manuel Martins wrote: Hello, I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing. Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing: worker.properties file: worker.list=lb1 , lb2 , jkstatus [...] jkstatus.host=rh02 jkstatus.port=10001 jkstatus.username=manager jkstatus.password=tomcat jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus jkstatus.testlb=lb1 jkstatus.testworker=worker42 uriworkermap.properties file: /jkmanager=jkstatus Apache httpd.conf file: JkWorkersFile /usr/local/apache2/conf/workers.properties JkMountFile /usr/local/apache2/conf/uriworkermap.properties Include /usr/local/apache2/conf/tomcat-55.conf Include /usr/local/apache2/conf/tomcat-50.conf Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :( Regards, Nuno Correct your workers.properties Remove all of the above lines of the form jkstatus.attribute=value because none of the attributes you are using makes much sense. Add: worker.jkstatus.type=status to let mod_jk know, when it tries to send a request to the worker with name jkstatus, that there is not host/port/Tomcat behind it, but instead it should generate its own status page. If it works, then you should add an authentication/authorization mechanism inside httpd to the URL /jkmanager (e.g. a Location directive and inside a required user/password; this can be done with usual httpd procedures, nothing mod_jk specific). 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]
JAAS authentication goes OK, but 403 occurs on requesting resources
Hi all, I am trying JAAS in tomcat, but hit on a really frustrating problem right now. When login, authentication goes OK, but when requesting a resource, I always get 403 access denied! I try to print out httprequest.getRemoteUser in servlet, the username is correct there, however httprequest.isUserInRoles() always returns false :( I am wondering if I have dose something wrong in storing the Roles. Below is the code how I populate User and Role then save in Subject public boolean commit() throws LoginException { if (succeeded == false) { return false; } else { // add a Principal (authenticated identity) // to the Subject principals = new Principal[2]; principals[0] = new WebUser(username); principals[1] = new WebRole(manager); for(int i= 0 ; i principals.length ; i++) { if (!subject.getPrincipals().contains(principals[i])) subject.getPrincipals().add(principals[i]); } if (debug) { SetPrincipal all = subject.getPrincipals(); IteratorPrincipal i = all.iterator(); while(i.hasNext()) { System.out.println(+ i.next().toString()); } } commitSucceeded = true; return true; } } The debug shows that both user and role are stored in subject. But Why tomcat is not recognized the role?! If you ever see this kind of problem, please help! I'll greatly appreciate! - 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 on AMD64 System
From: Alexander Diedler [mailto:[EMAIL PROTECTED] Subject: Tomcat on AMD64 System replace the Tomcat5.exe but I have a Tomcat 6 Version You don't have to recompile; just get the tomcat5.exe and tomcat5w.exe files for AMD64 and rename them, replacing the 5 with a 6 in each file. They're located here: https://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ After JRE and JDK Installation the Command java -version doesn´t work. Sounds like your JVM installation didn't go properly. Sun's installer registers the last public JRE as the default, so try reinstalling just the 64-bit version. You should probably remove the 32-bit one first. The Tomcat Installer doesn´t found automatically the fitted JRE... Another indication that the JRE installation did not complete properly. The Tomcat server doesn´t start and in Logfile is a message like This 32Bit Application does not ran on 64 Bit Are you sure that's what it says? I was under the impression that came out when trying to run a 32-bit service, which means you haven't really updated the tomcat6.exe file. Unfortunately, I have no 64-bit Windows systems here to play with. - 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: parsing of .jsp not functional
It would seem your request for file.jsp is not being routed through mod_jk and is hitting a local file.jsp in your httpd site. Where is the errant file.jsp located? Does tomcat show any log messages for the moment in time when page is requested? Anything in your httpd logs regarding the request? --David Andre Hübner wrote: Hi List, i have a Problem with parsing .jsp Files using Apache/mod_jk My Setup: Apache 2.2.8 mod_jk 1.2.26 Tomcat 5.5.26 on Suse Linux 10.1 Tomcat/Apache is up and running, on TomcatPort i can parse .jsp files domain.com:8080/file.jsp is working but domain.com/file.jsp is not and i dont know how. This is my mod_jk.conf LoadModulejk_module /usr/lib/apache/mod_jk.so JkWorkersFile /usr/share/tomcat5/conf/workers.properties JkLogFile /usr/share/tomcat5/logs/mod_jk.log JkLogLevel info JKMount /*.jsp ajp13 JKMount /*.srv ajp13 JKMount /admin/* ajp13 JKMount /manager/* ajp13 This is my workers.properties: workers.tomcat_home=/usr/share/tomcat5/ workers.java_home=/usr/lib/jvm/java ps=/ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 #worker.ajp14.port=8010 #worker.ajp14.host=localhost #worker.ajp14.type=ajp14 #worker.ajp14.secretkey=secret #worker.ajp14.credentials=myveryrandomentropy #worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr System comes up with no errors. But i see sourcecode when requesting .jps Files over Apache. Unfortunately, i do not find the mistake. There are some warnings in mod_jk.log [Tue Apr 01 09:03:23.826 2008] [32636:3081734336] [warn] map_uri_to_worker::jk_uri_worker_map.c (608): Uri * is invalid. Uri must start with / [Tue Apr 01 09:04:07.877 2008] [14898:3081734336] [warn] map_uri_to_worker::jk_uri_worker_map.c (608): Uri * is invalid. Uri must start with / What could be wrong in my case? Is there any help? Thank you Andre - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: status worker
Hi, I tried before to do as you said and it did not work. I guess this is because when I make the request the one answering is Apache httpd and not Tomcat, and I don't think httpd has any clue of what a status worker is. I tried to simplify it with just these 3 lines: worker.jkstatus.type=status worker.jkstatus.host=rh02 worker.jkstatus.port=10002 So that it knows where to find Tomcat but still the same problem as with the other 2 previous configurations: The requested URL /jkmanager was not found on this server. -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: terça-feira, 1 de Abril de 2008 13:20 To: Tomcat Users List Subject: Re: status worker Nuno Manuel Martins wrote: Hello, I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing. Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing: worker.properties file: worker.list=lb1 , lb2 , jkstatus [...] jkstatus.host=rh02 jkstatus.port=10001 jkstatus.username=manager jkstatus.password=tomcat jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus jkstatus.testlb=lb1 jkstatus.testworker=worker42 uriworkermap.properties file: /jkmanager=jkstatus Apache httpd.conf file: JkWorkersFile /usr/local/apache2/conf/workers.properties JkMountFile /usr/local/apache2/conf/uriworkermap.properties Include /usr/local/apache2/conf/tomcat-55.conf Include /usr/local/apache2/conf/tomcat-50.conf Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :( Regards, Nuno Correct your workers.properties Remove all of the above lines of the form jkstatus.attribute=value because none of the attributes you are using makes much sense. Add: worker.jkstatus.type=status to let mod_jk know, when it tries to send a request to the worker with name jkstatus, that there is not host/port/Tomcat behind it, but instead it should generate its own status page. If it works, then you should add an authentication/authorization mechanism inside httpd to the URL /jkmanager (e.g. a Location directive and inside a required user/password; this can be done with usual httpd procedures, nothing mod_jk specific). Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: status worker
Nuno Manuel Martins wrote: Hi, I tried before to do as you said and it did not work. I guess this is because when I make the request the one answering is Apache httpd and not Tomcat, and I don't think httpd has any clue of what a status worker is. Sure it has. It asks mod_jk and mod_jk knows all about worker statistics etc. and generates an HTML page. I tried to simplify it with just these 3 lines: worker.jkstatus.type=status worker.jkstatus.host=rh02 worker.jkstatus.port=10002 host/port not needed (but doesn't harm either) So that it knows where to find Tomcat but still the same problem as with the other 2 previous configurations: The requested URL /jkmanager was not found on this server. Do you have any virtual hosts? If so, you need to put the JkMountFile into the virtual host, which handles your /jkmanager request. If it doesn't work at all, set JkLogLevel to debug, restart httpd and send a single request for /jkmanager. After that, post the contents of the JkLogFile. Regards, Rainer -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: terça-feira, 1 de Abril de 2008 13:20 To: Tomcat Users List Subject: Re: status worker Nuno Manuel Martins wrote: Hello, I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing. Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing: worker.properties file: worker.list=lb1 , lb2 , jkstatus [...] jkstatus.host=rh02 jkstatus.port=10001 jkstatus.username=manager jkstatus.password=tomcat jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus jkstatus.testlb=lb1 jkstatus.testworker=worker42 uriworkermap.properties file: /jkmanager=jkstatus Apache httpd.conf file: JkWorkersFile /usr/local/apache2/conf/workers.properties JkMountFile /usr/local/apache2/conf/uriworkermap.properties Include /usr/local/apache2/conf/tomcat-55.conf Include /usr/local/apache2/conf/tomcat-50.conf Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :( Regards, Nuno Correct your workers.properties Remove all of the above lines of the form jkstatus.attribute=value because none of the attributes you are using makes much sense. Add: worker.jkstatus.type=status to let mod_jk know, when it tries to send a request to the worker with name jkstatus, that there is not host/port/Tomcat behind it, but instead it should generate its own status page. If it works, then you should add an authentication/authorization mechanism inside httpd to the URL /jkmanager (e.g. a Location directive and inside a required user/password; this can be done with usual httpd procedures, nothing mod_jk specific). 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]
Apache + Tomcat + mod_jk + VirtualHost
Hello All, I have a working configuration but cannot find a way to extend it in the way that we need to do. Currently we load ../conf/auto/mod_jk.conf into Apache's httpd.conf. The mod_jk.conf file is automatically generated and creates the VirtualHost entry just fine. HOWEVER, we need to ADD Apache config elements to this VirtualHost block and I cannot find a way to do this. For instance we need to pass in a separate SSLCertificate directive to this VirtualHost as well as establishing a rewrite rule. If this was a static conf file this would not be an issue. However there appears to be no documentation for how one can include such additional configuration information so that it can be sucked into the mod_jk.conf file automatically. If we stop using the automated mod_jk file then we need to manually update this whenever the developers change the application (with the associated JKmount commands that are automatically generated) and we want to avoid that. So IS there a way to suck in these additional configuration directives so that they are included automatically in the mod_jk.conf file? Thanks! Tony -- Tony Stocker --- There are no wrong turnings. Only paths you had not known you were meant to walk. --- - 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: status worker
Thank you. It was related with the virtual hosts and it Works now. Regards, Nuno -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: terça-feira, 1 de Abril de 2008 16:08 To: Tomcat Users List Subject: Re: status worker Nuno Manuel Martins wrote: Hi, I tried before to do as you said and it did not work. I guess this is because when I make the request the one answering is Apache httpd and not Tomcat, and I don't think httpd has any clue of what a status worker is. Sure it has. It asks mod_jk and mod_jk knows all about worker statistics etc. and generates an HTML page. I tried to simplify it with just these 3 lines: worker.jkstatus.type=status worker.jkstatus.host=rh02 worker.jkstatus.port=10002 host/port not needed (but doesn't harm either) So that it knows where to find Tomcat but still the same problem as with the other 2 previous configurations: The requested URL /jkmanager was not found on this server. Do you have any virtual hosts? If so, you need to put the JkMountFile into the virtual host, which handles your /jkmanager request. If it doesn't work at all, set JkLogLevel to debug, restart httpd and send a single request for /jkmanager. After that, post the contents of the JkLogFile. Regards, Rainer -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: terça-feira, 1 de Abril de 2008 13:20 To: Tomcat Users List Subject: Re: status worker Nuno Manuel Martins wrote: Hello, I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing. Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing: worker.properties file: worker.list=lb1 , lb2 , jkstatus [...] jkstatus.host=rh02 jkstatus.port=10001 jkstatus.username=manager jkstatus.password=tomcat jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus jkstatus.testlb=lb1 jkstatus.testworker=worker42 uriworkermap.properties file: /jkmanager=jkstatus Apache httpd.conf file: JkWorkersFile /usr/local/apache2/conf/workers.properties JkMountFile /usr/local/apache2/conf/uriworkermap.properties Include /usr/local/apache2/conf/tomcat-55.conf Include /usr/local/apache2/conf/tomcat-50.conf Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :( Regards, Nuno Correct your workers.properties Remove all of the above lines of the form jkstatus.attribute=value because none of the attributes you are using makes much sense. Add: worker.jkstatus.type=status to let mod_jk know, when it tries to send a request to the worker with name jkstatus, that there is not host/port/Tomcat behind it, but instead it should generate its own status page. If it works, then you should add an authentication/authorization mechanism inside httpd to the URL /jkmanager (e.g. a Location directive and inside a required user/password; this can be done with usual httpd procedures, nothing mod_jk specific). Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat performance over VMWare
Hi all, I'm experiencing poor performance with Tomcat 5.0.28 running on a Windows 2000 Server VM (Windows Server 2003 R2 host, VMWare Server 1.0.4). Tomcat takes up around 50% of the CPU and the System process takes up the other 50% when making requests that return relatively quickly on a physical server. The VM has 2.5GB of RAM assigned to it, and the host is a quad processor machine. Is anyone familiar with any known performance issues with Tomcat on VMWare? Any recommendations? Regards, Karim --- Although the moon is smaller than the earth, it is farther away.
OOM in PermGen space after several deploy/undeploy
Hello everybody, I found some problem with my app, when I deploy it/undeploy it several times under Tomcat (5.5) (Unix and Windows). I copied my app war file in the webapp dir, and when it has been fully deployed, I surf on some pages. After that, I delete that war, wait for the end of undeployment, and did it again. The memory used by tomcat grows on each cycle. I did it about ten times, and after that I got the message below: java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at org.apache.wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:506) at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:331) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1539) at org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140) at org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:744) at org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344) at org.apache.wicket.Component.renderComponent(Component.java:2459) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2296) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370) at org.apache.wicket.Page.onRender(Page.java:1446) at org.apache.wicket.Component.render(Component.java:2296) I tried on Tomcat5.5/Linux too, and the message is not exactly the same, but it stills speak of PermGen. PS: I use Hibernate 3.2.6ga and several other things in my app, like Wicket (open source web framework), Jasper, JFreeChart and C3P0 . I searched over the internet, but nobody seems to have a working solution... Everybody seems to get this problem, but nobody has a solution... Setting the property hibernate.bytecode.use_reflection_optimizer has no effect. And other things are unusable... What do you do, you, when you need to deploy your app on a shared server? Do you phone to your provider and ask him to restart Tomcat each time you upload your war file? I can't believe there is no other way Is this corrected in a later version of Tomcat? Does anybody know how to avoid this? Thanks for any comment! I really need them... - 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: OOM in PermGen space after several deploy/undeploy
2008/4/1, Piller Sébastien [EMAIL PROTECTED]: Hello everybody, I found some problem with my app, when I deploy it/undeploy it several times under Tomcat (5.5) (Unix and Windows). I copied my app war file in the webapp dir, and when it has been fully deployed, I surf on some pages. After that, I delete that war, wait for the end of undeployment, and did it again. The memory used by tomcat grows on each cycle. I did it about ten times, and after that I got the message below: java.lang.OutOfMemoryError: PermGen space See: http://wiki.apache.org/tomcat/OutOfMemory Antonio
Set Tomcat logging timezone - switching summer time (daylight saving) automatically
I found that if you add -Duser.timezone=Europe/London into JAVA_OPTS in catalina.sh, all tomcat logging will use BST at summer time, but -Duser.timezone=BST does NOT work. Hope this is useful for somebody. Albert Yu (Yizhuan Yu) __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - 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 performance over VMWare
Karim Zaki wrote: Hi all, I'm experiencing poor performance with Tomcat 5.0.28 running on a Windows 2000 Server VM (Windows Server 2003 R2 host, VMWare Server 1.0.4). Tomcat takes up around 50% of the CPU and the System process takes up the other 50% when making requests that return relatively quickly on a physical server. The VM has 2.5GB of RAM assigned to it, and the host is a quad processor machine. Is anyone familiar with any known performance issues with Tomcat on VMWare? Any recommendations? Regards, Karim Karim, How many processors were allocated to the VM (VMWare)? -- Regards Gabe Wong NGASI AppServer Manager JAVA AUTOMATION and SaaS Enablement http://www.ngasi.com NEW! 8.0 - Centrally manage multiple physical servers - 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: OOM in PermGen space after several deploy/undeploy
From: Piller Sébastien [mailto:[EMAIL PROTECTED] Subject: OOM in PermGen space after several deploy/undeploy Is this corrected in a later version of Tomcat? No, because it's not a Tomcat problem. Does anybody know how to avoid this? Fix your webapp to not hang on to useless references. Note that this may well be a problem in the libraries you're using as opposed to your own code. Run a heap profiler and find out who's holding references to things they shouldn't. - 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: deployment questions
i dont want tomcat!! im not a member of it!! dont send me emails hereafter... if im a member send me emails,but im not a member. Best Regards Ajmal - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, March 27, 2008 8:36 AM Subject: RE: deployment questions From: Kimberly Begley [mailto:[EMAIL PROTECTED] Subject: deployment questions 1) make a war file of my web app directory Yes. 2) add a context entry to the server.xml file on the remote server Unless you're deploying on an ancient version of Tomcat (you didn't bother to tell us), definitely not. Your Context element belongs in your webapp's META-INF/context.xml file, if you need one at all. Note that path and docBase attributes are not allowed in Context elements in this circumstance. Read the doc: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html 3) copy the war file to the remote server tomcat/webapp directory That's usually webapps, not webapp. 4) stop and start tomcat on the remote server Usually not necessary, unless autoDeploy is disabled. But then what is the process to see it online? The name of the .war file is the name of the webapp, so you reference it via a URL like: http://hostDNSname[:port]/appName If Tomcat on the remote host is configured to use port 80, you omit that from the URL, of course. If the host has no DNS entry, use its IP address. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd cant talk to tomcat workers
ijncemkaosimgmail.com add him! - Original Message - From: Andy Smith [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Wednesday, March 26, 2008 9:14 PM Subject: Re: httpd cant talk to tomcat workers Hi Peter, hey thanks a lot, got it working! As I had a number of files in the conf directory I was a bit confused and was also not reading what where comments and what where not very accuarately in the XML! :P So I just uncommented the connection in server.xml and straight off httpd can talk to tomcat :D Actually enabling the AJP in server.xml initially broke the app, Alfresco, which I manage to fix by adding this to the JAVA_OPTS in the startup script: -Djava.rmi.server.hostname=myhostname.net Not sure exactly why I needed that as it wasnt needed before, but hey! thanks for your help! cheers Andy. PS Can't claim to be a Mancunian but will confess to working with them ;) - 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]
32-bit isapi_redirector (Version 1.2.8) on 64-bit server
I am trying to get Tomcat working on a 64-bit windows 2003 server in conjunction with IIS 6.0. The issue that I am experiencing is with the isapi_redirector (Version 1.2.8 ). It is 32-bit, and its status is constantly down (via IIS Manager). Could someone direct me to the source code for this file so that I can have it recompiled as a 64-bit application?
RE: TC 4.1.36 stopped logging
Chris, I've switched the params on the XML file to look more closely at this and inspect leaks. I might even should tighten it up more, to about 15 seconds. The deal here is that we have some 30-40 businesses sharing this Oracle server that allows hundreds and hundreds of connections.. (dare I ask why they do it this way?). While with my login profile I'm not able to see the clock on the server (again, same question as above) I did verify with the server admin that it did indeed show and was set to the accurate, current time. With that said about the JAR file, I'll keep that in mind and rest easy. It was a little puzzling though how errors seem, no not seem, they are in fact late arriving to the log on the prod server and immediately get logged to the log files on my box (the dev env). That's partly why I thought the jar responsible for logging might have gotten hosed. Thanks, Chris! -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2008 5:28 PM To: Tomcat Users List Subject: Re: TC 4.1.36 stopped logging -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry, Propes, Barry L wrote: | all of a sudden, I've got a connection pool leak. I'll troubleshoot | that separately from this issue, though quite honestly I'm not sure | how it suddenly occurred, but I believe I can fix thatalthough | what is one of the ideal monitoring tools? Set: ~removeAbandoned=true ~removeAbandonedTimeout=30 ~logAbandoned=true on your Resource and you'll get stack traces in your log files when connections are held for more than (in this case) 30 seconds. All of my queries are nearly instantaneous, so a 30-second connection checkout is considered a leak. | Aside from that, there appears to be some latency in my logging...in | other words, the errors getting logged seem to be substantially | buffered then written to the log (not in real time) maybe hours later | after an exception. I know this because I've purposely gone in and | thrown or forced one so that I could see it in the logs. Wow, that's odd. Which logging mechanism are you using? Is the clock on your server correct? | Is it possible my loggings jar file has gotten corrupted? In my experience, the JAR either works or it doesn't. We had someone check a JAR file into CVS without setting the kb flag (sets it to binary) and everyone who was using win32 started getting errors all over the place. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfxZVkACgkQ9CaO5/Lv0PA9AgCfdujqHU5qa37/bxYMoj7InjU0 v28An0hhtHdv+br84r8vr6tgQEtUNE55 =1VrG -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
An error occurred at line: -1, Unable to compile class for JSP (Netware)
This is an upgrade from Apache2.0.59/Tomcat4.1.31/mod_jk 1.2.15 to Apache2.0.63/Tomcat4.1.37/mod_jk 1.2.36 on Netware 6.5 sp7. Except for JSP compiles, everything including HTML, servlets and precompiled JSPs works. Ant.jar is there in CATALINA_HOME\common\lib. The problem is with Ant v1.7 introduced in Tomcat4.1.36. If I use Ant v1.5 from Tomcat4.1.34 all works for me including JSP compiles. The current functioning environment Apache2.0.63/Tomcat4.1.37/Ant1.5/mod_jk1.2.26. I use configuration as here: http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/bin/netware/i386/Tomcat-on-NetWare-HowTo.html As an experiment: When using Tomcat4.1.37 and Ant v1.7 without an explicit envset (default) CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get error: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. When using Tomcat4.1.36/.37 and Ant v1.7 with an explicit envset CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get NoClassDefFoundError: org/apache/tools/ant/launch/AntMain Short story: Ant.jar from Tomcat4.1.34 compiles JSPs in Tomcat4.1.37. Ant.jar included with Tomcat4.1.37 errors. I saw this with Tomcat4.1.36 also. I am simply copying .conf files from older Apache/Tomcat to current versions. How would I troubleshoot this further? Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Easter Seals-Goodwill Northern Rocky Mountain are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Please report any inappropriate or abusive use of this email system to [EMAIL PROTECTED]
Re: Problem in running Tomcat
David Smith-2 wrote: tomcat 5 w/ gcj -- either get rid of it or take this conversation to the yum folks. We support tomcat as provided by Apache using primarily Sun Java although I'm sure people have had success with IBM's jvm. Other packaging methods introduce lot's of symlinks and at times alterations in the source to match those packaging schemes. Regarding tomcat5 and sun jvm 1.6, I'm not seeing any jvm 1.6 in your stack trace below. On the contrary, it indicates tomcat 5.5.26 and jdk 1.5.0_14. Can you post what's in your catalina.out file as found in the logs directory of your tomcat install? I think we've asked for this before and you didn't reply. --David Raghavan_sat wrote: Hi, I installed tomcat5 using yum and it installed lot of dependencies... This tomcat uses gcj java to run and is running fine.. But my Servlet program cannot be compiled with this gcj javaSo i installed JDK1.6 and changed the java using alternatives command and compiled it But with this java being selected my tomcat is not running... its showing lock file found but no process running for pid . So i downloaded separate tomcat - apache tomcat 5 and extracted it... it starts fine with jdk 1.6 but when i use my servlet it just goes off.. Following that if i shutdown tomcat it shows Using CATALINA_BASE: /root/apache-tomcat-5.5.26 Using CATALINA_HOME: /root/apache-tomcat-5.5.26 Using CATALINA_TMPDIR: /root/apache-tomcat-5.5.26/temp Using JRE_HOME: /usr/java/jdk1.5.0_14/ Mar 29, 2008 6:53:57 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) So my problem is tomcat5(yum) with gcj java is not compiling my servlet and tomcat5(downloaded) with jdk1.6 is not at all running.. what can i do to run my servlet :( - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Apr 1, 2008 10:24:19 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_05/jre/lib/i386/client:/usr/java/jdk1.6.0_05/jre/lib/i386:/usr/java/jdk1.6.0_05/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib Apr 1, 2008 10:24:19 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8085 Apr 1, 2008 10:24:19 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1613 ms Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.26 Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Apr 1, 2008 10:24:20 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/root/apache-tomcat-5.5.26/webapps/ROOT/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Apr 1, 2008 10:24:21 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8085 Apr 1, 2008 10:24:22 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Apr 1, 2008 10:24:22 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/108 config=null Apr 1, 2008 10:24:22 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Apr 1, 2008 10:24:22 PM org.apache.catalina.startup.Catalina start INFO: Server startup
Re: Problem in running Tomcat
Raghavan_sat wrote: David Smith-2 wrote: tomcat 5 w/ gcj -- either get rid of it or take this conversation to the yum folks. We support tomcat as provided by Apache using primarily Sun Java although I'm sure people have had success with IBM's jvm. Other packaging methods introduce lot's of symlinks and at times alterations in the source to match those packaging schemes. Regarding tomcat5 and sun jvm 1.6, I'm not seeing any jvm 1.6 in your stack trace below. On the contrary, it indicates tomcat 5.5.26 and jdk 1.5.0_14. Can you post what's in your catalina.out file as found in the logs directory of your tomcat install? I think we've asked for this before and you didn't reply. --David Raghavan_sat wrote: Hi, I installed tomcat5 using yum and it installed lot of dependencies... This tomcat uses gcj java to run and is running fine.. But my Servlet program cannot be compiled with this gcj javaSo i installed JDK1.6 and changed the java using alternatives command and compiled it But with this java being selected my tomcat is not running... its showing lock file found but no process running for pid . So i downloaded separate tomcat - apache tomcat 5 and extracted it... it starts fine with jdk 1.6 but when i use my servlet it just goes off.. Following that if i shutdown tomcat it shows Using CATALINA_BASE: /root/apache-tomcat-5.5.26 Using CATALINA_HOME: /root/apache-tomcat-5.5.26 Using CATALINA_TMPDIR: /root/apache-tomcat-5.5.26/temp Using JRE_HOME: /usr/java/jdk1.5.0_14/ Mar 29, 2008 6:53:57 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) So my problem is tomcat5(yum) with gcj java is not compiling my servlet and tomcat5(downloaded) with jdk1.6 is not at all running.. what can i do to run my servlet :( - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Apr 1, 2008 10:24:19 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_05/jre/lib/i386/client:/usr/java/jdk1.6.0_05/jre/lib/i386:/usr/java/jdk1.6.0_05/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib Apr 1, 2008 10:24:19 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8085 Apr 1, 2008 10:24:19 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1613 ms Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.26 Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Apr 1, 2008 10:24:20 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/root/apache-tomcat-5.5.26/webapps/ROOT/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Apr 1, 2008 10:24:21 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8085 Apr 1, 2008 10:24:22 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Apr 1, 2008 10:24:22 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/108 config=null Apr 1, 2008 10:24:22 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Apr 1, 2008 10:24:22 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3076 ms in servlet OS
64-bit isapi redirector not working with Tomcat.
Trying to get Tomcat to work on Win2k3 64-bit w.\ IIS 6.0 I downloaded a 64-bit isapi redirector DLL from: http://www.trieuvan.com/apache/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.26/ia64/ http://www.trieuvan.com/apache/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.26/amd64/ ...and it is not work for me. I confirmed that my server.xml has the settings necessary for the connector to work (port 8009) The uriworkermap.properties file is all good. The site works through Tomcat (via: 8080). Any input would be appreciated
Re: Apache + Tomcat + mod_jk + VirtualHost
Hi Tony, Tony Stocker schrieb: Hello All, I have a working configuration but cannot find a way to extend it in the way that we need to do. Currently we load ../conf/auto/mod_jk.conf into Apache's httpd.conf. The mod_jk.conf file is automatically generated and creates the VirtualHost entry just fine. HOWEVER, we need to ADD Apache config elements to this VirtualHost block and I cannot find a way to do this. For instance we need to pass in a separate SSLCertificate directive to this VirtualHost as well as establishing a rewrite rule. the automatic generation of httpd config snippets via Tomcat is only meant as a simple way to get a starter config. It's not supposed to be simply included into your httpd config without further optimization (at least for serious production). It's a fast way to get a simple and hopefully working configuration. If this was a static conf file this would not be an issue. However there appears to be no documentation for how one can include such additional configuration information so that it can be sucked into the mod_jk.conf file automatically. If we stop using the automated mod_jk file then we need to manually update this whenever the developers change the application (with the associated JKmount commands that are automatically generated) and we want to avoid that. You should copy the auto generated file to your httpd server. In larger deployments, the Tomcat and httpd servers will typically not be the same machines anyhow. Yes, then you loose the auto-update (new webapp, new JkMount). So then you'll need to manage your URL maps (JkMount) separately and not automated by deployment. If you want to hace that a little more dynamic, you can separate your JkMount into a separate JkMountFile (usually called uriworkermap.properties), which has the nice feature of getting monitored for change, so that new entries get active automatically, without restarting your httpd. Nevertheless you have to add the new entries yourself. So IS there a way to suck in these additional configuration directives so that they are included automatically in the mod_jk.conf file? Maybe, but not that I'm aware of. Never actually used the auto config feature. But ask yourself, if it is really something to deserve to automatically have new JkMounts added whenever you deploy a new app, and deleted when you undeploy. What happens once you start using a second Tomcat, which one should produce the auto config you use on the web server etc. Things usually do not happen atomically in larger layouts, so you need to carefully think about the right point in time, when you actzally add the mappings to your httpd config. Thanks! Tony Only my 0.02 cents. 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: 32-bit isapi_redirector (Version 1.2.8) on 64-bit server
Go to tomcat.apache.org, and click in the Download menu on Tomcat Connectors. This will get you to the page http://tomcat.apache.org/download-connectors.cgi There you can either follow the link to a binary release (there are binaries for several platforms, especially win32 and win64) or for a source release. The page usuallycontains the latest release, at the moment 1.2.26. I would not recommend 1.2.8. On the page there is also a link to the archive. Regards, Rainer Panian, Ardo schrieb: I am trying to get Tomcat working on a 64-bit windows 2003 server in conjunction with IIS 6.0. The issue that I am experiencing is with the isapi_redirector (Version 1.2.8 ). It is 32-bit, and its status is constantly down (via IIS Manager). Could someone direct me to the source code for this file so that I can have it recompiled as a 64-bit application? - 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: An error occurred at line: -1, Unable to compile class for JSP(Netware)
It's a known bug, which has beend discussed on the developers list only very recently. See http://marc.info/?t=12066709823r=1w=2 Your workaround (using ant 1.5) seems fine. The final solution is still pending, but it's quite possible, that Mark does a fix for the future 4.1.38. This still needs some clarification though. Regards, Rainer Howard Watson schrieb: This is an upgrade from Apache2.0.59/Tomcat4.1.31/mod_jk 1.2.15 to Apache2.0.63/Tomcat4.1.37/mod_jk 1.2.36 on Netware 6.5 sp7. Except for JSP compiles, everything including HTML, servlets and precompiled JSPs works. Ant.jar is there in CATALINA_HOME\common\lib. The problem is with Ant v1.7 introduced in Tomcat4.1.36. If I use Ant v1.5 from Tomcat4.1.34 all works for me including JSP compiles. The current functioning environment Apache2.0.63/Tomcat4.1.37/Ant1.5/mod_jk1.2.26. I use configuration as here: http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/bin/netware/i386/Tomcat-on-NetWare-HowTo.html As an experiment: When using Tomcat4.1.37 and Ant v1.7 without an explicit envset (default) CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get error: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. When using Tomcat4.1.36/.37 and Ant v1.7 with an explicit envset CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get NoClassDefFoundError: org/apache/tools/ant/launch/AntMain Short story: Ant.jar from Tomcat4.1.34 compiles JSPs in Tomcat4.1.37. Ant.jar included with Tomcat4.1.37 errors. I saw this with Tomcat4.1.36 also. I am simply copying .conf files from older Apache/Tomcat to current versions. How would I troubleshoot this further? Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Easter Seals-Goodwill Northern Rocky Mountain are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Please report any inappropriate or abusive use of this email system to [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]
How to force HTTPS on some of Struts-based site
I'm trying to add Authentication (over HTTPS) to a Struts-based web app and am running into problems. I can get Tomcat (5.5.26) to authenticate the user (using Basic login) without issue, but I can't seem to get a Struts-based login form to work. Because of the way the passwords are encrypted, I need to use a custom login (via Struts forms) or create a new Realm (something I'd rather not start, due to time constraints). The intent is as follows: For the main site: plain HTTP access For the administration and sample submission areas, require authentication over HTTPS Disallow DELETE and PUT methods from all areas. I've configured Tomcat as follows: In web.xml ... security-constraint display-nameAdministration Methods/display-name web-resource-collection web-resource-nameadmin methods/web-resource-name description/ url-pattern/admin/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameadmin_user/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint I've also added a filter to capture all requests (/*) that checks the requested path; if that path is a privileged path (admin or submission), then check that the user is authenticated and within the specified role (as configured in the filter). I changed the role-name to * in the above auth-constraint and removed (commented out) the login-config section of web.xml. So my question is this: how do I force HTTPS on some portions of a Struts-based web site. With the filter, I can force authentication, but not the HTTPS constraint. Thanks, in advance Gord
Re: An error occurred at line: -1, Unable to compile class for JSP(Netware)
Thanks. I did not find the bug listed when I searched. Rainer Jung [EMAIL PROTECTED] 4/1/2008 11:33 AM It's a known bug, which has beend discussed on the developers list only very recently. See http://marc.info/?t=12066709823r=1w=2 Your workaround (using ant 1.5) seems fine. The final solution is still pending, but it's quite possible, that Mark does a fix for the future 4.1.38. This still needs some clarification though. Regards, Rainer Howard Watson schrieb: This is an upgrade from Apache2.0.59/Tomcat4.1.31/mod_jk 1.2.15 to Apache2.0.63/Tomcat4.1.37/mod_jk 1.2.36 on Netware 6.5 sp7. Except for JSP compiles, everything including HTML, servlets and precompiled JSPs works. Ant.jar is there in CATALINA_HOME\common\lib. The problem is with Ant v1.7 introduced in Tomcat4.1.36. If I use Ant v1.5 from Tomcat4.1.34 all works for me including JSP compiles. The current functioning environment Apache2.0.63/Tomcat4.1.37/Ant1.5/mod_jk1.2.26. I use configuration as here: http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/bin/netware/i386/Tomcat-on-NetWare-HowTo.html As an experiment: When using Tomcat4.1.37 and Ant v1.7 without an explicit envset (default) CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get error: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. When using Tomcat4.1.36/.37 and Ant v1.7 with an explicit envset CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get NoClassDefFoundError: org/apache/tools/ant/launch/AntMain Short story: Ant.jar from Tomcat4.1.34 compiles JSPs in Tomcat4.1.37. Ant.jar included with Tomcat4.1.37 errors. I saw this with Tomcat4.1.36 also. I am simply copying .conf files from older Apache/Tomcat to current versions. How would I troubleshoot this further? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Easter Seals-Goodwill Northern Rocky Mountain are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Please report any inappropriate or abusive use of this email system to [EMAIL PROTECTED]
Re: Problem in running Tomcat
Hi, Delete WEB-INF/lib/servlet.jar. I always wonder: why do some applications have the servlet.jar in WEB-INF/lib when the 'curent' one is already in the ./common/lib ? INFO: validateJarFile(/root/apache-tomcat-5.5.26/webapps/ROOT/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Rgds - Fred -- View this message in context: http://www.nabble.com/Problem-in-running-Tomcat-tp16383891p16421744.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem in running Tomcat
From: fredk2 [mailto:[EMAIL PROTECTED] Subject: Re: Problem in running Tomcat I always wonder: why do some applications have the servlet.jar in WEB-INF/lib when the 'curent' one is already in the ./common/lib ? Because people throw it in there during development with NetBeans, Eclipse, etc., just to get things to compile, not realizing that's an inappropriate solution. - 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]
Apache fails to start when .host does not resolve.
Hi, when you set a load balancer (mod_jk v1.2.26) with 2 workers: worker.myWorker.type=lb worker.myWorker.balance_workers=tc1Worker, tc2Worker and one of the worker's host cannot be resolved: worker.tc2Worker.host=mytest.mydom.com Then Apache will not start. - since the other worker is 'good', should'nt we let apache start with a nice error message informing you that one worker could not resolved (done today) and jk will disable the worker and let apache start anyway? - Adding a disable does not fix the issue it seems. Only removing the worker from the list does. worker.tc2Worker.activation=d The idea is that if DNS fails to resolve a host (some admin mistake) and Apache was restarted automatically for unrelated reasons, it would fail to come back online without a manual intervention - editing a configuration file (which might be a challenge). Rgds - Fred -- View this message in context: http://www.nabble.com/Apache-fails-to-start-when-.host-does-not-resolve.-tp16422828p16422828.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]
mod_jk and url rewriting+forwarding
hi, I want to forward http://proxy/gqaf:soi:PAR:TRE:001 (proxy is an apache) to http://backend:8080/gqaf-web/gqaf:soi:PAR:TRE:001 (backend:8080 is a tomcat server) I downloaded mod_jk and modified httpd.conf: LoadModule jk_module modules/mod_jk.so JkWorkersFile /usr/local/apache224/conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /*TRE* MyWorker and created workers.properties: workers.java_home=/usr/local/java/jdk1.6.0_03/ ps=/ worker.list=MyWorker worker.MyWorker.port=8080 worker.MyWorker.host=backend worker.MyWorker.type=ajp13 From logs: [Tue Apr 01 21:33:48.890 2008] [27044:1] [debug] ajp_send_request::jk_ajp_common.c (1395): (MyWorker) request body to send 0 - request body to resend 0 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1004): (MyWorker) can't receive the response message from tomcat, tomcat (172.21.26.218:8080) has forced a connection close for socket 19 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_get_reply::jk_ajp_common.c (1766): (MyWorker) Tomcat is down or refused connection. No response has been sent to the client (yet) [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] ajp_service::jk_ajp_common.c (2186): (MyWorker) sending request to tomcat failed (recoverable), (attempt=2) [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_service::jk_ajp_common.c (2204): (MyWorker) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_reset_endpoint::jk_ajp_common.c (691): (MyWorker) resetting endpoint with sd = 4294967295 (socket shutdown) [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_done::jk_ajp_common.c (2522): recycling connection pool slot=0 for worker MyWorker [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] jk_handler::mod_jk.c (2364): Service error=0 for worker=MyWorker I checked tomcat and it is up. Any idea? thanks __ Sent from Yahoo! Mail. A Smarter Inbox http://uk.docs.yahoo.com/nowyoucan.html - 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: mod_jk and url rewriting+forwarding
mod_jk doesn't use the HTTP protocol. It uses the AJP13 protocol. Unless you've done something unusual with your tomcat, the 8080 connector will be talking HTTP, not AJP. Default AJP port is usually 8009, so try 'worker.MyWorker.port=8009' in your workers.properties file. If you've changed the ajp connector's port config, then use that. --David Melanie Pfefer wrote: hi, I want to forward http://proxy/gqaf:soi:PAR:TRE:001 (proxy is an apache) to http://backend:8080/gqaf-web/gqaf:soi:PAR:TRE:001 (backend:8080 is a tomcat server) I downloaded mod_jk and modified httpd.conf: LoadModule jk_module modules/mod_jk.so JkWorkersFile /usr/local/apache224/conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /*TRE* MyWorker and created workers.properties: workers.java_home=/usr/local/java/jdk1.6.0_03/ ps=/ worker.list=MyWorker worker.MyWorker.port=8080 worker.MyWorker.host=backend worker.MyWorker.type=ajp13 From logs: [Tue Apr 01 21:33:48.890 2008] [27044:1] [debug] ajp_send_request::jk_ajp_common.c (1395): (MyWorker) request body to send 0 - request body to resend 0 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1004): (MyWorker) can't receive the response message from tomcat, tomcat (172.21.26.218:8080) has forced a connection close for socket 19 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_get_reply::jk_ajp_common.c (1766): (MyWorker) Tomcat is down or refused connection. No response has been sent to the client (yet) [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] ajp_service::jk_ajp_common.c (2186): (MyWorker) sending request to tomcat failed (recoverable), (attempt=2) [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_service::jk_ajp_common.c (2204): (MyWorker) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_reset_endpoint::jk_ajp_common.c (691): (MyWorker) resetting endpoint with sd = 4294967295 (socket shutdown) [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_done::jk_ajp_common.c (2522): recycling connection pool slot=0 for worker MyWorker [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] jk_handler::mod_jk.c (2364): Service error=0 for worker=MyWorker I checked tomcat and it is up. Any idea? thanks __ Sent from Yahoo! Mail. A Smarter Inbox http://uk.docs.yahoo.com/nowyoucan.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache fails to start when .host does not resolve.
fredk2 schrieb: Hi, when you set a load balancer (mod_jk v1.2.26) with 2 workers: worker.myWorker.type=lb worker.myWorker.balance_workers=tc1Worker, tc2Worker and one of the worker's host cannot be resolved: worker.tc2Worker.host=mytest.mydom.com Then Apache will not start. - since the other worker is 'good', should'nt we let apache start with a nice error message informing you that one worker could not resolved (done today) and jk will disable the worker and let apache start anyway? - Adding a disable does not fix the issue it seems. Only removing the worker from the list does. worker.tc2Worker.activation=d Yes that's the way it was implemented intentionally. The idea is that if DNS fails to resolve a host (some admin mistake) and Apache was restarted automatically for unrelated reasons, it would fail to come back online without a manual intervention - editing a configuration file (which might be a challenge). In general I think it's better to not start, if a worker is completely broken. Yes, in your case it would provide a problem with regular restarts, but we could argue, that if your DNS is not rock solid, but your production systems depend on IP address resolution, then you should either use the IPs in the workers host attribute, or add the few systems you need to contact from your httpd to your hosts file. Of course that contradicts the major goals of DNS, but if you want to stick to those you really need a rock solid DNS (which is not that hard). Admin failures when managing critical DNS data are really major incidents. If we allow unresolvable host names, it's very likely that users will not notice the resulting error messages during startup. And I think it's much more likely that people simply put typos into the host names than the occurence of local DNS failures. This seems to be grey area, where there's no obviously best solution. Rgds - Fred 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: mod_jk and url rewriting+forwarding
David Smith schrieb: mod_jk doesn't use the HTTP protocol. It uses the AJP13 protocol. Unless you've done something unusual with your tomcat, the 8080 connector will be talking HTTP, not AJP. Default AJP port is usually 8009, so try 'worker.MyWorker.port=8009' in your workers.properties file. If you've changed the ajp connector's port config, then use that. --David And additionally: if you need to change the URL path between the request to Apache httpd and to the backend (in your case it looks like you want to prepend /gqaf-web), add mod_rewrite to your config, define a RewriteRule that changes the URL as required and put the passthrough flag [PT] directly after the RewriteRule. Regards, Rainer Melanie Pfefer wrote: hi, I want to forward http://proxy/gqaf:soi:PAR:TRE:001 (proxy is an apache) to http://backend:8080/gqaf-web/gqaf:soi:PAR:TRE:001 (backend:8080 is a tomcat server) I downloaded mod_jk and modified httpd.conf: LoadModule jk_module modules/mod_jk.so JkWorkersFile /usr/local/apache224/conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /*TRE* MyWorker and created workers.properties: workers.java_home=/usr/local/java/jdk1.6.0_03/ ps=/ worker.list=MyWorker worker.MyWorker.port=8080 worker.MyWorker.host=backend worker.MyWorker.type=ajp13 From logs: [Tue Apr 01 21:33:48.890 2008] [27044:1] [debug] ajp_send_request::jk_ajp_common.c (1395): (MyWorker) request body to send 0 - request body to resend 0 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1004): (MyWorker) can't receive the response message from tomcat, tomcat (172.21.26.218:8080) has forced a connection close for socket 19 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_get_reply::jk_ajp_common.c (1766): (MyWorker) Tomcat is down or refused connection. No response has been sent to the client (yet) [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] ajp_service::jk_ajp_common.c (2186): (MyWorker) sending request to tomcat failed (recoverable), (attempt=2) [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_service::jk_ajp_common.c (2204): (MyWorker) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_reset_endpoint::jk_ajp_common.c (691): (MyWorker) resetting endpoint with sd = 4294967295 (socket shutdown) [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_done::jk_ajp_common.c (2522): recycling connection pool slot=0 for worker MyWorker [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] jk_handler::mod_jk.c (2364): Service error=0 for worker=MyWorker I checked tomcat and it is up. Any idea? thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dynamically add new virtual host
Hi, How can I add a new virtual host on the fly, and have that configuration be persisted? I see the host-manager app, however once the host is added under conf/Catalina/host upon tomcat restart that host is not picked up because the server.xml is not edited. Is the host-manager app still in development? Secondly, does anyone know of a way to have server.xml fetch configuration from included files such as in apache Include someDir/*.conf thanks! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is jsvc is required for installing / configuring only custom web application
Hi, My requirement is simple. I have to install a custom web application, which is running in another server. Means the old server will be retired soon. The old / new servers only runs a customized web application. It does not handle any web services. So, is that jsvc has to be installed. (Like download and install AutoConf and GNU Make to compile and install jsvc. Also, please let me know, wht is 'jsvc' and it usage). I have to just install Apache-tomcat and configure the web application. So, after installing the apache, would somebody can help me out with the steps to start the apache. Also, for just configuring the web application is that 'jsvc' is must and required. cd jsvc-src autoconf ./configure make cp jsvc .. cd .. Any early help on this is highly appreciated..! Regds
RE: JAAS authentication goes OK, but 403 occurs on requesting resources
From: Liyi Meng [mailto:[EMAIL PROTECTED] Subject: JAAS authentication goes OK, but 403 occurs on requesting resources When login, authentication goes OK, but when requesting a resource, I always get 403 access denied! What's in the security-constraint, login-config, and security-role sections of the web.xml for your webapp? Have you left out the security-role element, by any chance? Below is the code how I populate User and Role then save in Subject Your code is very similar to mine, which does work, so I don't think the problem's there. - 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]
Deleting context xml files
Hello, Recently I have been using per-context XML files in /usr/local/tomcat/conf/Catalina/localhost to define environment specific information for my webapps. That way, when I move a war file through the cycle of dev/qa/production, I can be sure that I'm running the same code, and don't have to fiddle with settings inside the war file. I'm not sure when it started happening, but during development it seems that tomcat is deleting the context xml files at seemingly random times. I think it has something to do with the undeploy/redeploy process that happens when the war file changes. It seems particularly common when there is a startup error in my app, but it is always when something in the webapp changes. Has anyone else experienced this? I have been using tomcat 6.0.14, but I just upgraded to 6.0.16 to see if that helps. Basically, I'm wondering if I'm doing something against proper practice right now that is causing this or if there is some sort of bug in tomcat. I am using maven, so I have less control (probably partly because I a haven't figured it out fully yet) over the copying of files than I did with ant and I'd be interested to hear what other people are doing for dev deployment when using context xml files. -Al
Re: Large HTML file not getting compressed despite compression enabled
Does anyone know what might be happening here? This is a pretty strange problem... Thanks for your time, Alex Alex Epshteyn wrote: I have Tomcat's compression enabled: Connector port=8080 maxHttpHeaderSize=8192 maxThreads=200 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml,text/javascript,text/css/ It works as expected for all my resources (stylesheets, scripts, etc) except for one static file, which has the extension .cache.html (in case you're wondering, it contains scripts generated by GWT). This file is pretty large - about 150K, but Tomcat doesn't compress it for some reason. Here are the response headers for this file (I have a custom filter that sets the cache headers prior to forwarding the request up the chain): ServerApache-Coyote/1.1 Cache-Control public, max-age=31536 Expires Wed, 28 Mar 2018 18:58:38 GMT Etag W/136900-1206809984000 Last-Modified Sat, 29 Mar 2008 16:59:44 GMT Content-Type text/html Content-Length136900 Date Sun, 30 Mar 2008 20:44:14 GMT Here are the response headers for a file that gets properly compressed (which also passes through the same filter): ServerApache-Coyote/1.1 Pragmano-cache Cache-Control max-age=0, no-store, no-cache, must-revalidate Expires Thu, 01 Jan 1970 00:00:00 GMT Etag W/4869-1206809984000 Last-Modified Sat, 29 Mar 2008 16:59:44 GMT Content-Type text/javascript Transfer-Encoding chunked Content-Encoding gzip Vary Accept-Encoding Date Sun, 30 Mar 2008 20:44:14 GMT I don't see any relevant errors in my log files. I'm using Tomcat 5.5.26 on Linux. As a strange twist, the file does get compressed properly with Tomcat 5.5.26 on Windows. Any ideas? Thanks in advance for your help! Alex - 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/Large-HTML-file-not-getting-compressed-despite-compression-enabled-tp16387385p16432129.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: Large HTML file not getting compressed despite compression enabled
if you have the time try using debug trace to look at every step to see what is working Does anyone know what might be happening here? This is a pretty strange problem... Thanks for your time, Alex -- View this message in context: http://www.nabble.com/Large-HTML-file-not-getting-compressed-despite-compression-enabled-tp16387385p16434715.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6 Command Line Install Path Option
I am looking for a way to specify the installation path in a command-line install of Tomcat 6.0.16 on Windows. Other apps I have installed this way usually have a switch something like -INSTALLDIR=[path]. I have checked the online documentation, the running.txt file that comes in the installer, the forums, googled it, and checked with everyone I know who uses Tomcat to no avail. Your assistance is very much appreciated, even if it is just to confirm for me that this can't be done. Thank you. -Mark Sullivan
Re: Deleting context xml files - I have the same...
I have the same, except I have only one context pr virtual server, and uses the war-file as the root-app in each. When I replace a war-file, the context-files for the other root-apps is deleted - each time. But the context-file for the replaced war-file is left untouched.' I use 6.0.16 on jvm 1.6.0_01-b06 on Mandriva. /Frode Albert Wold [EMAIL PROTECTED] 02.04.2008 01:39 To users@tomcat.apache.org cc Please respond to Tomcat Users List Subject users@tomcat.apache.org Deleting context xml files Hello, Recently I have been using per-context XML files in /usr/local/tomcat/conf/Catalina/localhost to define environment specific information for my webapps. That way, when I move a war file through the cycle of dev/qa/production, I can be sure that I'm running the same code, and don't have to fiddle with settings inside the war file. I'm not sure when it started happening, but during development it seems that tomcat is deleting the context xml files at seemingly random times. I think it has something to do with the undeploy/redeploy process that happens when the war file changes. It seems particularly common when there is a startup error in my app, but it is always when something in the webapp changes. Has anyone else experienced this? I have been using tomcat 6.0.14, but I just upgraded to 6.0.16 to see if that helps. Basically, I'm wondering if I'm doing something against proper practice right now that is causing this or if there is some sort of bug in tomcat. I am using maven, so I have less control (probably partly because I a haven't figured it out fully yet) over the copying of files than I did with ant and I'd be interested to hear what other people are doing for dev deployment when using context xml files. -Al - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]