Re: Log4j Issue

2016-08-10 Thread Syed Mudassir Ahmed
Mark,
  Thanks for the response.
  Indeed I am using Log4j-2.  Below is my xml file:



  

  
date:%d, millisecs:%r, level:%p, logger:%c, thread:[%t],
file:%F, method:%M, line:%L, message:%m%n%n
  
  

  
  

  
  

   


  

  


And in my web app, I have the following statement that will set the system
property to where the above file is located at:

System.setProperty("log4j.configurationFile", "file://" + rootPath +
"/log4j-2.xml");


Thanks,


On Wed, Aug 10, 2016 at 11:59 AM, Mark Eggers <its_toas...@yahoo.com.invalid
> wrote:

> Syed,
>
> On 8/9/2016 10:08 PM, Syed Mudassir Ahmed wrote:
> > I am using Log4j in my web app to write the logs to a separate file.
> > Surprisingly, that log file is not at all getting created.  I run
> > the logger logic as a standalone application and the log file indeed
> > gets created.  I am assuming tomcat is not allowing me to write my
> > logs to a file.  It is simply redirecting all the log messages to
> > catalina.out.  Any suggestions on how to direct my logs to a separate
> > file and not to catalina.out.
> >
> > Thanks,
> >
>
> Hmm,
>
> Works for me . . .
>
> 
>'PUBLIC:-//log4j/log4j Configuration//EN'
>   'http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-
>   files/log4j.dtd'>
> 
>   
> 
> 
>   
> 
>   
>   
> 
> 
>   
> 
>
> (sorry for the word wrap for the !DOCTYPE line).
>
> Since log4j 1.x was retired in April of 2015, maybe you should move to
> log4j2.
>
> Read the following:
>
> https://logging.apache.org/log4j/2.x/manual/webapp.html
>
> A (more or less) corresponding log4j2.xml file (different app):
>
> 
> 
> 
>  immediateFlush="true"
> fileName="${sys:catalina.base}/logs/logstwo.log"
> filePattern=
>  "${sys:catalina.base}/logs/logstwo-%d{-MM-dd}.log.gz">
> 
> %d %-5p %c.%M:%L - %m%n
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Note, the log4j2.xml does log rotation, as well as compression of the
> rotated log files. It also logs at a package level one higher than the
> log4j.xml configuration.
>
> The XML file (log4j.xml or log4j2.xml) goes into WEB-INF/classes, or in
> a JAR file in WEB-INF/lib.
>
> The appropriate log4j jar files (different between log4j and log4j2) go
> in WEB-INF/lib.
>
> Quite frankly, your question is very broad and without writing a
> tutorial it's difficult to answer.
>
> I suggest reading the following as well:
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
> . . . just my two cents
> /mde/
>
>


Log4j Issue

2016-08-09 Thread Syed Mudassir Ahmed
I am using Log4j in my web app to write the logs to a separate file.
Surprisingly, that log file is not at all getting created.  I run the
logger logic as a standalone application and the log file indeed gets
created.  I am assuming tomcat is not allowing me to write my logs to a
file.  It is simply redirecting all the log messages to catalina.out.  Any
suggestions on how to direct my logs to a separate file and not to
catalina.out.

Thanks,


Internal Error 500

2016-08-04 Thread Syed Mudassir Ahmed
What are the various reasons for the tomcat server to throw internal server
error 500?

Thanks,


Re: Issue with Tomcat7

2016-08-01 Thread Syed Mudassir Ahmed
ok, thanks.

Thanks,


On Mon, Aug 1, 2016 at 2:16 PM, Mark Thomas <m...@homeinbox.net> wrote:

> On 1 August 2016 09:26:22 BST, Syed Mudassir Ahmed <
> syed.mudas...@gaianconsultants.com> wrote:
> >I indeed wanted the help from Tomcat community users.  I didn't want to
> >type a long message here to explain the problem.  The way someone is
> >reading an email can also view the screen and give instant and better
> >help
> >(out of their willingness).
> >I am in indian time zone.  How about thursday?
>
> That isn't the way this community works.
>
> If you want free help you have to do the work to explain your problem
> consisly to the list.
>
> Mark
> >
> >Thanks,
> >
> >
> >On Mon, Aug 1, 2016 at 1:45 PM, Olaf Kock <tom...@olafkock.de> wrote:
> >
> >>
> >>
> >> Am 01.08.2016 um 09:25 schrieb Syed Mudassir Ahmed:
> >> > Thanks for the quick response.  Can we setup a meeting this Friday
> >as
> >> > per your convenience on google hangout?  I would like to share the
> >> > screen and show the errors I am facing.  This would be a great
> >help.
> >> >
> >> I thought you were looking for mailing list help with your tomcat
> >> debugging, not with personalized 1:1 consulting. Mailing list is free
> >> (and voluntary), while personalized consulting requires signing of
> >> contract, payment etc.
> >>
> >> You might want to look into one of the Enterprise-supported tomcat
> >> versions. Many of the tomcat committers (or their companies) and some
> >> others will offer support- and consulting-services. But in that case
> >you
> >> should explicitly ask for consultants, not state a random problem on
> >the
> >> mailing list.
> >>
> >> Also, Friday is quite inconvenient (for me) - and that's in any
> >timezone
> >> (read: I don't even know your timezone)
> >>
> >> Olaf
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
>
>
>


Re: Issue with Tomcat7

2016-08-01 Thread Syed Mudassir Ahmed
I indeed wanted the help from Tomcat community users.  I didn't want to
type a long message here to explain the problem.  The way someone is
reading an email can also view the screen and give instant and better help
(out of their willingness).
I am in indian time zone.  How about thursday?

Thanks,


On Mon, Aug 1, 2016 at 1:45 PM, Olaf Kock <tom...@olafkock.de> wrote:

>
>
> Am 01.08.2016 um 09:25 schrieb Syed Mudassir Ahmed:
> > Thanks for the quick response.  Can we setup a meeting this Friday as
> > per your convenience on google hangout?  I would like to share the
> > screen and show the errors I am facing.  This would be a great help.
> >
> I thought you were looking for mailing list help with your tomcat
> debugging, not with personalized 1:1 consulting. Mailing list is free
> (and voluntary), while personalized consulting requires signing of
> contract, payment etc.
>
> You might want to look into one of the Enterprise-supported tomcat
> versions. Many of the tomcat committers (or their companies) and some
> others will offer support- and consulting-services. But in that case you
> should explicitly ask for consultants, not state a random problem on the
> mailing list.
>
> Also, Friday is quite inconvenient (for me) - and that's in any timezone
> (read: I don't even know your timezone)
>
> Olaf
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Issue with Tomcat7

2016-08-01 Thread Syed Mudassir Ahmed
Thanks for the quick response.  Can we setup a meeting this Friday as per
your convenience on google hangout?  I would like to share the screen and
show the errors I am facing.  This would be a great help.

Thanks,


On Mon, Aug 1, 2016 at 12:35 PM, Olaf Kock <tom...@olafkock.de> wrote:

>
> Am 01.08.2016 um 08:20 schrieb Syed Mudassir Ahmed:
> >   Can someone help us what wrong we are doing?
> Not without more information - from the information you give us, we
> don't even know if your WebApp1 or WebApp2 was causing the "connection
> refused" reply.
>
> Please give:
> * Exact versions of software involved (tomcat, java, ...)
> * Typical excerpt from log (no need to post the full log or full
> stacktraces)
> * Configuration of the webapps 1 and 2
> * How does webapp1 connect to webapp2?
> * Do you have any reverse proxies / Apache httpd / nginx installed in
> addition to tomcat?
> * probably more - but you should know your setup better and be able to
> judge what makes up relevant information about it.
>
> Olaf
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Issue with Tomcat7

2016-08-01 Thread Syed Mudassir Ahmed
Hi,
  I have two web applications deployed into tomcat 7.  Lets call them
WebApp1 and WebApp2.  I am invoking WebApp1 using a rest call thru JMeter.
WebApp1 internally calls WebApp2 for a service.

  We tried making 1000 calls from JMeter.  Unfortunately, for all the
requests we are getting 500 internal service error.  When we checked the
catalina file, we found connection refused exception.

  Can someone help us what wrong we are doing?

Thanks,