Re: Apache httpd / mod_proxy_ajp logging

2015-12-04 Thread Aurélien Terrestris
"Would anyone here know what is available in that respect with
mod_proxy_ajp ?"

You could try this :

LogLevel proxy:trace8

2015-12-03 22:41 GMT+01:00 André Warnier (tomcat) :

> Hi.
>
> Although the above module is a httpd-level, this might still be the right
> place to ask :
>
> I am usually using mod_jk as an Apache httpd / Tomcat connector.
> With mod_jk, there is a separate JkLogLevel directive to set the log
> level, and also a separate logfile.
>
> Would anyone here know what is available in that respect with
> mod_proxy_ajp ?
> Can I trace at the httpd level what is actually being proxied to Tomcat ?
>
> Thanks.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat unresponsive

2015-12-04 Thread Yogesh Patel
Hi,

 We have a Apache and tomcat :

Form tomcat log i can say that request has been received from client side
but some how response could not deliver to Apache.

And in apache log we found following log:

"AH00992: ajp_read_header: ajp_ilink_receive failed"

What makes tomcat unresponsive to apache. in tomcat log there is no logs
for max thread busy.

-- 
*Thanks & Regards,*

* Yogesh Patel*


Re: Zero downtime deployments

2015-12-04 Thread Kevin Hale Boyes
This is exactly what I'm after.  Thanks to both of you.

On 3 December 2015 at 12:54, Tauzell, Dave 
wrote:

> If you cannot use a tool like flyway you can do it by hand, too.  The key
> is that all database changes need to be backwards compatible.  For example:
>
> So, if you want to drop a column:
> 1. Deploy new version of app that doesn't require column X
> 2. Shutdown version which does
> 3. drop column X
>
> If you want to rename a column:
> 1. Deploy new version of app that writes data to old column name + new name
> 2. shutdown old version
> 3. drop old column
>
> We generally test out our old version of an app running against the new
> database schema to make sure this process will work.
>
> -Dave
>
> -Original Message-
> From: jieryn [mailto:jie...@gmail.com]
> Sent: Thursday, December 03, 2015 1:32 PM
> To: Tomcat Users List
> Subject: Re: Zero downtime deployments
>
> Use http://flywaydb.org/ to perform database migrations. You will need at
> least 3 versions in order to perform an incompatible database change. v1 is
> existing behavior, v2 is a shim that bridges v1 and v3, and then v3 cleans
> up the shim and removes all the unnecessary hacks.
> When you have v1 rolled out against N images, then you can start rolling
> out compat shim v2 which adds some temporary work for the db and coexists,
> then when all instances are at v2 you can move to v3 which uses all the new
> stuff.
>
> I haven't found anything better or more efficient than the 2-step
> deployment with live code.
>
> On Thu, Dec 3, 2015 at 2:21 PM, Kevin Hale Boyes 
> wrote:
> > Thanks for this link to the presentation.
> > How do you all deal with some of the other dependencies that the web
> > application has?
> >
> > For example, if v2 of my application needs new database columns or
> > worse, a change to an existing column how can I have v1 and v2 running
> > at the same time?  We use Oracle as our database though the problem
> > exists for many database servers.
> >
> > Thanks,
> > Kevin.
> >
> > On 3 December 2015 at 01:31, Neill Lima 
> wrote:
> >
> >> Hello Jason,
> >>
> >> This approach of using httpd in front of 2+ Tomcats via AJP works
> >> well in my company. There is a bit of config necessary at httpd level
> >> so httpd is aware of all the Tomcats and also Tomcat config needs to
> >> be set to listen to AJP port instead of default port but it is not
> rocket science.
> >>
> >> This facilitates the deployment of nodes sequentially with no
> >> downtime. Of course, there is a shared session server to take care
> >> the sessions are not lost when Tomcats flip up and down.
> >>
> >> Reply in pvt if you need help setting up this.
> >>
> >> Thanks,
> >>
> >> Neill
> >>
> >> On Thu, Dec 3, 2015 at 12:08 AM, Jason Britton 
> >> wrote:
> >>
> >> > Thank you Christopher, reading now and we'll see if I can swing the
> >> > conference :)
> >> >
> >> > On Wed, Dec 2, 2015 at 4:00 PM, Christopher Schultz <
> >> > ch...@christopherschultz.net> wrote:
> >> >
> >> > > Jason,
> >> > >
> >> > > On 12/2/15 4:07 PM, Jason Britton wrote:
> >> > > > I was looking for information for how those on the list achieve
> >> > > > zero downtime deployments of their tomcat hosted web
> >> > > > applications.  I
> >> > imagine
> >> > > > this can be achieved in a variety of ways, but would love to
> >> > > > hear
> >> what
> >> > > > works for you.  In our current environment we front multiple
> >> > > > tomcat instances with apache httpd, each tomcat instance
> >> > > > hosting one or more unique web apps.  In order to support this
> >> > > > effort we do have the
> >> > > resources
> >> > > > where we could spin up multiple tomcat instances to serve
> >> > > > requests
> >> for
> >> > a
> >> > > > single application.  I know there is mod_proxy_balancer
> >> > > > available for httpd, and I understand starting with tomcat 7
> >> > > > there is support for parallel deployment of versioned wars, and
> >> > > > tomcat also supports clustering.  I'm just unsure of what
> >> > > > approach I should start digging
> >> > into
> >> > > > and would very much appreciate any of your experiences.  The
> >> > > > servers
> >> > > we'll
> >> > > > be rolling out will be using the latest versions of tomcat 8
> >> > > > and
> >> apache
> >> > > > httpd 2.4.  Thanks for any insights!
> >> > >
> >> > > Check this out:
> >> > >
> >> > >
> >> >
> >> http://people.apache.org/~schultz/ApacheCon%20NA%202015/Load-balancin
> >> g%20Tomcat%20with%20mod_jk.pdf
> >> > >
> >> > > Start on slide/page 41.
> >> > >
> >> > > Then come to ApacheCon NA 2016 and discuss it!
> >> > >
> >> > > -chris
> >> > >
> >> > > -
> >> > >  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> >> > >
> >> > >
> >> >
> >>
>
> 

Re: Understanding how to controlling what data is written to log4j appenders

2015-12-04 Thread Joleen Barker
Hello Chris,

As of now I am not using JULI any longer. I am using the log4j v1.2.17.jar

Eventually I will jump in to the log4j v2 users and try my hand at that.

Thank you for the clarification on where to go for information. I
completely missed seeing the log4j mailing list. Could you send me the url
to signup for it.

Have a wonderful weekend.

-Joleen



On Fri, Dec 4, 2015 at 1:11 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Joleen,
>
> On 12/3/15 11:55 PM, Joleen Barker wrote:
> > The information you gave me for the additivity was PERFECT! It did
> exactly
> > what I was looking for. This also really allowed me to understand what
> > processes were writing to which log. I have the settings in place in my
> > test environment now and if all goes well the changes will be added in
> the
> > production environment soon.
>
> Glad you are making progress.
>
> There are many folks here who have experience with log4j (myself and,
> evidently, Konstantin as well), but for more thorough log4j help, you're
> probably going to wait to go over to the log4j mailing list.
>
> If JULI is in the mix (the default logging framework for Tomcat) and you
> are using logging.properties, then you want to stay /here/ for those
> questions. Similarly, for configuration involving Tomcat's
> container-defined loggers ("categories" in older log4j-speak), here is
> also the best place to post.
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat unresponsive

2015-12-04 Thread Aurélien Terrestris
"Form tomcat log i can say that request has been received from client side"

What is saying the Tomcat access log ? Are there lines with response size =
0 ?


2015-12-04 19:13 GMT+01:00 Christopher Schultz :

> Yogesh,
>
> On 12/4/15 9:26 AM, Yogesh Patel wrote:
> > Hi,
> >
> >  We have a Apache and tomcat :
> >
> > Form tomcat log i can say that request has been received from client side
> > but some how response could not deliver to Apache.
> >
> > And in apache log we found following log:
> >
> > "AH00992: ajp_read_header: ajp_ilink_receive failed"
> >
> > What makes tomcat unresponsive to apache. in tomcat log there is no logs
> > for max thread busy.
>
> Can you turn-up the log level on mod_jk? (or are you using mod_proxy_ajp?)
>
> Sanity check: make sure that your max_packet_size (in httpd/mod_jk)
> matches the related setting in your  in Tomcat.
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Apache httpd / mod_proxy_ajp logging

2015-12-04 Thread Aurélien Terrestris
That is right, Chris.

On 2.2, maybe LogLevel debug would give information about proxy traffic but
I did not try. 2.2 is legacy anyway, and less efficient from I what see on
my hosting platform.



2015-12-04 19:21 GMT+01:00 Christopher Schultz :

> Aurélien,
>
> On 12/4/15 10:36 AM, Aurélien Terrestris wrote:
> > "Would anyone here know what is available in that respect with
> > mod_proxy_ajp ?"
> >
> > You could try this :
> >
> > LogLevel proxy:trace8
>
> That only works for httpd 2.4+, right?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Understanding how to controlling what data is written to log4j appenders

2015-12-04 Thread Christopher Schultz
Joleen,

On 12/3/15 11:55 PM, Joleen Barker wrote:
> The information you gave me for the additivity was PERFECT! It did exactly
> what I was looking for. This also really allowed me to understand what
> processes were writing to which log. I have the settings in place in my
> test environment now and if all goes well the changes will be added in the
> production environment soon.

Glad you are making progress.

There are many folks here who have experience with log4j (myself and,
evidently, Konstantin as well), but for more thorough log4j help, you're
probably going to wait to go over to the log4j mailing list.

If JULI is in the mix (the default logging framework for Tomcat) and you
are using logging.properties, then you want to stay /here/ for those
questions. Similarly, for configuration involving Tomcat's
container-defined loggers ("categories" in older log4j-speak), here is
also the best place to post.

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat unresponsive

2015-12-04 Thread Christopher Schultz
Yogesh,

On 12/4/15 9:26 AM, Yogesh Patel wrote:
> Hi,
> 
>  We have a Apache and tomcat :
> 
> Form tomcat log i can say that request has been received from client side
> but some how response could not deliver to Apache.
> 
> And in apache log we found following log:
> 
> "AH00992: ajp_read_header: ajp_ilink_receive failed"
> 
> What makes tomcat unresponsive to apache. in tomcat log there is no logs
> for max thread busy.

Can you turn-up the log level on mod_jk? (or are you using mod_proxy_ajp?)

Sanity check: make sure that your max_packet_size (in httpd/mod_jk)
matches the related setting in your  in Tomcat.

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Zero downtime deployments

2015-12-04 Thread Christopher Schultz
Kevin,

On 12/3/15 2:21 PM, Kevin Hale Boyes wrote:
> Thanks for this link to the presentation.
> How do you all deal with some of the other dependencies that the web
> application has?
> 
> For example, if v2 of my application needs new database columns or worse, a
> change to an existing column how can I have v1 and v2 running at the same
> time?  We use Oracle as our database though the problem exists for many
> database servers.

That's not a deployment problem. That's a design problem.

In short, you need to make sure that your web application is both
forward-compatible and backward-compatible at the same time.

That's rubbish, or course. Here's a more concrete suggestion, and it
requires a LOT of work, but it's worth it.

First of all, you can't think of a release as a single event any more.
Instead, there are 4 events.

First, there is the pre-release release. That's where you release a
small upgrade to your previous version that is forward-compatible with
the release you really want to perform. For instance, you make sure that
none of your database queries will bomb if you have additional fields in
your database tables. You also have to make sure that the release won't
bomb if the /new/ structure is *not* in place. That may require you to
do a few temporary hacks.

Second, you perform your database upgrade. No code release is involved,
here. Remember that if you want zero-downtime, you have to be careful
about modifying tables that contain data. Most databases can handle
online ALTER statements, but they can take a long time if you have a
lot of data. During that lng time, your users may be blocked
(waiting!) for access to the data in those tables. If you can't afford
for that to happen, you'll have to make other arrangements.

Third, you release your new version.

Fourth, you clean-up any hacks you may have left in from the Second
Step. This may require another small release, and it may also require
another small database modification (for instance, removing a now-unused
field from a table). If you are doing a small-enough release in the
Third Step, then this may not even be necessary at all.

Hope that helps,
-chris

> On 3 December 2015 at 01:31, Neill Lima  wrote:
> 
>> Hello Jason,
>>
>> This approach of using httpd in front of 2+ Tomcats via AJP works well in
>> my company. There is a bit of config necessary at httpd level so httpd is
>> aware of all the Tomcats and also Tomcat config needs to be set to listen
>> to AJP port instead of default port but it is not rocket science.
>>
>> This facilitates the deployment of nodes sequentially with no downtime. Of
>> course, there is a shared session server to take care the sessions are not
>> lost when Tomcats flip up and down.
>>
>> Reply in pvt if you need help setting up this.
>>
>> Thanks,
>>
>> Neill
>>
>> On Thu, Dec 3, 2015 at 12:08 AM, Jason Britton 
>> wrote:
>>
>>> Thank you Christopher, reading now and we'll see if I can swing the
>>> conference :)
>>>
>>> On Wed, Dec 2, 2015 at 4:00 PM, Christopher Schultz <
>>> ch...@christopherschultz.net> wrote:
>>>
 Jason,

 On 12/2/15 4:07 PM, Jason Britton wrote:
> I was looking for information for how those on the list achieve zero
> downtime deployments of their tomcat hosted web applications.  I
>>> imagine
> this can be achieved in a variety of ways, but would love to hear
>> what
> works for you.  In our current environment we front multiple tomcat
> instances with apache httpd, each tomcat instance hosting one or more
> unique web apps.  In order to support this effort we do have the
 resources
> where we could spin up multiple tomcat instances to serve requests
>> for
>>> a
> single application.  I know there is mod_proxy_balancer available for
> httpd, and I understand starting with tomcat 7 there is support for
> parallel deployment of versioned wars, and tomcat also supports
> clustering.  I'm just unsure of what approach I should start digging
>>> into
> and would very much appreciate any of your experiences.  The servers
 we'll
> be rolling out will be using the latest versions of tomcat 8 and
>> apache
> httpd 2.4.  Thanks for any insights!

 Check this out:


>>>
>> http://people.apache.org/~schultz/ApacheCon%20NA%202015/Load-balancing%20Tomcat%20with%20mod_jk.pdf

 Start on slide/page 41.

 Then come to ApacheCon NA 2016 and discuss it!

 -chris

 -
 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: Apache httpd / mod_proxy_ajp logging

2015-12-04 Thread Christopher Schultz
Aurélien,

On 12/4/15 10:36 AM, Aurélien Terrestris wrote:
> "Would anyone here know what is available in that respect with
> mod_proxy_ajp ?"
> 
> You could try this :
> 
> LogLevel proxy:trace8

That only works for httpd 2.4+, right?

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat FIPS with FIPS capable OpenSSL

2015-12-04 Thread Christopher Schultz
Nitish,

On 12/3/15 2:36 PM, Nithesh Kb wrote:
> Wow Amazing worked!!!

Glad to hear it worked. What did you have to do?

You never said, but do you happen to be on Windows?

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org