RE: Multiple tomcat containers or instance on same servers
Sorry for jumping in late. I am not sure if it's still relevant to the discussion, but long back I had written a small script to help me setup something similar on a windows box. Primarily to use multiple instances using same binaries. https://code.google.com/p/tomcat-instance-manager/ You can also add multiple windows services using the script (giving each service a name as needed). Regards > From: akinola@swisstopo.ch > To: users@tomcat.apache.org > Date: Tue, 30 Apr 2013 14:28:56 +0200 > Subject: Multiple tomcat containers or instance on same servers > > I would need help to configure different application in their respective > tomcat container. > > Does having multiple containers is same as have multiple instances on the > same server? > I already have tomcat 6.0.26 installed through an installer on a Windows > Server 2008 R2. How do I go about configuring multiple containers or > instances? > > Thanks for your prompt response
Some help with Security Manager
Hi, I’m using Tomcat with JSF, ICEFaces, Spring and JPA. The configuracion and the app work very well when I deploy it with the security managed disabled. The problem is when I enable the security manager, I can’t deploy the app. In the I can see the next trace: INFO: Desplieque del descriptor de configuración C:\Users\Alejandro\AppData\Roaming\NetBeans\7.2.1\apache-tomcat-7.0.27.0_base\conf\Catalina\localhost\web-root.xml may 04, 2013 1:57:06 PM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web-root]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:130) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:153) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:142) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:869) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NullPointerException at com.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:278) at com.sun.faces.config.InitFacesContext.(InitFacesContext.java:102) at com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:114) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 15 more may 04, 2013 1:57:06 PM org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error durante el despliegue del descriptor de configuración C:\Users\Alejandro\AppData\Roaming\NetBeans\7.2.1\apache-tomcat-7.0.27.0_base\conf\Catalina\localhost\web-root.xml java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web-root]] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:898) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:130) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:153) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:142) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:869) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) may 04, 2013 1:57:06 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8084"] I try to find a reason in Internet but I can’t find the correct answer for this problem. Some help, I appreciate it. Regards
Re: Status 204 (no content) and Content-Type header
On 04/05/2013 21:21, Mark Thomas wrote: > On 04/05/2013 20:43, Rossen Stoyanchev wrote: >> >> It appears that Tomcat ignores the Content-Type header when the >> status is set to 204 (No Content). > > Correct. It happens in AbstractHttp11Processor.prepareResponse() > >> I can see the rational for that, >> however is there a strong reason why Tomcat should care if it is set >> by the application? > > No. > > I took a look at RFC 2616. Section 10.2.5 states that a 204 response may > contain updated metainformation in the form of entity headers and, as > per section 7.1, Content-Type is an entity header so it should be not be > skipped if set for a 204 response. > > On those grounds, this is a Tomcat bug. > >> There are some corner cases [1]. > > That looks more like a bug in 3rd-party code. Bugs in 3rd party code are > rarely sufficient justification for changing Tomcat's behaviour. In this > case, the RFC2616 argument is a much stronger one and it looks to me > like the code will be changed (regardless of [1], not because of it). Fixed in trunk and 7.0.x and will be in 7.0.40 onwards. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Status 204 (no content) and Content-Type header
On 04/05/2013 20:43, Rossen Stoyanchev wrote: > > It appears that Tomcat ignores the Content-Type header when the > status is set to 204 (No Content). Correct. It happens in AbstractHttp11Processor.prepareResponse() > I can see the rational for that, > however is there a strong reason why Tomcat should care if it is set > by the application? No. I took a look at RFC 2616. Section 10.2.5 states that a 204 response may contain updated metainformation in the form of entity headers and, as per section 7.1, Content-Type is an entity header so it should be not be skipped if set for a 204 response. On those grounds, this is a Tomcat bug. > There are some corner cases [1]. That looks more like a bug in 3rd-party code. Bugs in 3rd party code are rarely sufficient justification for changing Tomcat's behaviour. In this case, the RFC2616 argument is a much stronger one and it looks to me like the code will be changed (regardless of [1], not because of it). Mark > > Rossen > > [1] > https://github.com/sockjs/sockjs-protocol/blob/master/sockjs-protocol-0.3.3.py#L746 > > > - > > 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
Status 204 (no content) and Content-Type header
It appears that Tomcat ignores the Content-Type header when the status is set to 204 (No Content). I can see the rational for that, however is there a strong reason why Tomcat should care if it is set by the application? There are some corner cases [1]. Rossen [1] https://github.com/sockjs/sockjs-protocol/blob/master/sockjs-protocol-0.3.3.py#L746 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Designing for Load on TomCat
On 5/4/2013 1:24 PM, Mark Thomas wrote: On 04/05/2013 16:01, Yogesh wrote: Well my question is Is it a common design practice from your experiences to configure one node (maxthreads) for the scenario where all other nodes amongst which the load was distribued fail ? You design for whatever level of resilience you need to meet the availability requirements. Mark Which IME means allow for either one or two of the cluster nodes to fail, depending on how many you have to start with. Never all but one, unless you only have two to begin with. On the cluster part, wrt tomcats talking to each other do you mean the session replication feature or something else ? Sent from my iPhone On May 4, 2013, at 9:26 AM, André Warnier wrote: yogesh hingmire wrote: On Sat, May 4, 2013 at 7:07 AM, André Warnier wrote: yogesh hingmire wrote: While planning / designing to build a web app that must scale to 2000 concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache at the front of course and the ability to serve 20 concurrent requests per seconds during business hours, with a page response time of 5 seconds, how would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) parameters should be considered for this design ? I will provide the ABC, and leave the details for someone else. You have 20 requests arriving per second, and it takes 5 seconds to process one request and return the response. So, over time, it will look like this Time new requests requests in-process requests terminated 020 20 0 +1s 20 40 0 +2s 20 60 0 +3s 20 80 0 +4s 20 100 0 +5s 20 100 20 +6s 20 100 40 +7s 20 100 60 etc... So, in principle, and assuming nothing else is going on, you need 100 concurrent threads in Tomcat to process these requests. (I would take a healthy margin of security and double that). Whether for that you need a cluster of Tomcats is another discussion. And how much memory you need to allocate to your Tomcat(s) JVM(s) is a function of what your webapp needs, to process one request. The numer of concurrent users should be relatively irrelevant, if all you mean by that is that some of these requests come from the same user, but they are otherwise independent of one another. Note that I have a suspicion that what you describe as "requests" above probably only count the requests to your webapp code, and do not count the additional requests for stylesheets, images, etc.. which may be embedded in any page that the user's browser eventually displays. So unless you plan on serving those directly from the Apache httpd front-end, you should take them into account too. Thanks Andre and sorry for not mentioning about the other content that are actually requested by http get's from the jsp served., There is quite a lot of ajax calls and static content and that can be served out of httpd, but as of now it is not. I know not the best way, but you can read the on-line documentation, I presume ? so i assume i have to increment my thread count correspondingly.. Well yes, because then you do not have 20 requests per second, you have more. Only you would know how many more, and how long they take to serve, but the calculation is similar. While planning to threads on a single node, do i have to take into account the failure scenario where say all other 4 nodes fail and just this one node has to serve out the entire web app load. For that, do i have to provision the thread count as many as 4 times what i arrive for a single node ? Your thoughts? I think that you can figure that one out by yourself, no ? One more thing, to avoid you looking in the wrong direction : having one Apache httpd front-end distributing calls to several back-end Tomcats, does not make it so that the Tomcat servers constitute a "cluster". A "cluster" is a name more usually used when the Tomcats are talking to eachother. In this case, they would not be. It would just be the connector, on the Apache httpd side, which distributes the load between the back-end Tomcats, and detects when one or more is not working anymore. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: proper context usage
On 04/05/2013 17:15, Istvan Devai wrote: > Questions: > - Any idea how to have an external, application specific (that is, > non-shared) context file that is not deleted on redeployment in the > manager? > - Or maybe deploy the app in a different way that retains the > app-specific context file? > - Any other solution to my problem in general? > > I'm using Linux and Tomcat 7.0.37. There might be a bug here in the order resources are processed. Looking at it - and documenting the expected behaviour - is still on my TODO list. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Designing for Load on TomCat
On 04/05/2013 16:01, Yogesh wrote: > Well my question is Is it a common design practice from your experiences to > configure one node (maxthreads) for the scenario where all other nodes > amongst which the load was distribued fail ? You design for whatever level of resilience you need to meet the availability requirements. Mark > > On the cluster part, wrt tomcats talking to each other do you mean the > session replication feature or something else ? > > Sent from my iPhone > > On May 4, 2013, at 9:26 AM, André Warnier wrote: > >> yogesh hingmire wrote: >> >> >>> On Sat, May 4, 2013 at 7:07 AM, André Warnier wrote: yogesh hingmire wrote: > While planning / designing to build a web app that must scale to 2000 > concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache > at > the front of course and the ability to serve 20 concurrent requests per > seconds during business hours, with a page response time of 5 seconds, how > would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) > parameters should be considered for this design ? I will provide the ABC, and leave the details for someone else. You have 20 requests arriving per second, and it takes 5 seconds to process one request and return the response. So, over time, it will look like this Time new requests requests in-process requests terminated 020 20 0 +1s 20 40 0 +2s 20 60 0 +3s 20 80 0 +4s 20 100 0 +5s 20 100 20 +6s 20 100 40 +7s 20 100 60 etc... So, in principle, and assuming nothing else is going on, you need 100 concurrent threads in Tomcat to process these requests. (I would take a healthy margin of security and double that). Whether for that you need a cluster of Tomcats is another discussion. And how much memory you need to allocate to your Tomcat(s) JVM(s) is a function of what your webapp needs, to process one request. The numer of concurrent users should be relatively irrelevant, if all you mean by that is that some of these requests come from the same user, but they are otherwise independent of one another. Note that I have a suspicion that what you describe as "requests" above probably only count the requests to your webapp code, and do not count the additional requests for stylesheets, images, etc.. which may be embedded in any page that the user's browser eventually displays. So unless you plan on serving those directly from the Apache httpd front-end, you should take them into account too. >>> Thanks Andre and sorry for not mentioning about the other content that are >>> actually requested by http get's from the jsp served., >>> There is quite a lot of ajax calls and static content and that can be >>> served out of httpd, but as of now it is not. I know not the best way, >> >> but you can read the on-line documentation, I presume ? >> >> so i >>> assume i have to increment my thread count correspondingly.. >> >> Well yes, because then you do not have 20 requests per second, you have more. >> Only you would know how many more, and how long they take to serve, but the >> calculation is similar. >> >>> >>> While planning to threads on a single node, do i have to take into account >>> the failure scenario where say all other 4 nodes fail and just this one >>> node has to serve out the entire web app load. For that, do i have to >>> provision the thread count as many as 4 times what i arrive for a single >>> node ? >>> >>> Your thoughts? >> >> I think that you can figure that one out by yourself, no ? >> >> One more thing, to avoid you looking in the wrong direction : having one >> Apache httpd front-end distributing calls to several back-end Tomcats, does >> not make it so that the Tomcat servers constitute a "cluster". A "cluster" >> is a name more usually used when the Tomcats are talking to eachother. In >> this case, they would not be. It would just be the connector, on the Apache >> httpd side, which distributes the load between the back-end Tomcats, and >> detects when one or more is not working anymore. >> >> >> >> >> - >> 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 > ---
proper context usage
Hi all, My problem is, that I'd like to configure a valve for only one deployed application (deployed as a .war file) Here are the ways I've already tried: - Putting the element into server.xml. This works, however, after doing this, the manager application won't let me redeploy the application (gives an error message describing this). - Putting the valve declaration into conf/context.xml. This also works, however, this way the valve configured for all deployed applications, which is not possible in my case (the valve is doing authentication stuff, which I do not want to take effect for other apps, eg the manager app) - Putting the valve declaration into conf/Catalina/localhost/myapp.xml. This also works fine, however this file is always deleted after redeployment (as far as I know, this was introduced to tomcat 7, as autoDeploy=false does not disable the deletion of context files). The official solution to this, - according to the manual - is to put the context.xml file into the .war file itself. However, the problem with this, is that the context contains database connections, mail sessions, etc. that are different for every environment where the .war file is deployed. That's why I'd like to stick with an external way of configuration. Questions: - Any idea how to have an external, application specific (that is, non-shared) context file that is not deleted on redeployment in the manager? - Or maybe deploy the app in a different way that retains the app-specific context file? - Any other solution to my problem in general? I'm using Linux and Tomcat 7.0.37. Kind regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache tomcat server win8 cannot be accessed outside of local host
Hi Konstantin Regards, Zachery On 4 May, 2013, at 22:04, Konstantin Preißer wrote: > Hi Zachery, > >> -Original Message- >> From: Zachery [mailto:fang...@me.com] >> Sent: Saturday, May 4, 2013 2:22 PM >>> Well, IF you turn off the Windows Firewall (just for a moment, just for >> testing), does it work ? >> Yes! >> This works! I can access my apache server from other machines! >> >> But this is not a good way since outing my machine at risk of security >> attack! > > Then you probably didn't configure the Firewall rule properly. > > Maybe you selected "Block all incoming connections, including those in the > list of allowed apps" in the firewall options? > Otherwise I can't imagine why incoming connections would be rejected despite > adding the inbound rule using the steps you described. > I am sure I didn't block those rules in exceptional list. This question makes crazy!! There is no way to get it solved! > > Regards, > Preißer > > > - > 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: Designing for Load on TomCat
Well my question is Is it a common design practice from your experiences to configure one node (maxthreads) for the scenario where all other nodes amongst which the load was distribued fail ? On the cluster part, wrt tomcats talking to each other do you mean the session replication feature or something else ? Sent from my iPhone On May 4, 2013, at 9:26 AM, André Warnier wrote: > yogesh hingmire wrote: > > >> On Sat, May 4, 2013 at 7:07 AM, André Warnier wrote: >>> yogesh hingmire wrote: >>> While planning / designing to build a web app that must scale to 2000 concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache at the front of course and the ability to serve 20 concurrent requests per seconds during business hours, with a page response time of 5 seconds, how would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) parameters should be considered for this design ? >>> I will provide the ABC, and leave the details for someone else. >>> You have 20 requests arriving per second, and it takes 5 seconds to >>> process one request and return the response. >>> So, over time, it will look like this >>> >>> Time new requests requests in-process requests terminated >>> >>> 020 20 0 >>> +1s 20 40 0 >>> +2s 20 60 0 >>> +3s 20 80 0 >>> +4s 20 100 0 >>> +5s 20 100 20 >>> +6s 20 100 40 >>> +7s 20 100 60 >>> etc... >>> >>> So, in principle, and assuming nothing else is going on, you need 100 >>> concurrent threads in Tomcat to process these requests. >>> (I would take a healthy margin of security and double that). >>> Whether for that you need a cluster of Tomcats is another discussion. >>> And how much memory you need to allocate to your Tomcat(s) JVM(s) is a >>> function of what your webapp needs, to process one request. >>> >>> The numer of concurrent users should be relatively irrelevant, if all you >>> mean by that is that some of these requests come from the same user, but >>> they are otherwise independent of one another. >>> >>> Note that I have a suspicion that what you describe as "requests" above >>> probably only count the requests to your webapp code, and do not count the >>> additional requests for stylesheets, images, etc.. which may be embedded in >>> any page that the user's browser eventually displays. >>> So unless you plan on serving those directly from the Apache httpd >>> front-end, you should take them into account too. > > Thanks Andre and sorry for not mentioning about the other content that are > > actually requested by http get's from the jsp served., > > There is quite a lot of ajax calls and static content and that can be > > served out of httpd, but as of now it is not. I know not the best way, > > but you can read the on-line documentation, I presume ? > > so i > > assume i have to increment my thread count correspondingly.. > > Well yes, because then you do not have 20 requests per second, you have more. > Only you would know how many more, and how long they take to serve, but the > calculation is similar. > > > > > While planning to threads on a single node, do i have to take into account > > the failure scenario where say all other 4 nodes fail and just this one > > node has to serve out the entire web app load. For that, do i have to > > provision the thread count as many as 4 times what i arrive for a single > > node ? > > > > Your thoughts? > > I think that you can figure that one out by yourself, no ? > > One more thing, to avoid you looking in the wrong direction : having one > Apache httpd front-end distributing calls to several back-end Tomcats, does > not make it so that the Tomcat servers constitute a "cluster". A "cluster" > is a name more usually used when the Tomcats are talking to eachother. In > this case, they would not be. It would just be the connector, on the Apache > httpd side, which distributes the load between the back-end Tomcats, and > detects when one or more is not working anymore. > > > > > - > 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: Designing for Load on TomCat
yogesh hingmire wrote: On Sat, May 4, 2013 at 7:07 AM, André Warnier wrote: yogesh hingmire wrote: While planning / designing to build a web app that must scale to 2000 concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache at the front of course and the ability to serve 20 concurrent requests per seconds during business hours, with a page response time of 5 seconds, how would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) parameters should be considered for this design ? I will provide the ABC, and leave the details for someone else. You have 20 requests arriving per second, and it takes 5 seconds to process one request and return the response. So, over time, it will look like this Time new requests requests in-process requests terminated 020 20 0 +1s 20 40 0 +2s 20 60 0 +3s 20 80 0 +4s 20 100 0 +5s 20 100 20 +6s 20 100 40 +7s 20 100 60 etc... So, in principle, and assuming nothing else is going on, you need 100 concurrent threads in Tomcat to process these requests. (I would take a healthy margin of security and double that). Whether for that you need a cluster of Tomcats is another discussion. And how much memory you need to allocate to your Tomcat(s) JVM(s) is a function of what your webapp needs, to process one request. The numer of concurrent users should be relatively irrelevant, if all you mean by that is that some of these requests come from the same user, but they are otherwise independent of one another. Note that I have a suspicion that what you describe as "requests" above probably only count the requests to your webapp code, and do not count the additional requests for stylesheets, images, etc.. which may be embedded in any page that the user's browser eventually displays. So unless you plan on serving those directly from the Apache httpd front-end, you should take them into account too. > Thanks Andre and sorry for not mentioning about the other content that are > actually requested by http get's from the jsp served., > There is quite a lot of ajax calls and static content and that can be > served out of httpd, but as of now it is not. I know not the best way, but you can read the on-line documentation, I presume ? so i > assume i have to increment my thread count correspondingly.. Well yes, because then you do not have 20 requests per second, you have more. Only you would know how many more, and how long they take to serve, but the calculation is similar. > > While planning to threads on a single node, do i have to take into account > the failure scenario where say all other 4 nodes fail and just this one > node has to serve out the entire web app load. For that, do i have to > provision the thread count as many as 4 times what i arrive for a single > node ? > > Your thoughts? I think that you can figure that one out by yourself, no ? One more thing, to avoid you looking in the wrong direction : having one Apache httpd front-end distributing calls to several back-end Tomcats, does not make it so that the Tomcat servers constitute a "cluster". A "cluster" is a name more usually used when the Tomcats are talking to eachother. In this case, they would not be. It would just be the connector, on the Apache httpd side, which distributes the load between the back-end Tomcats, and detects when one or more is not working anymore. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache tomcat server win8 cannot be accessed outside of local host
Zachery wrote: ... >>> Then only method I find by far is *turning off my windows firewall*! But >>> this is not preferred since the potential security risk. >> Well, IF you turn off the Windows Firewall (just for a moment, just for >> testing), does it work ? > Yes! > This works! I can access my apache server from other machines! > Ok, well this tells you that there is nothing wrong with the Tomcat configuration. You need to find out how to enable the Tomcat port through your firewall, when you turn it back on. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Apache tomcat server win8 cannot be accessed outside of local host
Hi Zachery, > -Original Message- > From: Zachery [mailto:fang...@me.com] > Sent: Saturday, May 4, 2013 2:22 PM > > Well, IF you turn off the Windows Firewall (just for a moment, just for > testing), does it work ? > Yes! > This works! I can access my apache server from other machines! > > But this is not a good way since outing my machine at risk of security attack! Then you probably didn't configure the Firewall rule properly. Maybe you selected "Block all incoming connections, including those in the list of allowed apps" in the firewall options? Otherwise I can't imagine why incoming connections would be rejected despite adding the inbound rule using the steps you described. Regards, Konstantin Preißer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache tomcat server win8 cannot be accessed outside of local host
Regards, Zachery On 4 May, 2013, at 20:10, André Warnier wrote: > Zachery wrote: >> Dear all, >> I have installed the apache-tomcat server on my local win8. The port I >> specified is . >> Additionally, I use the distributed binary version of apache tomcat. Not >> installing as a windows service. >> I can access my service by |http://localhost:| and >> |http://myIPAddress:| >> But I cannot access my apache server from other computers. I searched on the >> internet, and found I should add a firewall inbound rule in its advanced >> settings. >> 1. Right click "Inbound Rules" on the left pane >> 2. Choose "New Rule" >> 3. Choose "Port" "TCP" >> 4. Under "Specific ports" enter your port number () >> 5. Continue with "Next" until the end of the wizard, naming the rule when >> asked. >> After doing this, it still doesn't work!! >> I even tried to set the ports at step 4 to be "any". Still doesn't work! >> I have checked with "netstat -na" to see that: |TCP 0.0.0.0: 0.0.0.0:0 >> LISTENING| >> Then only method I find by far is *turning off my windows firewall*! But >> this is not preferred since the potential security risk. > > Well, IF you turn off the Windows Firewall (just for a moment, just for > testing), does it work ? Yes! This works! I can access my apache server from other machines! But this is not a good way since outing my machine at risk of security attack! >> Some online post refers to httpd.conf file. But my apache-tomcat have no >> such kind of fire. >> Could someone give me some hints? >> >> EDIT: >> There are three places related to port number setting in the >> |/conf/server.xml| file. >> || >> |> redirectPort="8443" />|// *I change the 8080 to for my own use.* >> || > > > - > 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: Designing for Load on TomCat
Thanks Andre and sorry for not mentioning about the other content that are actually requested by http get's from the jsp served., There is quite a lot of ajax calls and static content and that can be served out of httpd, but as of now it is not. I know not the best way, so i assume i have to increment my thread count correspondingly.. While planning to threads on a single node, do i have to take into account the failure scenario where say all other 4 nodes fail and just this one node has to serve out the entire web app load. For that, do i have to provision the thread count as many as 4 times what i arrive for a single node ? Your thoughts? On Sat, May 4, 2013 at 7:07 AM, André Warnier wrote: > yogesh hingmire wrote: > >> While planning / designing to build a web app that must scale to 2000 >> concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache >> at >> the front of course and the ability to serve 20 concurrent requests per >> seconds during business hours, with a page response time of 5 seconds, how >> would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) >> parameters should be considered for this design ? >> >> > I will provide the ABC, and leave the details for someone else. > You have 20 requests arriving per second, and it takes 5 seconds to > process one request and return the response. > So, over time, it will look like this > > Time new requests requests in-process requests terminated > > 020 20 0 > +1s 20 40 0 > +2s 20 60 0 > +3s 20 80 0 > +4s 20 100 0 > +5s 20 100 20 > +6s 20 100 40 > +7s 20 100 60 > etc... > > So, in principle, and assuming nothing else is going on, you need 100 > concurrent threads in Tomcat to process these requests. > (I would take a healthy margin of security and double that). > Whether for that you need a cluster of Tomcats is another discussion. > And how much memory you need to allocate to your Tomcat(s) JVM(s) is a > function of what your webapp needs, to process one request. > > The numer of concurrent users should be relatively irrelevant, if all you > mean by that is that some of these requests come from the same user, but > they are otherwise independent of one another. > > Note that I have a suspicion that what you describe as "requests" above > probably only count the requests to your webapp code, and do not count the > additional requests for stylesheets, images, etc.. which may be embedded in > any page that the user's browser eventually displays. > So unless you plan on serving those directly from the Apache httpd > front-end, you should take them into account too. > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tomcat.**apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Apache tomcat server win8 cannot be accessed outside of local host
Zachery wrote: Dear all, I have installed the apache-tomcat server on my local win8. The port I specified is . Additionally, I use the distributed binary version of apache tomcat. Not installing as a windows service. I can access my service by |http://localhost:| and |http://myIPAddress:| But I cannot access my apache server from other computers. I searched on the internet, and found I should add a firewall inbound rule in its advanced settings. 1. Right click "Inbound Rules" on the left pane 2. Choose "New Rule" 3. Choose "Port" "TCP" 4. Under "Specific ports" enter your port number () 5. Continue with "Next" until the end of the wizard, naming the rule when asked. After doing this, it still doesn't work!! I even tried to set the ports at step 4 to be "any". Still doesn't work! I have checked with "netstat -na" to see that: |TCP 0.0.0.0: 0.0.0.0:0 LISTENING| Then only method I find by far is *turning off my windows firewall*! But this is not preferred since the potential security risk. Well, IF you turn off the Windows Firewall (just for a moment, just for testing), does it work ? Some online post refers to httpd.conf file. But my apache-tomcat have no such kind of fire. Could someone give me some hints? EDIT: There are three places related to port number setting in the |/conf/server.xml| file. || |redirectPort="8443" />|// *I change the 8080 to for my own use.* || - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Designing for Load on TomCat
yogesh hingmire wrote: While planning / designing to build a web app that must scale to 2000 concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache at the front of course and the ability to serve 20 concurrent requests per seconds during business hours, with a page response time of 5 seconds, how would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) parameters should be considered for this design ? I will provide the ABC, and leave the details for someone else. You have 20 requests arriving per second, and it takes 5 seconds to process one request and return the response. So, over time, it will look like this Time new requests requests in-process requests terminated 020 20 0 +1s 20 40 0 +2s 20 60 0 +3s 20 80 0 +4s 20 100 0 +5s 20 100 20 +6s 20 100 40 +7s 20 100 60 etc... So, in principle, and assuming nothing else is going on, you need 100 concurrent threads in Tomcat to process these requests. (I would take a healthy margin of security and double that). Whether for that you need a cluster of Tomcats is another discussion. And how much memory you need to allocate to your Tomcat(s) JVM(s) is a function of what your webapp needs, to process one request. The numer of concurrent users should be relatively irrelevant, if all you mean by that is that some of these requests come from the same user, but they are otherwise independent of one another. Note that I have a suspicion that what you describe as "requests" above probably only count the requests to your webapp code, and do not count the additional requests for stylesheets, images, etc.. which may be embedded in any page that the user's browser eventually displays. So unless you plan on serving those directly from the Apache httpd front-end, you should take them into account too. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Monitoring Tomcat - Delta Values
2013/5/4 evernat : > Hi Christopher and all, > > Since JavaMelody is quite often named to monitor Tomcat in this mailing list > and is open-source, JavaMelody could be added in the FAQ/Monitoring wiki > page indeed. I can send a one phrase description if you want. > > Or can someone add me in the ContributorsGroup of the Tomcat wiki, so that I > am able to do it? > My wiki username is EmericVernat > Added. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Designing for Load on TomCat
While planning / designing to build a web app that must scale to 2000 concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache at the front of course and the ability to serve 20 concurrent requests per seconds during business hours, with a page response time of 5 seconds, how would we go about the ask ? What Apache / Tomcat / System (CPU/JVM) parameters should be considered for this design ? Thank You, Yogesh
Re: Monitoring Tomcat - Delta Values
Hi Christopher and all, Since JavaMelody is quite often named to monitor Tomcat in this mailing list and is open-source, JavaMelody could be added in the FAQ/Monitoring wiki page indeed. I can send a one phrase description if you want. Or can someone add me in the ContributorsGroup of the Tomcat wiki, so that I am able to do it? My wiki username is EmericVernat - Emeric Darryl Lewis-2 wrote > My choice of weapon is Melody: http://code.google.com/p/javamelody/ -- View this message in context: http://tomcat.10.x6.nabble.com/Monitoring-Tomcat-Delta-Values-tp4998588p4998617.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org