JSESSIONID being lost

2010-04-20 Thread Jim Goodspeed
I'm hoping someone may have some insight into a difficult problem we are
having.  We have a situation where the JSESSIONID seems to get lost
somewhere in a users transaction - the result is they get kicked back to the
applications login page (no sessionid so the app thinks they haven't logged
in).

Our current setup is two hardware load balancers (layer 4) in front of two
Apache servers (2.2.14) which sit in front of two tomcat servers (6.0.20).
The hardware load balancers load balance apache and apache load balances
tomcat using AJP via mod_proxy.  Apache and Tomcat are running on RHEL4
32-bit.  The JVM is 1.6.

This issue first popped up when we moved to the above architecture -
previously we had no hardware load balancers and only one apache server
balancing two tomcat servers (still with AJP via mod_proxy).  Initial
thoughts were that it had something to do with either the 2nd apache server
or the load balancers.

One way we have made this better (but not fixed) was to turn off one of the
tomcat servers so that requests could only go to one place - we thought that
the users session was being sent to the other tomcat server even though we
were using sticky sessions.  This was our temporary fix until we could
implement clustering, but today we found that users were still being kicked
back to the login page even with only one tomcat server running.  In the
interim we have turned off one of the apache servers to see if that helps
(so two hardware load balancers, one apache server and one tomcat server).

This problem is intermittent and almost impossible to reproduce, but it does
seem to happen more under heavy load.  Any insight would be very much
appreciated.  If it would help I can post our apache and tomcat
configurations.


Thanks in advance.


Re: acceptCount in Tomcat 5.x and 6.x?

2009-04-02 Thread Jim Goodspeed
Can you tell me where in Apache I would configure the number of AJP
connections?  I'm using Apache 2.2.10 to load balance tomcat using
mod_proxy.

On Thu, Apr 2, 2009 at 11:27 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jim,
>
> On 4/2/2009 11:08 AM, Jim Goodspeed wrote:
> > Does the acceptCount setting that is part of the AJP connector in the
> > server.xml file still exist in Tomcat 5.x and Tomcat 6.x?
>
> It does not appear to be available at these levels.
>
> > I see a lot of references to it in Tomcat 4.x, but I have not run across
> it
> > in 5 or 6.  We have this setting defined in our tomcat 6 installation,
> but I
> > think it is a relic from some previous tomcat 4 configuration.
>
> I suspect it was removed because the web server is expected to configure
> the accept counts. You would want the number of AJP connections
> available on Tomcat to exactly match that of the web server. The web
> server is the component that would accept more requests than it has
> threads to actually process them.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAknU2VIACgkQ9CaO5/Lv0PClMQCgsVQ0qZliw7T2+7iyvzwwYhoD
> RloAoL/cg6V9Df4WQIpaXJsVKCTY4Brx
> =g9nu
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Rotating catalina.out in tomcat 6.x

2009-04-02 Thread Jim Goodspeed
Since I can't get my development team to NOT log to catalina.out I just
script it:

cp -a $logdir/catalina.out $logdir/catalina.out-`date +%Y-%m-%d`
> $logdir/catalina.out


On Tue, Mar 17, 2009 at 9:16 AM, Mark Thomas  wrote:

> André Warnier wrote:
> > Ghufran wrote:
> >> I am using tomcat 6.0.18 on RHEL 5. Please tell me how to rotate the
> >> catalina.out log file.
> >>
> > Some simple nice polite innocent question like that, yet so perfect for
> > triggering a huge ranting thread..;-)
>
> Or just ignoring it since the OP hijacked the thread.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


acceptCount in Tomcat 5.x and 6.x?

2009-04-02 Thread Jim Goodspeed
Does the acceptCount setting that is part of the AJP connector in the
server.xml file still exist in Tomcat 5.x and Tomcat 6.x?

I see a lot of references to it in Tomcat 4.x, but I have not run across it
in 5 or 6.  We have this setting defined in our tomcat 6 installation, but I
think it is a relic from some previous tomcat 4 configuration.



Thanks


proxy: AJP: failed to make connection to backend

2009-01-27 Thread Jim Goodspeed
I am seeing the following error in my HTTP Apache error_log.  I think this
is OK (I assume the timeout has expired and that it will create a new
connection when it is needed), but I wanted a second opinion.  We are having
a problem with some dropped connections and I think it is either network or
database related, but I want to eliminate the tomcat and apache setup to be
safe.

Thank you in advance for your help.


I have two web servers in front of two tomcat servers - 2.2.10 for the web
servers and 6.0.16 for the tomcat servers.


Error from apache error_log:
[Mon Jan 26 12:00:56 2009] [error] (70007)The timeout specified has expired:
proxy: AJP: attempt to connect to 10.222.4.30:55330 (
noandvtc02b.noandv.btbpo.net) failed
[Mon Jan 26 12:00:56 2009] [error] ap_proxy_connect_backend disabling worker
for (noandvtc02b.noandv.btbpo.net)
[Mon Jan 26 12:00:56 2009] [error] proxy: AJP: failed to make connection to
backend: noandvtc02b.noandv.btbpo.net


My configuration is the following on apache:

ProxyRequests Off
ProxyPreserveHost On


Order deny,allow
Allow from all



BalancerMember ajp://server1:8009 route=app-a loadfactor=5
BalancerMember ajp://server2:8009 route=app-b loadfactor=5



ProxyPass balancer://app/ stickysession=JSESSIONID



My AJP configuration on each tomcat server is below:






I have the following jvmRoutes defined on each tomcat server in the
server.xml file:





WARNING: Error sending end packet - ajp

2009-01-08 Thread Jim Goodspeed
Hi,

I am getting the following WARNING message in my catalina.out file.  I am
currently running Apache 2.2.10, Tomcat 6.0.16 and Sun's JDK 1.6.0_07.  I
can't tell if this is causing a problem or not.  Thanks in advance for the
help.


Jan 8, 2009 1:40:10 PM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)
at
org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)
at org.apache.jk.core.MsgContext.action(MsgContext.java:304)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.finish(Response.java:305)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)


My AJP configuration is the following in my server.xml file:



Apache is load balancing two tomcat servers with the following
configuration:

ProxyRequests Off
ProxyPreserveHost On


Order deny,allow
Allow from all


ProxyPass /lexmaint !


BalancerMember ajp://server1:8009 route=app1-a loadfactor=5
BalancerMember ajp://server2:8009 route=app1-b loadfactor=5



ProxyPass balancer://app1/ stickysession=JSESSIONID



Re: WARNING: processCallbacks status 2

2009-01-06 Thread Jim Goodspeed
Thanks for the quick response - I'm glad it's nothing to worry about.

On Mon, Jan 5, 2009 at 9:41 PM, Bill Barker  wrote:

>
> "Jim Goodspeed"  wrote in message
> news:84347690901051317o3824afa1t7de752b2026a1...@mail.gmail.com...
> >I am seeing the following Warning in my catalina.out log file - it is
> being
> > spit out every couple of seconds.  It's not causing a problem that I can
> > see, but I'm curious as to why it is happening.
> >
> > Jan 5, 2009 3:27:09 PM org.apache.jk.common.ChannelSocket
> > processConnection
> > WARNING: processCallbacks status 2
> >
> > I am using Tomcat 5.5.9, Apache 2.2.10, Java 1.5.0_14 running on RHEL 4.
> > I
> > know that my version of Tomcat is old - we have plans to upgrade to the
> > latest soon (java as well), but for now I am stuck with 5.5.9.
> >
>
> Yeah, this should probably be lowered to DEBUG level logging.  It usually
> happens when Apache drops the connection before Tomcat can send the "I'm
> ready for the next request" message.  As such, it is pretty harmless (other
> than disk space).  After this, Tomcat will just send the Thread back to
> it's
> pool to await another connection.
>
> > We have two tomcat servers load balanced (config below)
> >
> > ProxyRequests Off
> >ProxyPreserveHost On
> >
> >
> >Order deny,allow
> >Allow from all
> >
> >
> >ProxyPass /maint !
> >
> >
> >BalancerMember ajp://server1.domain.com:8009 route=app1-a
> > loadfactor=5
> >BalancerMember ajp://server1.domain.com:8009 route=app1-b
> > loadfactor=5
> >
> >
> >
> >ProxyPass balancer://app1/ stickysession=JSESSIONID
> >
> >
> >
> > My AJP config from the server.xml file is below:
> >
> >  >   enableLookups="false" redirectPort="8468" debug="0"
> >maxThreads="200" minSpareThreads="10" maxSpareThreads="25"
> >acceptCount="100" connectionTimeout="2"
> >   protocol="AJP/1.3" />
> >
> >
> >
> > As I said, I don't think this is causing a problem other than it is
> > filling
> > up my log files, but I'd like to get to the bottom of it.
> >
> >
> >
> >
> > Thank you.
> >
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


WARNING: processCallbacks status 2

2009-01-05 Thread Jim Goodspeed
I am seeing the following Warning in my catalina.out log file - it is being
spit out every couple of seconds.  It's not causing a problem that I can
see, but I'm curious as to why it is happening.

Jan 5, 2009 3:27:09 PM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2

I am using Tomcat 5.5.9, Apache 2.2.10, Java 1.5.0_14 running on RHEL 4.  I
know that my version of Tomcat is old - we have plans to upgrade to the
latest soon (java as well), but for now I am stuck with 5.5.9.

We have two tomcat servers load balanced (config below)

ProxyRequests Off
ProxyPreserveHost On


Order deny,allow
Allow from all


ProxyPass /maint !


BalancerMember ajp://server1.domain.com:8009 route=app1-a
loadfactor=5
BalancerMember ajp://server1.domain.com:8009 route=app1-b
loadfactor=5



ProxyPass balancer://app1/ stickysession=JSESSIONID



My AJP config from the server.xml file is below:





As I said, I don't think this is causing a problem other than it is filling
up my log files, but I'd like to get to the bottom of it.




Thank you.


Re: Root context setup

2007-03-07 Thread Jim Goodspeed

Thank you for the help - this works perfectly.  I do notice that the war
file gets expaned in the webapps directory in a sub-folder called ROOT.
Should I delete the contents of this directory everytime I deploy a new war
file?

On 2/16/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:


> From: Jim Goodspeed [mailto:[EMAIL PROTECTED]
> Subject: Re: Root context setup
>
> Is there another way to accomplish this though?

Don't put the .war file in Tomcat's directory structure.  Instead, put a
ROOT.xml file in conf/Catalina/[hostname] that contains a 
element with a docBase attribute that points to the location of the .war
file.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Specify location of server.xml as a start up argument

2007-03-06 Thread Jim Goodspeed

You could put a case statement in the catalina.sh file where you change the
CATALINA_BASE directory based on user input:

echo "Enter the application you want to start "
read app

case "$app" in
app1)
export CATALINA_BASE=/usr/local/app1base
;;
app2)
export CATALINA_BASE=/usr/local/app2base
;;
default)
export CATALINA_BASE=/usr/local/tomcat/latest
esac


On 3/6/07, Anto Paul <[EMAIL PROTECTED]> wrote:


Hi dev team,

Any comments on this ?. It will be nice to run a different application
by flipping server.xml.

-- Forwarded message --
From: Anto Paul <[EMAIL PROTECTED]>
Date: Feb 13, 2007 1:04 PM
Subject: Specify location of server.xml as a start up argument
To: users@tomcat.apache.org

Hi,
  I run Tomcat from inside Eclipse. I pass the start up parameters to boot
strap class. I want to specify server.xml as an argument so I could switch
between run configuration to run different applications rather than edit
server.xml context element or have 2 tomcat installations. Is it possible
?.
I know about using different catalina.base and I am looking for a simpler
config.


Regards,
Anto Paul



Re: Removing work directory

2007-03-05 Thread Jim Goodspeed

We are currently compiling the source right on the server, but we are in the
process of switching to war files.  I'm hoping that switching our build
process will resolve this issue.

On 3/5/07, David Delbecq <[EMAIL PROTECTED]> wrote:


A little strange indeed. How do you deploy? I think tomcat compare
timestamp of .java files to timestamps of .jsp files to know if it need
rebuild. Here we deploy using .war file, that mean or jsps are always
more recent then work directory, and we don't have issues :)

En l'instant précis du 04/03/07 02:10, Jim Goodspeed s'exprimait en ces
termes:
> I'm wondering if anyone has run into a problem where the jsp pages
> under the
> work directory do not get updated when a new version of the
> applicaiton is
> deployed.  We find that we have to delete everything under the work
> directory so that tomcat is forced to re-create everything.  This seems
a
> little odd and I would like to remove this step in our release process
if
> possible.
>
> I am using tomcat 5.5.20 on RHEL 4.0
>
>
> Thanks
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Removing work directory

2007-03-03 Thread Jim Goodspeed

I'm wondering if anyone has run into a problem where the jsp pages under the
work directory do not get updated when a new version of the applicaiton is
deployed.  We find that we have to delete everything under the work
directory so that tomcat is forced to re-create everything.  This seems a
little odd and I would like to remove this step in our release process if
possible.

I am using tomcat 5.5.20 on RHEL 4.0


Thanks


unpackWARs Pros and Cons

2007-03-03 Thread Jim Goodspeed

Are there any pros and cons running unpackWARs one way or another?  It seems
like keeping unpackWARs="false" might be a little cleaner (not having to
remove expanded directories when deploying a new war file), but I wasn't
sure if there were any performance hits associated with running this set to
false.


Running tomcat as an unprivileged user with a war file

2007-02-22 Thread Jim Goodspeed

I would like to run tomcat as an unprivileged user for security reasons, but
when my war file is created through Ant it loses all of the permissions (as
it says it will in the Ant manual).  Does anyone know of a way to run tomcat
as an unprivileged user and still use a war file which when it is created is
not accessible to the tomcat user?

I'm wondering if I need to create the war file as the tomcat user or maybe
change the default umask on my build machine - just wondering if anyone else
has run into this.


Thanks.


Re: Root context setup

2007-02-16 Thread Jim Goodspeed

Thanks Hassan.

Is there another way to accomplish this though?  I would really like to keep
the name of the war file to the name of the application.  We have several
different apps and it would be much easier from a organizational point of
view if we were able to customize the name of the war file based on
the application.



On 2/16/07, Hassan Schroeder <[EMAIL PROTECTED]> wrote:


On 2/16/07, Jim Goodspeed <[EMAIL PROTECTED]> wrote:

> I want myapp.war to be the default application

Name it ROOT.war, which Tomcat recognizes as the default context.

HTH,
--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Root context setup

2007-02-16 Thread Jim Goodspeed

Hi,

I am trying to figure out how to configure two applications - one to have
the default context (ie: be in the root of the url) and the other to be in
its own directory. I have the following setup:

webapps dir=/usr/local/product/webapps
catalina_base=/usr/local/product/base
catalina_home=/usr/local/tomcat

Inside webapps I have two war files - myapp.war and a 3rd party monitoring
app - probe.war

I want myapp.war to be the default application (ie: www.myapp.com) and the
3rd party app to be www.myapp.com/probe

Right now I have the following Host config in server.xml:


Inside $CATALINA_BASE/conf/Catalina/localhost/ I have two context files:
probe.xml and myapp.xml
The probe.xml deploys to the correct location, but myapp.xml deploys to
www.myapp.com/myapp

Contents of myapp.xml:






I have tried adding a docBase="myapp" to the Context, but that produces the
following error in the logs (and still deploys to the wrong location). A
docBase /usr/local/product/webapps/myapp inside the host appBase has been
specified, and will be ignored