Having different apps (contexts) on different ports
Can I have several Tomcat contexts on different ports? I need to have manager app listening only on 8080, and all the other apps on 80. Is something like that possible, within one Tomcat Service? Or, if I fire up two services (under same server), each with its own set of connectors, is manager app from one service able to manage apps in another? Mario - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Having different apps (contexts) on different ports
On 11/15/2011 09:01 AM, Mario Splivalo wrote: Can I have several Tomcat contexts on different ports? I need to have manager app listening only on 8080, and all the other apps on 80. Is something like that possible, within one Tomcat Service? Or, if I fire up two services (under same server), each with its own set of connectors, is manager app from one service able to manage apps in another? I neglected to mention I'm using tomcat6. Mario - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Having different apps (contexts) on different ports
On 15/11/2011 08:01, Mario Splivalo wrote: Can I have several Tomcat contexts on different ports? I need to have manager app listening only on 8080, and all the other apps on 80. Is something like that possible, within one Tomcat Service? You can have more than one Connector. You can't assign individual apps to specific Connectors. Or, if I fire up two services (under same server), each with its own set of connectors, is manager app from one service able to manage apps in another? The Manager application can only manage applications in the same Host. Unfortunately, separate Services will have separate Hosts. p -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: mod_jk Avoid loadbalancing
On 14/11/2011 10:42, Alexander Diedler wrote: Hello It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the loadbalancing between these three nodes? We only need the session replication. The Loadbalancing with failover will be done by a Big-IP F5, so we don´t need a “double” balanced request, first time by the HW-balancer and second time by the Apache mod_jk himself. So don't put httpd+mod_jk in front - just point the F5 at the Tomcats. p -- [key:62590808] signature.asc Description: OpenPGP digital signature
AW: mod_jk Avoid loadbalancing
Hello, Yes, it was an option to solve my problem. But what about the performance? My opinion was to forward only necessary requests to the Tomcat (jsp, java etc) and let the Apache HTTPD deliver the static content (CSS,JS,Images etc). Best regards Alexander -Ursprüngliche Nachricht- Von: Pid [mailto:p...@pidster.com] Gesendet: Dienstag, 15. November 2011 12:41 An: Tomcat Users List Betreff: Re: mod_jk Avoid loadbalancing On 14/11/2011 10:42, Alexander Diedler wrote: Hello It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the loadbalancing between these three nodes? We only need the session replication. The Loadbalancing with failover will be done by a Big-IP F5, so we don´t need a double balanced request, first time by the HW-balancer and second time by the Apache mod_jk himself. So don't put httpd+mod_jk in front - just point the F5 at the Tomcats. p -- [key:62590808] smime.p7s Description: S/MIME cryptographic signature
Re: AW: mod_jk Avoid loadbalancing
On 11/15/2011 12:55 PM, Alexander Diedler wrote: Hello, Yes, it was an option to solve my problem. But what about the performance? My opinion was to forward only necessary requests to the Tomcat (jsp, java etc) and let the Apache HTTPD deliver the static content (CSS,JS,Images etc). Use native connector and you won't have to worry about the static file performance. It'll be few times faster compared to any proxy. Unless you need httpd for something like php or special auth, use tomcat directly. Regards -- ^TM - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Include NEtwork path into Tomcat - urgent
Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander smime.p7s Description: S/MIME cryptographic signature
RE: Include NEtwork path into Tomcat - urgent
Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander
AW: Include NEtwork path into Tomcat - urgent
Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Alex -Ursprüngliche Nachricht- Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] Gesendet: Dienstag, 15. November 2011 14:32 An: 'Tomcat Users List' Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander smime.p7s Description: S/MIME cryptographic signature
Re: Include NEtwork path into Tomcat - urgent
On Tue, Nov 15, 2011 at 11:39 AM, Alexander Diedler adied...@tecracer.dewrote: Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Not true. You can setup tomcat to run under a service account, and have the service account map that drive. Chris
RE: Include NEtwork path into Tomcat - urgent
You need user ssesion to access windows station via SMB anyway. You can set this script as log in script using group policies in windows for the user your tomcat runs as. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:39 PM To: Tomcat Users List Subject: AW: Include NEtwork path into Tomcat - urgent Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Alex -Ursprüngliche Nachricht- Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] Gesendet: Dienstag, 15. November 2011 14:32 An: 'Tomcat Users List' Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Include NEtwork path into Tomcat - urgent
Not sure Java IO supports windows UNC. A quick test worked for me. I was able to list the contents of a SMB share on my network. Windows XP, Java 1.6.0_29. public class Test { public static void main(String[] args) { for (String fileName : new File(server\\share).list()) { System.out.println(fileName); } } } Maybe try running a quick test like this from your machine? but it throws a 404 error if I test it. How are you testing it? Are you directly accessing a file on that share or are you trying to get a directory listing? By default, Tomcat will not display a directory listing (it'll display a 404 error). Dan On Tue, 2011-11-15 at 05:48 -0800, Ilya Kazakevich wrote: You need user ssesion to access windows station via SMB anyway. You can set this script as log in script using group policies in windows for the user your tomcat runs as. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:39 PM To: Tomcat Users List Subject: AW: Include NEtwork path into Tomcat - urgent Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Alex -Ursprüngliche Nachricht- Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] Gesendet: Dienstag, 15. November 2011 14:32 An: 'Tomcat Users List' Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: Include NEtwork path into Tomcat - urgent
Yes, http://www.test.de/pictures/test.png throws 404 error. Alex -Ursprüngliche Nachricht- Von: Daniel Mikusa [mailto:dmik...@vmware.com] Gesendet: Dienstag, 15. November 2011 15:13 An: Tomcat Users List Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. A quick test worked for me. I was able to list the contents of a SMB share on my network. Windows XP, Java 1.6.0_29. public class Test { public static void main(String[] args) { for (String fileName : new File(server\\share).list()) { System.out.println(fileName); } } } Maybe try running a quick test like this from your machine? but it throws a 404 error if I test it. How are you testing it? Are you directly accessing a file on that share or are you trying to get a directory listing? By default, Tomcat will not display a directory listing (it'll display a 404 error). Dan On Tue, 2011-11-15 at 05:48 -0800, Ilya Kazakevich wrote: You need user ssesion to access windows station via SMB anyway. You can set this script as log in script using group policies in windows for the user your tomcat runs as. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:39 PM To: Tomcat Users List Subject: AW: Include NEtwork path into Tomcat - urgent Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Alex -Ursprüngliche Nachricht- Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] Gesendet: Dienstag, 15. November 2011 14:32 An: 'Tomcat Users List' Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
RE: Include NEtwork path into Tomcat - urgent
Wiki says it should work: http://wiki.apache.org/tomcat/FAQ/Windows#Q6 What account do you use to run tomcat? Does it has access to your share? What is about tomcat logs and output? Do they have some errors? Enable audit failure on remote machine and check security event logs (it should log any unsuccessful authentication). Use tools like wireshark / winpcap to sniff tomcat-to-remote-machine conversation to see what has happened Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 6:27 PM To: Tomcat Users List Subject: AW: Include NEtwork path into Tomcat - urgent Yes, http://www.test.de/pictures/test.png throws 404 error. Alex -Ursprüngliche Nachricht- Von: Daniel Mikusa [mailto:dmik...@vmware.com] Gesendet: Dienstag, 15. November 2011 15:13 An: Tomcat Users List Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. A quick test worked for me. I was able to list the contents of a SMB share on my network. Windows XP, Java 1.6.0_29. public class Test { public static void main(String[] args) { for (String fileName : new File(server\\share).list()) { System.out.println(fileName); } } } Maybe try running a quick test like this from your machine? but it throws a 404 error if I test it. How are you testing it? Are you directly accessing a file on that share or are you trying to get a directory listing? By default, Tomcat will not display a directory listing (it'll display a 404 error). Dan On Tue, 2011-11-15 at 05:48 -0800, Ilya Kazakevich wrote: You need user ssesion to access windows station via SMB anyway. You can set this script as log in script using group policies in windows for the user your tomcat runs as. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:39 PM To: Tomcat Users List Subject: AW: Include NEtwork path into Tomcat - urgent Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Alex -Ursprüngliche Nachricht- Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] Gesendet: Dienstag, 15. November 2011 14:32 An: 'Tomcat Users List' Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander - 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: mod_jk Avoid loadbalancing
Alexander - From reading your emails, it sounds like you have the following setup F5 HW-balancer | / \ / \ Level 1 balancing / \ HTTPD1 HTTPD2 | | Level 2 balancing | | | TC1 TC2TC3 Is that correct? You state that you want to eliminate Level 2. However, from a performance standpoint, why would you? Without the Level 2 balancing, it is conceivable that one of the 3 Tomcats could end up processing the bulk the JSP requests. However, Pid is correct. If you are worried about performance, you could drop the HTTPD servers and balance directly to the Tomcat servers. Tomcat is just as fast at delivering static content as HTTPD, and it simplifies deployment. Jeff -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:56 AM To: Tomcat Users List; p...@pidster.com Subject: AW: mod_jk Avoid loadbalancing Hello, Yes, it was an option to solve my problem. But what about the performance? My opinion was to forward only necessary requests to the Tomcat (jsp, java etc) and let the Apache HTTPD deliver the static content (CSS,JS,Images etc). Best regards Alexander -Ursprüngliche Nachricht- Von: Pid [mailto:p...@pidster.com] Gesendet: Dienstag, 15. November 2011 12:41 An: Tomcat Users List Betreff: Re: mod_jk Avoid loadbalancing On 14/11/2011 10:42, Alexander Diedler wrote: Hello It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the loadbalancing between these three nodes? We only need the session replication. The Loadbalancing with failover will be done by a Big-IP F5, so we don´t need a double balanced request, first time by the HW-balancer and second time by the Apache mod_jk himself. So don't put httpd+mod_jk in front - just point the F5 at the Tomcats. p -- [key:62590808] __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk Avoid loadbalancing
On 15/11/2011 15:00, Jeffrey Janner wrote: Alexander - From reading your emails, it sounds like you have the following setup F5 HW-balancer | / \ / \ Level 1 balancing / \ HTTPD1 HTTPD2 | | Level 2 balancing | | | TC1 TC2TC3 Is that correct? You state that you want to eliminate Level 2. However, from a performance standpoint, why would you? Without the Level 2 balancing, it is conceivable that one of the 3 Tomcats could end up processing the bulk the JSP requests. Why? p However, Pid is correct. If you are worried about performance, you could drop the HTTPD servers and balance directly to the Tomcat servers. Tomcat is just as fast at delivering static content as HTTPD, and it simplifies deployment. Jeff -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:56 AM To: Tomcat Users List; p...@pidster.com Subject: AW: mod_jk Avoid loadbalancing Hello, Yes, it was an option to solve my problem. But what about the performance? My opinion was to forward only necessary requests to the Tomcat (jsp, java etc) and let the Apache HTTPD deliver the static content (CSS,JS,Images etc). Best regards Alexander -Ursprüngliche Nachricht- Von: Pid [mailto:p...@pidster.com] Gesendet: Dienstag, 15. November 2011 12:41 An: Tomcat Users List Betreff: Re: mod_jk Avoid loadbalancing On 14/11/2011 10:42, Alexander Diedler wrote: Hello It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the loadbalancing between these three nodes? We only need the session replication. The Loadbalancing with failover will be done by a Big-IP F5, so we don´t need a double balanced request, first time by the HW-balancer and second time by the Apache mod_jk himself. So don't put httpd+mod_jk in front - just point the F5 at the Tomcats. p -- [key:62590808] __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Having different apps (contexts) on different ports
On Tue, 2011-11-15 at 11:38 +, Pid wrote: On 15/11/2011 08:01, Mario Splivalo wrote: Can I have several Tomcat contexts on different ports? I need to have manager app listening only on 8080, and all the other apps on 80. Is something like that possible, within one Tomcat Service? You can have more than one Connector. You can't assign individual apps to specific Connectors. Or, if I fire up two services (under same server), each with its own set of connectors, is manager app from one service able to manage apps in another? The Manager application can only manage applications in the same Host. Unfortunately, separate Services will have separate Hosts. Perhaps an alternative that may work good enough would be to bind 8080 to localhost and 80 to a public IP address. Or, similarly, if the machined is multi-homed bind each port to different addresses. Presumably, you'd want the 8080 address to be on an address that doesn't have a route to the Internet. See 'address' on /docs/config/http.html . All the apps will still be available on both ports but if you're concerned about the public accessing 'manager' then putting it on an address they can't reach would give you some measure of isolation. Of course, this also means *you* can't reach 'manager' from outside either -- unless you tunnel in via ssh or something. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: mod_jk Avoid loadbalancing
Hello, I want to avoid, that Level1 LB routes to HTTPD1 and HTTPD1 (on same server as TC1) also balance to TC2 on level 2. So the next request from Level 1 go to HTTD2 (on same server as TC2) and so I have double load on the same server. Or is my understanding not right? If a Tomcat (TC3) give up.. the Level 1 LB should recordnized that and should redirect only to the functional Tomcats. The Failover functionality should be provided only by the Level 1 LB. -Ursprüngliche Nachricht- Von: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Gesendet: Dienstag, 15. November 2011 16:01 An: 'Tomcat Users List' Betreff: RE: mod_jk Avoid loadbalancing Alexander - From reading your emails, it sounds like you have the following setup F5 HW-balancer | / \ / \ Level 1 balancing / \ HTTPD1 HTTPD2 | | Level 2 balancing | | | TC1 TC2TC3 Is that correct? You state that you want to eliminate Level 2. However, from a performance standpoint, why would you? Without the Level 2 balancing, it is conceivable that one of the 3 Tomcats could end up processing the bulk the JSP requests. However, Pid is correct. If you are worried about performance, you could drop the HTTPD servers and balance directly to the Tomcat servers. Tomcat is just as fast at delivering static content as HTTPD, and it simplifies deployment. Jeff -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:56 AM To: Tomcat Users List; p...@pidster.com Subject: AW: mod_jk Avoid loadbalancing Hello, Yes, it was an option to solve my problem. But what about the performance? My opinion was to forward only necessary requests to the Tomcat (jsp, java etc) and let the Apache HTTPD deliver the static content (CSS,JS,Images etc). Best regards Alexander -Ursprüngliche Nachricht- Von: Pid [mailto:p...@pidster.com] Gesendet: Dienstag, 15. November 2011 12:41 An: Tomcat Users List Betreff: Re: mod_jk Avoid loadbalancing On 14/11/2011 10:42, Alexander Diedler wrote: Hello It is possible in a three node TC 6.0 / TC7.0 Cluster to avoid the loadbalancing between these three nodes? We only need the session replication. The Loadbalancing with failover will be done by a Big-IP F5, so we don´t need a double balanced request, first time by the HW-balancer and second time by the Apache mod_jk himself. So don't put httpd+mod_jk in front - just point the F5 at the Tomcats. p -- [key:62590808] __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
Errors with NIO processor
Hey Guys, We are seeing the following errors (in production of course, testing didn't reveal this) after switching to NIO protocol. This is Tomcat 7.0.22 on CentOS 6. There is a load balancer sending only comet traffic to port 8080, where the NIO protocol is used. Nov 15, 2011 8:39:29 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException Nov 15, 2011 8:39:51 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:712) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1200) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1136) at java.lang.Thread.run(Thread.java:662) Nov 15, 2011 8:39:52 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: null java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:202) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:104) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:519) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) 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:662) Exception in declaration() I see more of the Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] error by itself also. Here is the connector setup: Connector port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol connectionTimeout=2 redirectPort=8443 / Any direction on where to look for the cause? Thanks, Matt
Re: Having different apps (contexts) on different ports
On Tue, 2011-11-15 at 10:16 -0500, Tim Watts wrote: On Tue, 2011-11-15 at 11:38 +, Pid wrote: On 15/11/2011 08:01, Mario Splivalo wrote: Can I have several Tomcat contexts on different ports? I need to have manager app listening only on 8080, and all the other apps on 80. Is something like that possible, within one Tomcat Service? You can have more than one Connector. You can't assign individual apps to specific Connectors. Or, if I fire up two services (under same server), each with its own set of connectors, is manager app from one service able to manage apps in another? The Manager application can only manage applications in the same Host. Unfortunately, separate Services will have separate Hosts. Perhaps an alternative that may work good enough would be to bind 8080 to localhost and 80 to a public IP address. Or, similarly, if the machined is multi-homed bind each port to different addresses. Presumably, you'd want the 8080 address to be on an address that doesn't have a route to the Internet. See 'address' on /docs/config/http.html . All the apps will still be available on both ports but if you're concerned about the public accessing 'manager' then putting it on an address they can't reach would give you some measure of isolation. Of course, this also means *you* can't reach 'manager' from outside either -- unless you tunnel in via ssh or something. And of course, no need to use different ports if you're using different addresses. But I'm sure that light would have come on soon enough :-) p - 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 time out never takes place with ajax
Ok, Thanks all for the inputs. I found a hybrid solution for this. So for future use here goes In my application I make sure there is a filter that is called on every hit to the server /* Next I create a new filter which will handle only calls such as poling and other ajax calls that do not postpone the expiration date of the session. In the web.xml I can use the url-pattern element as a framework hook for each developer in the application to enter their own poling link The way it works is as follows 1)SessionTimeoutFilter doFilter public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpSession session = req.getSession(false); if (null != session) { Date realLastAccessDate = (Date) session .getAttribute(SESSION_LAST_ACCESS_IDENTIFIER); if (realLastAccessDate == null) { realLastAccessDate = new Date(); session.setAttribute(SESSION_LAST_ACCESS_IDENTIFIER, realLastAccessDate); } if (realLastAccessDate.before(new Date())) { // probably want to log this event session.invalidate(); session = null; } } request.setAttribute(IS_SESSION_TIMEOUT_RESETER,false); filterChain.doFilter(request, response); } 2)The general filter that is always called... public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { HttpSession session = hreq.getSession(false); if(session!=null (hreq.getAttribute(SessionTimeoutFilter.IS_SESSION_TIMEOUT_RESETER)==null || ((Boolean)hreq.getAttribute(SessionTimeoutFilter.IS_SESSION_TIMEOUT_RESETER)).booleanValue())){ Date expirationDate = new Date(System.currentTimeMillis() + session.getMaxInactiveInterval()/*seconds*/ * 1000 /*milliseconds*/); session.setAttribute(SessionTimeoutFilter.SESSION_LAST_ACCESS_IDENTIFIER, expirationDate); } chain.doFilter(request, response); } 3) the web.xml... (make sure it’s a the first filter defined!) filter filter-nameSessionTimeoutFilter/filter-name filter-class(the package)SessionTimeoutFilter/filter-class /filter filter-mapping filter-nameSessionTimeoutFilter/filter-name url-pattern/YOUR-URL-PATTERN/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping From this point on any developer can add url patterns that will not postpone the expiration date simply by adding url-pattern/YOUR-OTHER-URL-PATTERN/url-pattern HTH anyone, Sharon -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, November 14, 2011 6:17 PM To: Tomcat Users List Subject: Re: Session time out never takes place with ajax -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sharon, On 11/10/11 3:11 AM, Sharon Prober (sprober) wrote: I understand it is invoked before the filters, but after completion it would arrive to the filter/servlet container anyway. So what your saying is that if I build a valve and read information from IO file or/db or any other cached data which doesn’t trigger a request.getSession That will work? I think it would help if you explained what your ping needs to do. Basically, if you need session data to do it, you are out of luck. If you don't need session data, why are you pinging? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7BPvIACgkQ9CaO5/Lv0PD6rQCglhRD4lA4qMaqkybwBXvjeqc1 +LIAn3ARzOKhsdzPqBJ9xkkLYAeIWiXf =kM6R -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AW: Include NEtwork path into Tomcat - urgent
Hi. Don't like top-posting, but if you all do it.. I see a difference between this : .. for (String fileName : new File(server\\share).list()) { .. and this : Context path=/pictures docBase=\\storage\share\pictures / in terms of how many backslashes are used. I am not quite sure if and how backslashes are being escaped/unescaped on the way from the xml config file into a Java string in the Tomcat-level docbase, but maybe you want to try this : Context path=/pictures docBase=storage\\share\\pictures / ? Alexander Diedler wrote: Yes, http://www.test.de/pictures/test.png throws 404 error. Alex -Ursprüngliche Nachricht- Von: Daniel Mikusa [mailto:dmik...@vmware.com] Gesendet: Dienstag, 15. November 2011 15:13 An: Tomcat Users List Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. A quick test worked for me. I was able to list the contents of a SMB share on my network. Windows XP, Java 1.6.0_29. public class Test { public static void main(String[] args) { for (String fileName : new File(server\\share).list()) { System.out.println(fileName); } } } Maybe try running a quick test like this from your machine? but it throws a 404 error if I test it. How are you testing it? Are you directly accessing a file on that share or are you trying to get a directory listing? By default, Tomcat will not display a directory listing (it'll display a 404 error). Dan On Tue, 2011-11-15 at 05:48 -0800, Ilya Kazakevich wrote: You need user ssesion to access windows station via SMB anyway. You can set this script as log in script using group policies in windows for the user your tomcat runs as. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:39 PM To: Tomcat Users List Subject: AW: Include NEtwork path into Tomcat - urgent Hello, This is no option, this solution means, that the windows session must still remain opened with a logged in user. Alex -Ursprüngliche Nachricht- Von: Ilya Kazakevich [mailto:ilya.kazakev...@jetbrains.com] Gesendet: Dienstag, 15. November 2011 14:32 An: 'Tomcat Users List' Betreff: RE: Include NEtwork path into Tomcat - urgent Not sure Java IO supports windows UNC. Try to do the following: 1) mount this share as disk: (in cmd type net use z: \\storage\share\pictures) 2) configure tomcat to work with z:\ Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com http://www.jetbrains.com/ Develop with pleasure! _ From: Alexander Diedler [mailto:adied...@tecracer.de] Sent: Tuesday, November 15, 2011 5:27 PM To: users@tomcat.apache.org Subject: Include NEtwork path into Tomcat - urgent Hello, I have a Tomcat 6.0 application, that references their pictures as http://www.test.de/pictures/test.png. /pictures is a network path on a storage, so I try to make it as a Context within the server.xml Host Tag Context path=/pictures docBase=\\storage\share\pictures / but it throws a 404 error if I test it. Has somebody any idea to get out of this troube? Greetings Alexander - 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
tomcat7-maven-plugin redeploy
Is there a redeploy goal for the tomcat7 plugin? I'm trying to re-deploy a war file that has already been deployed and built to my remote tomcat server. Thanks. David Yu | Sales Engineer | CollabNet, Inc. 8000 Marina Blvd. Suite 600 | Brisbane, CA 94005 | USA Skype david.yongshin.yu | O 650.228.2613 | C 415.235.1241 | d...@collab.net mailto:d...@collab.net Agile Development in the Cloud: 7,000 Companies, 5M users, 90+ countries
Re: Errors with NIO processor
Is there more info I can provide to help diagnose this error? It is killing us. Thanks, Matt On Tue, Nov 15, 2011 at 9:00 AM, Matthew Tyson matthewcarlty...@gmail.comwrote: Hey Guys, We are seeing the following errors (in production of course, testing didn't reveal this) after switching to NIO protocol. This is Tomcat 7.0.22 on CentOS 6. There is a load balancer sending only comet traffic to port 8080, where the NIO protocol is used. Nov 15, 2011 8:39:29 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException Nov 15, 2011 8:39:51 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:712) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1200) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1136) at java.lang.Thread.run(Thread.java:662) Nov 15, 2011 8:39:52 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: null java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:202) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:104) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:519) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) 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:662) Exception in declaration() I see more of the Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] error by itself also. Here is the connector setup: Connector port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol connectionTimeout=2 redirectPort=8443 / Any direction on where to look for the cause? Thanks, Matt
Re: Errors with NIO processor
Matt, Did the testing include load testing? Have you checked the open file limit values? If not, you may be running into an open file limit for the OS and/or user that is running Tomcat. - Bob From: Matthew Tyson matthewcarlty...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, November 15, 2011 4:18 PM Subject: Re: Errors with NIO processor Is there more info I can provide to help diagnose this error? It is killing us. Thanks, Matt On Tue, Nov 15, 2011 at 9:00 AM, Matthew Tyson matthewcarlty...@gmail.comwrote: Hey Guys, We are seeing the following errors (in production of course, testing didn't reveal this) after switching to NIO protocol. This is Tomcat 7.0.22 on CentOS 6. There is a load balancer sending only comet traffic to port 8080, where the NIO protocol is used. Nov 15, 2011 8:39:29 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException Nov 15, 2011 8:39:51 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:712) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1200) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1136) at java.lang.Thread.run(Thread.java:662) Nov 15, 2011 8:39:52 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: null java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:202) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:104) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:519) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) 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:662) Exception in declaration() I see more of the Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] error by itself also. Here is the connector setup: Connector port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol connectionTimeout=2 redirectPort=8443 / Any direction on where to look for the cause? Thanks, Matt
Re: tomcat7-maven-plugin redeploy
Greetings, On Tue, Nov 15, 2011 at 6:13 PM, David Yu d...@collab.net wrote: Is there a redeploy goal for the tomcat7 plugin? I'm trying to re-deploy a war file that has already been deployed and built to my remote tomcat server. Thanks. New development is at: http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/plugin-info.html Old deprecated plugin is at: http://mojo.codehaus.org/tomcat-maven-plugin/plugin-info.html http://mojo.codehaus.org/tomcat-maven-plugin/redeploy-mojo.html -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
Re: Errors with NIO processor
Thanks Bob. It doesn't seem to be a load problem. It happens consistently even for just 1 user. If I switch the connector back to HTTP/1.1, instead of NIO, the problem goes away. Sometimes, there doesn't appear to be an error in catalina.out, but there is a response with no body, just headers like this: DateWed, 16 Nov 2011 00:43:58 GMT ServerApache-Coyote/1.1 Content-Typetext/html;charset=ISO-8859-1 Cache-Controlmax-age=2 ExpiresWed, 16 Nov 2011 00:44:00 GMT Set-Cookiexgh=gnweb10; path=/; BIGipCookie=00 000 000 VaryUser-Agent,Accept-Encoding P3P policyref=http://www.company.net/w3c/p3p.xmlhttp://www.gaggle.net/w3c/p3p.xml, CP=ALL Content-Encodinggzip Content-Length20 Connectionclose On Tue, Nov 15, 2011 at 4:51 PM, Bob Hall rfha...@yahoo.com wrote: Matt, Did the testing include load testing? Have you checked the open file limit values? If not, you may be running into an open file limit for the OS and/or user that is running Tomcat. - Bob From: Matthew Tyson matthewcarlty...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, November 15, 2011 4:18 PM Subject: Re: Errors with NIO processor Is there more info I can provide to help diagnose this error? It is killing us. Thanks, Matt On Tue, Nov 15, 2011 at 9:00 AM, Matthew Tyson matthewcarlty...@gmail.comwrote: Hey Guys, We are seeing the following errors (in production of course, testing didn't reveal this) after switching to NIO protocol. This is Tomcat 7.0.22 on CentOS 6. There is a load balancer sending only comet traffic to port 8080, where the NIO protocol is used. Nov 15, 2011 8:39:29 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException Nov 15, 2011 8:39:51 AM org.apache.tomcat.util.net.NioEndpoint processSocket SEVERE: Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:712) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1200) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1136) at java.lang.Thread.run(Thread.java:662) Nov 15, 2011 8:39:52 AM org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process SEVERE: null java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:202) at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:104) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:519) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) 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:662) Exception in declaration() I see more of the Calling [asyncPostProcess()] is not valid for a request with Async state [STARTED] error by itself also. Here is the connector setup: Connector port=8080 protocol=org.apache.coyote.http11.Http11NioProtocol connectionTimeout=2 redirectPort=8443 / Any direction on where to look for the cause? Thanks, Matt
Apache Tomcat 6.0.34
Hello, We hit Authentication bypass and information disclosure CVE-2011-3190 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3190 in tomcat 6.0.32 May i know when Tomcat 6.0.34 will be release? Regards, Angus This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/about-us-legal-email-disclaimer.htm for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.
Re: Apache Tomcat 6.0.34
2011/11/16 Angus Yiu a...@datapipe.com: Hello, We hit Authentication bypass and information disclosure CVE-2011-3190 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3190 in tomcat 6.0.32 May i know when Tomcat 6.0.34 will be release? Tag and release candidates are already done and vote is currently in progress. Once voting ends (usually 3 days) and there are no blocking issues (no negative votes) and at least 3 +1 votes, the same binaries are published as a release. If you want to help testing, you may download the release candidate. See [VOTE] thread on dev@. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 403 error starting tomcat 7.0.22 application on windows 7
When i have changed url for my app from http://localhost... to http://127.0.0.1... the 403 error has gone. -Исходное сообщение- From: Tim Watts Sent: Monday, November 14, 2011 7:35 PM To: Tomcat Users List Subject: Re: 403 error starting tomcat 7.0.22 application on windows 7 On Mon, 2011-11-14 at 09:56 +0400, bas...@obninsk.com wrote: -Исходное сообщение- From: Tim Watts Sent: Monday, November 14, 2011 9:09 AM To: Tomcat Users List Subject: Re: 403 error starting tomcat 7.0.22 application on windows 7 On Mon, 2011-11-14 at 08:17 +0400, bas...@obninsk.com wrote: Can you paste the application web.xml file (inline) into your reply? ?xml version=1.0 encoding=UTF-8? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 display-nameWEB query/display-name description/description error-page error-code404/error-code location/includes/error404.jsp/location /error-page error-page error-code500/error-code location/includes/error500.jsp/location /error-page servlet description/description display-namereportcmnt/display-name servlet-namereportcmnt/servlet-name jsp-file/jsp/reportcmnt.jsp/jsp-file /servlet servlet-mapping servlet-namereportcmnt/servlet-name url-pattern/reportcmnt/url-pattern /servlet-mapping /web-app Do you have an access log configured, if so, what does it show? 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] GET /query HTTP/1.1 302 125 - Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] GET /query/ HTTP/1.1 403 964 - Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] GET /query HTTP/1.1 302 125 http://localhost:8082/manager/html;jsessionid=4D76EA53493CA915B556DB02D1D9932E?org.apache.catalina.filters.CSRF_NONCE=95AB554C225507BE146FBA41E2BF3A97; Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] GET /query/ HTTP/1.1 403 964 http://localhost:8082/manager/html;jsessionid=4D76EA53493CA915B556DB02D1D9932E?org.apache.catalina.filters.CSRF_NONCE=95AB554C225507BE146FBA41E2BF3A97; Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2 What user account is Tomcat running under? A: local system account. It has full access to the application's folders and files. OK, you're getting a 403 on http://localhost:8082/query/ but your web.xml only shows a mapping for /reportcmnt and no welcome file declarations. What happens if you use /query/reportcmnt instead? A: 403 error again. Is there perhaps an index.html that would have redirected to /query/reportcmnt? A: My index.html contains html meta content=text/html;charset=utf-8/ head titleWEB query/title /head body scriptlocation=jsp/app.jsp/script /body /html Q: What version of Tomcat were you using prior to the win7 migration? A: Tomcat 7.0.22. I've just installed Tomcat 7.0.22 on WinXP, then copied my app from Win7 to the WinXp webapps folder and run my app. It works fine. So (xp,tc7)=OK but (win7,tc7)=403 for 'query' but not 'manager'. Presumably on XP you're also running Tomcat as a service under the local system account? Just for grins, have you tried stopping the service then running Tomcat from a command shell (e.g. {tc-home}\bin \startup.bat) on win7 under your user account and see if you still get the 403? Just guessing here but is it possible your web app files have security constraints attached to them that aren't being resolved on win7 but are on xp? Are there any conditions in your app logic that would return a 403? Perhaps it can't access a service from win7 but can from xp? Licensing? Also, looks like you've done some tweaking on server.xml (e.g. different server port). Can you paste in this file as well? - 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: tomcat7-maven-plugin redeploy
Hi, It's seems that new tomcat7 plugin does not have undeploy/redeploy goals. So deployment fails with: -- [ERROR] BUILD ERROR [INFO] -- -- [INFO] Cannot invoke Tomcat manager: FAIL - Application already exists at path / Is it possible to undeploy/redeploy app using apache tomcat7 plugin? Should I revert back to codehaus plugin? -Original Message- From: Jesse Farinacci [mailto:jie...@gmail.com] Sent: Wednesday, November 16, 2011 4:21 AM To: Tomcat Users List Subject: Re: tomcat7-maven-plugin redeploy Greetings, On Tue, Nov 15, 2011 at 6:13 PM, David Yu d...@collab.net wrote: Is there a redeploy goal for the tomcat7 plugin? I'm trying to re-deploy a war file that has already been deployed and built to my remote tomcat server. Thanks. New development is at: http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/plugin-info.html Old deprecated plugin is at: http://mojo.codehaus.org/tomcat-maven-plugin/plugin-info.html http://mojo.codehaus.org/tomcat-maven-plugin/redeploy-mojo.html -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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Having different apps (contexts) on different ports
On 11/15/2011 06:56 PM, Tim Watts wrote: Perhaps an alternative that may work good enough would be to bind 8080 to localhost and 80 to a public IP address. Or, similarly, if the machined is multi-homed bind each port to different addresses. Presumably, you'd want the 8080 address to be on an address that doesn't have a route to the Internet. See 'address' on /docs/config/http.html . All the apps will still be available on both ports but if you're concerned about the public accessing 'manager' then putting it on an address they can't reach would give you some measure of isolation. Of course, this also means *you* can't reach 'manager' from outside either -- unless you tunnel in via ssh or something. And of course, no need to use different ports if you're using different addresses. But I'm sure that light would have come on soon enough :-) Eh. Unfortunately I have only one IP on the box, publicly visible. The general idea was to protect manager app from 'the world'. But I managed to set up Valve within the manager context that would block access to it (manager) from all but the specified IPs. Thank you both for your inputs, I actually just wanted to make sure I can't do what I initially wanted :) Mario - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org