Re: recommend a host please.
http://www.eapps.com http://www.eapps.com is a good choice if you are searching for Tomcat 6. In what regards your DNS these have to be changed usually at the current registrar if you want to point them to your future hosting provider. yuccanel wrote: Please can someone also explain process of ensuring that my dns name comes with me to new host? -- From: Ken Bowen kbo...@als.com Sent: Wednesday, June 16, 2010 6:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: recommend a host please. Previously suggested eApps.com to you. On Jun 16, 2010, at 12:01 PM, yucca...@live.co.za wrote: I would like some feedback on a hosting provider for me. I have had little choice but to cancel at dailyrazor as they failed to provide me with what I was paying for. To my horror, I asked for new tomcat and was given a tomcat 5 again as was evident again by the presence of no lib in root and presence of common/lib and shared/lib. They also have not provided shell access. New host should therefore have (in order of importance) out the box tomcat 6 with expected tomcat 6 layout, shell access and ok price. - 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 =)=) -- View this message in context: http://old.nabble.com/recommend-a-host-please.-tp28904567p28922580.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
Re: Help with Log Level in Tomcat 6 Logging
Konstantin, Thanks very much for your time. Your explanation makes things clearer. cheers Jon On 17 June 2010 14:37, Konstantin Kolinko knst.koli...@gmail.com wrote: 2010/6/17 Jonathan Jackson jonathan.x.jack...@gmail.com: The problem I have is that in my daily rolling catalina-[data].out I only get SEVERE level messages. Given the above configuration, my understanding from reading this ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html) is that FINE for the FileHandler would log everything above ie. FINE,CONFIG,INFO,WARNINGBut Im only getting SEVERE written to my daily rolling logfile. The Tomcat JULI logging is an implementation of java.util.logging (aka JUL), which documentation is here, http://java.sun.com/javase/6/docs/api/java/util/logging/package-summary.html#package_description http://java.sun.com/javase/6/docs/api/java/util/logging/Level.html http://java.sun.com/javase/6/docs/technotes/guides/logging/index.html etc. To make a brief summary, there are two levels where log messages are filtered: a) at the category (aka logger) level If level of a category (if not specified then its parent level is taken) does not match the message, it will be rejected by the logging system and will not be processed at all. That is what these lines are for: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level org.apache.catalina.core.AprLifecycleListener.level The categories form a hierarchy, and the default level is specified by .level= INFO Note, that the org.apache.catalina.core.ContainerBase.[Catalina].[localhost] category is for the messages logged through Servlet.log() API calls, which I think is rare. Usually applications use commons-logging calls and their category names are different. Thus the defaults (.level=INFO) apply to them. There is no .level= INFO in Tomcat's logging.properties because the defaults are provided by JRE through its logging.properties. But you can always add such a line by yourself, e.g. .level= FINEST will cause a lot of messages being processed b) when writing the message out (aka handler) level If handler level does not match the message, it will be skipped (but may be printed by other handlers). categoryname.handler setting attaches handlers to a category. I think you missed a). By the way, .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler I hope that those lines were wrapped by the mailing software. You cannot wrap lines in a properties file like that (though you can if you end previous line with '\'). see java.util.Properties JavaDoc. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Jailrootting
Hallo, I'm using Java(TM) SE Runtime Environment 1.6.0_20-b02 Java HotSpot(TM) 64-Bit Server VM) Apache Tomcat/6.0.26 (vanilla) is there a way to chroot each webapp in its actual context? Using a code like this: Process p = Runtime.getRuntime().exec(cat /etc/passwd); OutputStream os = p.getOutputStream(); InputStream in = p.getInputStream(); DataInputStream dis = new DataInputStream(in); String disr = dis.readLine(); while ( disr != null ) { out.println(disr); disr = dis.readLine(); } } i can read my /etc/passwd from a malicious jsp. Where can i find infos on limiting filesystem access / visibility ? Is there a way to obscure all the unnecessary details from each webapp? (maybe, choosing the permission on Context bases...). Thanks. Luca Gervasi - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DefaultServlet and default character encoding
On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko knst.koli...@gmail.com wrote: 2010/6/17 Felix Schumacher felix.schumac...@internetallee.de: For the moment I have written a filter, which sets a default encoding, as soon as Response.setContentType(String type) is called and type.startsWith(text/). That works for the moment, but I would prefer the solution described in above thread. I know that setting charset in a mime-mapping works, e.g.: mime-mapping extensionhtm/extension mime-typetext/html;charset=iso-8859-1/mime-type /mime-mapping mime-mapping extensionhtml/extension mime-typetext/html;charset=iso-8859-1/mime-type /mime-mapping Note, that it would be better if the mime type set by a HTTP header and the one provided by HTML tag match strictly (case sensitively). Otherwise some browsers will start guessing. IIRC, the HTML spec says that the HTTP header takes precedence, but not all browsers follow it strictly. I will look into this one. Also there is AddDefaultCharsetFilter in Tomcat 7. It is similar to what you are doing, see its JavaDoc and source code. Yes, my filter looked like a twin, with the exception, that I called super.setCharacterEncoding(defaultEncoding) instead of manipulating the content-type directly (and of course that defaultEncoding is different to super.getCharacterEncoding() which would yield iso-8859-1). I could extend that filter to my needs. Should I file a enhancement request for that? apache httpd thinks it would be better to append a charset to the response I wonder, if there is a way to improve your Apache HTTPD configuration. I tried to let apache httpd now that in location /webapp the default charset was different from iso-8859-1. But mod_jk ignored my pledges :( Even so I think DefaultServlet should be able to set a charset if configured to. Bye Felix Best regards, Konstantin Kolinko - 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: Jailrootting
Luca Gervasi wrote: i can read my /etc/passwd from a malicious jsp. Where can i find infos on limiting filesystem access / visibility ? Google for SecurityManager. Check conf/catalina.policy file within tomcat installation. If you are really concerned about security and you have to run untrustred java code than you should run every webapp in chroot/jail within it's own JVM. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DefaultServlet and default character encoding
On 18.06.2010 11:04, Felix Schumacher wrote: On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko knst.koli...@gmail.com wrote: 2010/6/17 Felix Schumacherfelix.schumac...@internetallee.de: For the moment I have written a filter, which sets a default encoding, as soon as Response.setContentType(String type) is called and type.startsWith(text/). That works for the moment, but I would prefer the solution described in above thread. I know that setting charset in a mime-mapping works, e.g.: mime-mapping extensionhtm/extension mime-typetext/html;charset=iso-8859-1/mime-type /mime-mapping mime-mapping extensionhtml/extension mime-typetext/html;charset=iso-8859-1/mime-type /mime-mapping Note, that it would be better if the mime type set by a HTTP header and the one provided by HTML tag match strictly (case sensitively). Otherwise some browsers will start guessing. IIRC, the HTML spec says that the HTTP header takes precedence, but not all browsers follow it strictly. I will look into this one. Also there is AddDefaultCharsetFilter in Tomcat 7. It is similar to what you are doing, see its JavaDoc and source code. Yes, my filter looked like a twin, with the exception, that I called super.setCharacterEncoding(defaultEncoding) instead of manipulating the content-type directly (and of course that defaultEncoding is different to super.getCharacterEncoding() which would yield iso-8859-1). I could extend that filter to my needs. Should I file a enhancement request for that? apache httpd thinks it would be better to append a charset to the response I wonder, if there is a way to improve your Apache HTTPD configuration. I tried to let apache httpd now that in location /webapp the default charset was different from iso-8859-1. But mod_jk ignored my pledges :( Even so I think DefaultServlet should be able to set a charset if configured to. How did you do that in Apache? Did you use http://httpd.apache.org/docs/2.2/mod/core.html#adddefaultcharset and if so, how exactly? You can switch JkLogLevel on a system with low load to debug, then mod_jk will log all response headers it received from Tomcat. mod_jk itself takes the Content-Type header received from tomcat, extracts its full value and applies it to the Apache response via ap_set_content_type(). Apache later applies any configured default charset via ap_http_header_filter() in ap_http_header_filter(). At least that's what I expect to happen. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: disabling copy of context.xml to conf/Catalina/localhost
On 17/06/2010 17:35, Rajeev Verma wrote: Thanks for the response pid. I am using Tomcat 6.0.26 with java 1.6 on Windows XP. I have two applications (application AU and AC) under same webapps. AC does not have a context.xml though AU has. There is a dependency between AU and AC and AC need to be started first at start up. That's a problem. Tomcat makes no promises about the order of application startup, and it's single threaded so you've got to wait for each app to complete it's init. When I deployed both the applications first time it worked fine. AC started first and then AU. Also context.xml of AU was copied to conf/Catalina/localhost. Now when I shutdown tomcat and start it again tomcat tries to start AU first and it fails, becuase it need AC to be up. You might be able to fiddle with timestamps to trick the natural ordering of the files as they're read off the file system. There are two options I have: 1) Disable copy of context.xml to conf/Catalina/localhost 2) Add a blank context.xml for AC If 2 works, it seems like the easiest solution. One more thing, this was working fine on Tomcat 6.0.18. You can search the changelog for fixes that might have made a difference. Does it still work if you revert to 6.0.18, without changing the app config? p Thanks for your help. Raj On Wed, Jun 16, 2010 at 4:49 PM, Rajeev Verma r.v.raj...@gmail.com wrote: Hi, I am facing a problem which can be solved if I can disable copy of context.xml to conf/Catalina/localhost. Is there some setting to do so? Thanks for the help. Regards, Raj signature.asc Description: OpenPGP digital signature
how can i configure Tomcat's log4j to log in a separate file for each webapp?
This question is all over the internet, without a satisfactory answer. We have a Tomcat deployment in which we install many web apps. We call this thing a services host. It has a log4j configuration that forwards logs into a file. I'd like to change the file pattern to include the name of the webapp, so that we can get one file per web application. * Is anyone doing that? * Is there a way without writing a custom appender? * If I write a custom appender, how can I fetch the name of the webapp? Thx dB. dB. @ dblock.orghttp://www.dblock.org/ Moscow|Geneva|Seattle|New York
Re: DefaultServlet and default character encoding
On Fri, 18 Jun 2010 12:50:31 +0200, Rainer Jung rainer.j...@kippdata.de wrote: On 18.06.2010 11:04, Felix Schumacher wrote: On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko knst.koli...@gmail.com wrote: 2010/6/17 Felix Schumacherfelix.schumac...@internetallee.de: For the moment I have written a filter, which sets a default encoding, as soon as Response.setContentType(String type) is called and type.startsWith(text/). That works for the moment, but I would prefer the solution described in above thread. I know that setting charset in a mime-mapping works, e.g.: mime-mapping extensionhtm/extension mime-typetext/html;charset=iso-8859-1/mime-type /mime-mapping mime-mapping extensionhtml/extension mime-typetext/html;charset=iso-8859-1/mime-type /mime-mapping Note, that it would be better if the mime type set by a HTTP header and the one provided by HTML tag match strictly (case sensitively). Otherwise some browsers will start guessing. IIRC, the HTML spec says that the HTTP header takes precedence, but not all browsers follow it strictly. I will look into this one. Also there is AddDefaultCharsetFilter in Tomcat 7. It is similar to what you are doing, see its JavaDoc and source code. Yes, my filter looked like a twin, with the exception, that I called super.setCharacterEncoding(defaultEncoding) instead of manipulating the content-type directly (and of course that defaultEncoding is different to super.getCharacterEncoding() which would yield iso-8859-1). I could extend that filter to my needs. Should I file a enhancement request for that? apache httpd thinks it would be better to append a charset to the response I wonder, if there is a way to improve your Apache HTTPD configuration. I tried to let apache httpd now that in location /webapp the default charset was different from iso-8859-1. But mod_jk ignored my pledges :( Even so I think DefaultServlet should be able to set a charset if configured to. How did you do that in Apache? Did you use http://httpd.apache.org/docs/2.2/mod/core.html#adddefaultcharset and if so, how exactly? I placed the following into the config for the corresponding virtual host: Location /webapp AddDefaultCharset utf-8 /Location Yesterday after restart of httpd I found no difference in behaviour... Now the directive does work as expected. So mod_jk/httpd can be configured to work around the issue. Maybe I saw an old page from some sort of cache/proxy :( Grüße Felix You can switch JkLogLevel on a system with low load to debug, then mod_jk will log all response headers it received from Tomcat. mod_jk itself takes the Content-Type header received from tomcat, extracts its full value and applies it to the Apache response via ap_set_content_type(). Apache later applies any configured default charset via ap_http_header_filter() in ap_http_header_filter(). At least that's what I expect to happen. Regards, Rainer - 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: DefaultServlet and default character encoding
On 18.06.2010 13:50, Felix Schumacher wrote: On Fri, 18 Jun 2010 12:50:31 +0200, Rainer Jungrainer.j...@kippdata.de wrote: On 18.06.2010 11:04, Felix Schumacher wrote: On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko knst.koli...@gmail.com wrote: 2010/6/17 Felix Schumacherfelix.schumac...@internetallee.de: apache httpd thinks it would be better to append a charset to the response I wonder, if there is a way to improve your Apache HTTPD configuration. I tried to let apache httpd now that in location /webapp the default charset was different from iso-8859-1. But mod_jk ignored my pledges :( Even so I think DefaultServlet should be able to set a charset if configured to. How did you do that in Apache? Did you use http://httpd.apache.org/docs/2.2/mod/core.html#adddefaultcharset and if so, how exactly? I placed the following into the config for the corresponding virtual host: Location /webapp AddDefaultCharset utf-8 /Location Yesterday after restart of httpd I found no difference in behaviour... Now the directive does work as expected. So mod_jk/httpd can be configured to work around the issue. Maybe I saw an old page from some sort of cache/proxy :( Good to know. Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how can i configure Tomcat's log4j to log in a separate file for each webapp?
2010/6/18 dB. dbl...@dblock.org: This question is all over the internet, without a satisfactory answer. We have a Tomcat deployment in which we install many web apps. We call this thing a services host. It has a log4j configuration that forwards logs into a file. I'd like to change the file pattern to include the name of the webapp, so that we can get one file per web application. * Is anyone doing that? I do this all the time. For applications using commons-logging, I place commons-logging.jar and log4j.jar in the webapp's WEB-INF/lib directory and log4j.properties in WEB-INF/classes. The same works if slf4j-api and slf4j-log4j12 is used instead of or in addition to commons-logging. I never add jar files used by individual webapps to tomcat's lib or any other directory shared by several webapps. kind regards - Erik - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how can i configure Tomcat's log4j to log in a separate file for each webapp?
That's exactly what I am trying to avoid :) I have a lot of web apps and developers that stand on their head for logging. My customers end up finding logs all over the place and enforcing it by convention is getting harder and harder. I'd like to configure logging for them rather than leave logging to their discretion. So I want the centralized log4j configuration that can insert the web app name into the file name that belongs to the tomcat installation. dB. @ dblock.org Moscow|Geneva|Seattle|New York -Original Message- From: Erik Bertelsen [mailto:bertelsen.e...@gmail.com] Sent: Friday, June 18, 2010 8:37 AM To: Tomcat Users List Subject: Re: how can i configure Tomcat's log4j to log in a separate file for each webapp? 2010/6/18 dB. dbl...@dblock.org: This question is all over the internet, without a satisfactory answer. We have a Tomcat deployment in which we install many web apps. We call this thing a services host. It has a log4j configuration that forwards logs into a file. I'd like to change the file pattern to include the name of the webapp, so that we can get one file per web application. * Is anyone doing that? I do this all the time. For applications using commons-logging, I place commons-logging.jar and log4j.jar in the webapp's WEB-INF/lib directory and log4j.properties in WEB-INF/classes. The same works if slf4j-api and slf4j-log4j12 is used instead of or in addition to commons-logging. I never add jar files used by individual webapps to tomcat's lib or any other directory shared by several webapps. kind regards - Erik - 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: HTTP connector to be aware of proxied SSL requests
On 18/06/2010 00:36, Matthew Peterson wrote: Out of interest, what are some of the security risks around non-trusted proxies injecting the x-forwarded-* headers? Mainly an issue if you use the RemoteAddressValve or a similar mechanism to secure your webapp based on client IP address. If an untrusted proxy can change the apparent IP address, they can bypass your security. For https/http I'd be worried about untrusted proxies making Tomcat think a requert was received over https was actually insecure. That will change how Tomcat handles session IDs etc and could maybe (I haven't thought this through) lead to the session ID being exposed over http when it should only be sent over hhttps. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: recommend a host please.
Hi, We use www.webappcabaret.com which supports both Tomcat 5.x and Tomcat 6.x. In addition you are able to configure local DNS settings via a control panel (cPanel or Plesk). --- On Fri, 6/18/10, Camy personal20002...@yahoo.com wrote: From: Camy personal20002...@yahoo.com Subject: Re: recommend a host please. To: users@tomcat.apache.org Date: Friday, June 18, 2010, 8:08 AM http://www.eapps.com http://www.eapps.com is a good choice if you are searching for Tomcat 6. In what regards your DNS these have to be changed usually at the current registrar if you want to point them to your future hosting provider. yuccanel wrote: Please can someone also explain process of ensuring that my dns name comes with me to new host? -- From: Ken Bowen kbo...@als.com Sent: Wednesday, June 16, 2010 6:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: recommend a host please. Previously suggested eApps.com to you. On Jun 16, 2010, at 12:01 PM, yucca...@live.co.za wrote: I would like some feedback on a hosting provider for me. I have had little choice but to cancel at dailyrazor as they failed to provide me with what I was paying for. To my horror, I asked for new tomcat and was given a tomcat 5 again as was evident again by the presence of no lib in root and presence of common/lib and shared/lib. They also have not provided shell access. New host should therefore have (in order of importance) out the box tomcat 6 with expected tomcat 6 layout, shell access and ok price. - 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 =)=) -- View this message in context: http://old.nabble.com/recommend-a-host-please.-tp28904567p28922580.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
Proxying HTTP (REST) calls
We have a whole bunch of distributed HTTP REST services, XML/JSon oriented APIs (all running on tomcat 5.5) with slightly different usage nuances. We now have to front those services. The plan is to do forward urls like /proxy/prefix/remoteUrl. to remote server/remote url. Beyond proxying, this new app will receive common security headers and map them to service specific strategies. We'll need some kind of persistent store and some logic which we'd prefer to write in Java, which is why we want to use Tomcat rather than using some other proxying alternatives. What's the best way to do this with Tomcat? Are there tomcat versions that will help with performance/features? -Solomon Duskis
Re: how can i configure Tomcat's log4j to log in a separate file for each webapp?
Hello dB; This is the step by step actions to configure your log4j logging in one place in Tomcat lib/log4j.properties Actions - 1- Remove logging.properties from conf/logging.properties 2- Remove tomcat-juli.jar from bin/tomcat-juli.jar 3- Get tomcat-juli.jar and tomcat-juli-adapters.jar from http://godel.cs.bilgi.edu.tr/apache/tomcat/tomcat-6/v6.0.26/bin/extras/; or any other place 4- Put tomcat-juli.jar to bin folder 5- Put tomcat-juli-adapters.jar to lib folder 6- Download log4j.jar and put to lib folder 7- Creates a log4j.properties and put it into lib folder. Example Configuration: log4j.rootLogger=INFO, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.base}/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n //Manager application log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]= DEBUG,B log4j.appender.B=org.apache.log4j.RollingFileAppender log4j.appender.B.File=${catalina.base}/logs/gurkan.log -- Its own log file log4j.appender.B.MaxFileSize=10MB log4j.appender.B.MaxBackupIndex=10 log4j.appender.B.layout=org.apache.log4j.PatternLayout log4j.appender.B.layout.ConversionPattern=%p %t %c - %m%n //Example application log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]= DEBUG,C log4j.appender.C=org.apache.log4j.RollingFileAppender log4j.appender.C.File=${catalina.base}/logs/example.log -- Its own log file log4j.appender.C.MaxFileSize=10MB log4j.appender.C.MaxBackupIndex=10 log4j.appender.C.layout=org.apache.log4j.PatternLayout log4j.appender.C.layout.ConversionPattern=%p %t %c - %m%n This will creates a root logger -- INFO and logs message to tomcat.log. Each web application can override ROOT like I did for manager and examples web applications. I hope it helps :))) --Gurkan From: dB. dbl...@dblock.org To: Tomcat Users List users@tomcat.apache.org Sent: Fri, June 18, 2010 3:49:03 PM Subject: RE: how can i configure Tomcat's log4j to log in a separate file for each webapp? That's exactly what I am trying to avoid :) I have a lot of web apps and developers that stand on their head for logging. My customers end up finding logs all over the place and enforcing it by convention is getting harder and harder. I'd like to configure logging for them rather than leave logging to their discretion. So I want the centralized log4j configuration that can insert the web app name into the file name that belongs to the tomcat installation. dB. @ dblock.org Moscow|Geneva|Seattle|New York -Original Message- From: Erik Bertelsen [mailto:bertelsen.e...@gmail.com] Sent: Friday, June 18, 2010 8:37 AM To: Tomcat Users List Subject: Re: how can i configure Tomcat's log4j to log in a separate file for each webapp? 2010/6/18 dB. dbl...@dblock.org: This question is all over the internet, without a satisfactory answer. We have a Tomcat deployment in which we install many web apps. We call this thing a services host. It has a log4j configuration that forwards logs into a file. I'd like to change the file pattern to include the name of the webapp, so that we can get one file per web application. * Is anyone doing that? I do this all the time. For applications using commons-logging, I place commons-logging.jar and log4j.jar in the webapp's WEB-INF/lib directory and log4j.properties in WEB-INF/classes. The same works if slf4j-api and slf4j-log4j12 is used instead of or in addition to commons-logging. I never add jar files used by individual webapps to tomcat's lib or any other directory shared by several webapps. kind regards - Erik - 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: how can i configure Tomcat's log4j to log in a separate file for each webapp?
And can I do this for an application I don't know anything about? I mean all I really want is log4j.appender.R.File=${catalina.base}/logs/${APPLICATION.NAME}.log dB. @ dblock.org Moscow|Geneva|Seattle|New York -Original Message- From: Gurkan Erdogdu [mailto:gurkanerdo...@yahoo.com] Sent: Friday, June 18, 2010 1:49 PM To: Tomcat Users List Subject: Re: how can i configure Tomcat's log4j to log in a separate file for each webapp? Hello dB; This is the step by step actions to configure your log4j logging in one place in Tomcat lib/log4j.properties Actions - 1- Remove logging.properties from conf/logging.properties 2- Remove tomcat-juli.jar from bin/tomcat-juli.jar 3- Get tomcat-juli.jar and tomcat-juli-adapters.jar from http://godel.cs.bilgi.edu.tr/apache/tomcat/tomcat-6/v6.0.26/bin/extras/; or any other place 4- Put tomcat-juli.jar to bin folder 5- Put tomcat-juli-adapters.jar to lib folder 6- Download log4j.jar and put to lib folder 7- Creates a log4j.properties and put it into lib folder. Example Configuration: log4j.rootLogger=INFO, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.base}/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n //Manager application log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]= DEBUG,B log4j.appender.B=org.apache.log4j.RollingFileAppender log4j.appender.B.File=${catalina.base}/logs/gurkan.log -- Its own log file log4j.appender.B.MaxFileSize=10MB log4j.appender.B.MaxBackupIndex=10 log4j.appender.B.layout=org.apache.log4j.PatternLayout log4j.appender.B.layout.ConversionPattern=%p %t %c - %m%n //Example application log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]= DEBUG,C log4j.appender.C=org.apache.log4j.RollingFileAppender log4j.appender.C.File=${catalina.base}/logs/example.log -- Its own log file log4j.appender.C.MaxFileSize=10MB log4j.appender.C.MaxBackupIndex=10 log4j.appender.C.layout=org.apache.log4j.PatternLayout log4j.appender.C.layout.ConversionPattern=%p %t %c - %m%n This will creates a root logger -- INFO and logs message to tomcat.log. Each web application can override ROOT like I did for manager and examples web applications. I hope it helps :))) --Gurkan From: dB. dbl...@dblock.org To: Tomcat Users List users@tomcat.apache.org Sent: Fri, June 18, 2010 3:49:03 PM Subject: RE: how can i configure Tomcat's log4j to log in a separate file for each webapp? That's exactly what I am trying to avoid :) I have a lot of web apps and developers that stand on their head for logging. My customers end up finding logs all over the place and enforcing it by convention is getting harder and harder. I'd like to configure logging for them rather than leave logging to their discretion. So I want the centralized log4j configuration that can insert the web app name into the file name that belongs to the tomcat installation. dB. @ dblock.org Moscow|Geneva|Seattle|New York -Original Message- From: Erik Bertelsen [mailto:bertelsen.e...@gmail.com] Sent: Friday, June 18, 2010 8:37 AM To: Tomcat Users List Subject: Re: how can i configure Tomcat's log4j to log in a separate file for each webapp? 2010/6/18 dB. dbl...@dblock.org: This question is all over the internet, without a satisfactory answer. We have a Tomcat deployment in which we install many web apps. We call this thing a services host. It has a log4j configuration that forwards logs into a file. I'd like to change the file pattern to include the name of the webapp, so that we can get one file per web application. * Is anyone doing that? I do this all the time. For applications using commons-logging, I place commons-logging.jar and log4j.jar in the webapp's WEB-INF/lib directory and log4j.properties in WEB-INF/classes. The same works if slf4j-api and slf4j-log4j12 is used instead of or in addition to commons-logging. I never add jar files used by individual webapps to tomcat's lib or any other directory shared by several webapps. kind regards - Erik - 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: Application stops responding, jk worker in error state
Rainer: If you are going to post part of your log file, please also do provide your mod_jk configuration and version information. I am using mod_jk 1.2.30 which I built from the source tarball. My application just locked up so I did a tail -f on the mod_jk log and made a request to it. Here is what generated in the log: [Fri Jun 18 15:30:17.614 2010] [394:47652193829632] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1230): (tomcat) can't receive the response header message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=11) [Fri Jun 18 15:30:17.614 2010] [394:47652193829632] [error] ajp_get_reply::jk_ajp_common.c (2055): (tomcat) Tomcat is down or refused connection. No response has been sent to the client (yet) [Fri Jun 18 15:30:17.614 2010] [394:47652193829632] [info] ajp_service::jk_ajp_common.c (2540): (tomcat) sending request to tomcat failed (recoverable), (attempt=1) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1230): (tomcat) can't receive the response header message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=11) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [error] ajp_get_reply::jk_ajp_common.c (2055): (tomcat) Tomcat is down or refused connection. No response has been sent to the client (yet) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [info] ajp_service::jk_ajp_common.c (2540): (tomcat) sending request to tomcat failed (recoverable), (attempt=2) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [error] ajp_service::jk_ajp_common.c (2559): (tomcat) connecting to tomcat failed. [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [info] jk_handler::mod_jk.c (2618): Service error=0 for worker=tomcat I took a look at the tomcat catalina.out and do not see any errors there. The CPU is empty and the RAM is available. I telnet to 127.0.0.1 port 8009 on the machine, I get a connection, so something is listening on the port. If I do a ps aux | grep java, I see two processes for tomcat which is normal. I checked the mysql log and do not see any errors. I did a show innodb status and do not see any deadlocks in the database. I am attaching the properties for my jk configuation and a screen shot of the JK Status in case it helps. What is really strange is the JK Status page says -48 connections. It seems like that number should always be positive or zero but not negative. I appreciate any help you can offer. Thanks, Neil -- Neil Aggarwal, (281)846-8957 FREE trial: Tomcat 6 VPS with unmetered bandwidth http://UnmeteredVPS.net/tomcat - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Application stops responding, jk worker in error state
Rainer: I am attaching the properties for my jk configuation and a screen shot of the JK Status in case it helps. It looks like the mailing list software stripped the attachments from my email. Here is the list of jk properties: worker.server_name=tweb1.retcgroup.com worker.server_port=80 worker.time_datetime=20100618152329 worker.time_tz=CDT worker.time_unix=1276892609 worker.web_server=Apache/2.2.3 (CentOS) worker.jk_version=mod_jk/1.2.30 worker.ajp_count=1 worker.tomcat.list=tomcat worker.tomcat.type=ajp13 worker.tomcat.host=localhost worker.tomcat.port=8009 worker.tomcat.address=127.0.0.1:8009 worker.tomcat.connection_pool_timeout=600 worker.tomcat.ping_timeout=1 worker.tomcat.connect_timeout=0 worker.tomcat.prepost_timeout=0 worker.tomcat.reply_timeout=0 worker.tomcat.retries=2 worker.tomcat.connection_ping_interval=0 worker.tomcat.recovery_options=0 worker.tomcat.max_packet_size=8192 worker.tomcat.used=6043 worker.tomcat.errors=57 worker.tomcat.client_errors=36 worker.tomcat.reply_timeouts=0 worker.tomcat.transferred=1571835650 worker.tomcat.read=65081493100 worker.tomcat.busy=2 worker.tomcat.max_busy=21 worker.tomcat.connected=-39 worker.tomcat.map_count=2 worker.tomcat.last_reset_at=1276866423 worker.tomcat.last_reset_ago=26186 worker.tomcat.error_time_datetime=20100618151913 worker.tomcat.error_time_tz=CDT worker.tomcat.error_time_unix seconds=1276892353 worker.tomcat.error_time_ago seconds=256 worker.tomcat.map.1.server=tweb1.retcgroup.com worker.tomcat.map.1.uri=/thymeleweb/* worker.tomcat.map.1.type=Wildchar worker.tomcat.map.1.source=JkMount worker.tomcat.map.1.reply_timeout=-1 worker.tomcat.map.1.fail_on_status= worker.tomcat.map.1.active= worker.tomcat.map.1.disabled= worker.tomcat.map.1.stopped= worker.tomcat.map.1.use_server_errors=0 worker.tomcat.map.2.server=tweb1.retcgroup.com [_default_:443] worker.tomcat.map.2.uri=/thymeleweb/* worker.tomcat.map.2.type=Wildchar worker.tomcat.map.2.source=JkMount worker.tomcat.map.2.reply_timeout=-1 worker.tomcat.map.2.fail_on_status= worker.tomcat.map.2.active= worker.tomcat.map.2.disabled= worker.tomcat.map.2.stopped= worker.tomcat.map.2.use_server_errors=0 worker.result.type=OK worker.result.message=Action finished The screenshot of my jk status page is at: http://tweb1.retcgroup.com/screenshot.gif Thanks, Neil -- Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net FREE trial: Tomcat 6 VPS with unmetered bandwidth http://UnmeteredVPS.net/tomcat - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application stops responding, jk worker in error state
On 18.06.2010 22:44, Neil Aggarwal wrote: Rainer: If you are going to post part of your log file, please also do provide your mod_jk configuration and version information. I am using mod_jk 1.2.30 which I built from the source tarball. My application just locked up so I did a tail -f on the mod_jk log and made a request to it. Here is what generated in the log: [Fri Jun 18 15:30:17.614 2010] [394:47652193829632] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1230): (tomcat) can't receive the response header message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=11) Hmmm, errno 11 is often EAGAIN. What platform are you using (OS, version)? [Fri Jun 18 15:30:17.614 2010] [394:47652193829632] [error] ajp_get_reply::jk_ajp_common.c (2055): (tomcat) Tomcat is down or refused connection. No response has been sent to the client (yet) [Fri Jun 18 15:30:17.614 2010] [394:47652193829632] [info] ajp_service::jk_ajp_common.c (2540): (tomcat) sending request to tomcat failed (recoverable), (attempt=1) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1230): (tomcat) can't receive the response header message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=11) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [error] ajp_get_reply::jk_ajp_common.c (2055): (tomcat) Tomcat is down or refused connection. No response has been sent to the client (yet) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [info] ajp_service::jk_ajp_common.c (2540): (tomcat) sending request to tomcat failed (recoverable), (attempt=2) [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [error] ajp_service::jk_ajp_common.c (2559): (tomcat) connecting to tomcat failed. [Fri Jun 18 15:31:19.711 2010] [394:47652193829632] [info] jk_handler::mod_jk.c (2618): Service error=0 for worker=tomcat I took a look at the tomcat catalina.out and do not see any errors there. The CPU is empty and the RAM is available. I telnet to 127.0.0.1 port 8009 on the machine, I get a connection, so something is listening on the port. If I do a ps aux | grep java, I see two processes for tomcat which is normal. I checked the mysql log and do not see any errors. I did a show innodb status and do not see any deadlocks in the database. I am attaching the properties for my jk configuation and a screen shot of the JK Status in case it helps. What is really strange is the JK Status page says -48 connections. It seems like that number should always be positive or zero but not negative. That should be unrelated (and yes: it's not OK). Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Application stops responding, jk worker in error state
Rainer: Hmmm, errno 11 is often EAGAIN. What platform are you using (OS, version)? I am using CentOS 5.5 freshly installed, not an upgrade. I tried that as a fix to this problem. I wiped the server clean and reinstalled everything from scratch. It was on CentOS 5.4 before and I had the same behavior. What is really strange is the JK Status page says -48 connections. It seems like that number should always be positive or zero but not negative. That should be unrelated (and yes: it's not OK). It seems to me if jk is confused about the number of backend connections, it may not be connecting correctly to Tomcat. That seems like it would cause the behavior I am experiencing. Thanks, Neil -- Neil Aggarwal, (281)846-8957 FREE trial: Virtualmin VPS with unmetered bandwidth http://UnmeteredVPS.net/virtualmin - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: recommend a host please.
I've been very happy with http://www.rosehosting.com/virtserv.html On 18/06/2010, at 6:08 PM, Camy personal20002...@yahoo.com wrote: http://www.eapps.com http://www.eapps.com is a good choice if you are searching for Tomcat 6. In what regards your DNS these have to be changed usually at the current registrar if you want to point them to your future hosting provider. yuccanel wrote: Please can someone also explain process of ensuring that my dns name comes with me to new host? -- From: Ken Bowen kbo...@als.com Sent: Wednesday, June 16, 2010 6:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: recommend a host please. Previously suggested eApps.com to you. On Jun 16, 2010, at 12:01 PM, yucca...@live.co.za wrote: I would like some feedback on a hosting provider for me. I have had little choice but to cancel at dailyrazor as they failed to provide me with what I was paying for. To my horror, I asked for new tomcat and was given a tomcat 5 again as was evident again by the presence of no lib in root and presence of common/lib and shared/lib. They also have not provided shell access. New host should therefore have (in order of importance) out the box tomcat 6 with expected tomcat 6 layout, shell access and ok price. --- -- 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 =)=) -- View this message in context: http://old.nabble.com/recommend-a-host-please.-tp28904567p28922580.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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org