Re: How to plug a customized membership service to Tribes
Anyone please? On Thu, Aug 16, 2012 at 3:08 PM, Sajith Kariyawasam saj...@gmail.comwrote: Hi all, I'm trying to understand how Tribes can be used to solve our needs, so I'm going through the source. There I found membershipService property of org.apache.catalina.tribes.group.ChannelCoordinator its tightly coupled to org.apache.catalina.tribes.membership.McastService. I was wondering whether I can have my customized Membership Service? In order to plug a customized Membership Service, do I have to write a customized GroupChannel and a ChannelCoordinator as well ? -- Best Regards Sajith -- Best Regards Sajith
MySQL connection error [was: error while shutting down tomcat]
Ijlal, On 18.8.2012 2:03, Ijlal EL HAZITI wrote: I understand that it's an access to mysql problem. So I gave the user sakai all permissions required, and re-verified the file catalina.properties (where I should put mysql username and the password) but in vain. I still have the same error. You say that you granted privileges to user 'sakai', but log files suggests that your webapp tries to connect as user 'sa', without password. -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
Also in my localhost logs in tomcat 7.0.29. It is logging like this: 192.168.2.67 - - [20/Aug/2012:13:32:20 +0530] (¬ûÑ¿¿??«ÊR˱{fÔb²¹? æè 5í?ºÙ³,µj\´?? }by*Ý?ÀB5ÅÖ8añ¹¶i?ùÇ Z;?ÐÀû#pÌ8 ûæý5Å*1éIEWç?[?Y°U?ïs,5tÕù)?WÆ?iU¼??/µ£kîUð$?+º05 |7ξÒL«WXÒè¦-?Àp|wny· E?éX68Ä 400 - What does this indicate? -Sahana On Mon, Aug 20, 2012 at 11:00 AM, Sahana Voleti sahanasithmas...@gmail.comwrote: Konstantin Kolinko, U mentioned these steps in your mail: 1. Read documentation for AccessLogValve. 2. Use a text editor to edit server.xml file (for the global access log) or the META-INF/context.xml file of your web application (for your webapp's access log). 3. Restart Tomcat. 4. Read access log file and compare the value mentioned there with the size of your uploaded file. The value of content-length header should be slightly more than the size of your file (because of delimiters being added). Alternatively a browser can use content-encoding:chunked header. Can you please send me an example of how I can make these changes. -Thanks Sahana On Fri, Aug 17, 2012 at 10:19 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sahana, On 8/17/12 8:33 AM, Sahana Voleti wrote: I am trying to upload really large files (size about 10GB) using the Apache commons upload. I have followed the steps properly, increased the java heap size and the maxPostSize in tomcat (I am using tomcat version 7.0.29). Also I am using Windows XP , 2GB RAM machine. I'm curious as to why you changed your heap settings? If you are uploading large files, you ought to be using disk-based data caching so you don't need a big heap. What did you set your heap size to? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAudh8ACgkQ9CaO5/Lv0PACDgCfeSRJge6U9JaP48/9yKddYo43 4oIAn25XCCxGhskf5RPHzZY3pLkvq07D =w316 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Null pointer when calling getRemoteAddr in exception handling
Hello, I have encountered ambiguous feature/bug of request ...servlet code ... throw new LoginException(String.format(Login failed for user %s from IP %s (%s), principalName, request.getRemoteAddr(), type ), ex); .. throws java.lang.NullPointerException at org.apache.coyote.http11.Http11AprProcessor.actionInternal(Http11AprProcessor.java:272) at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:834) at org.apache.coyote.Request.action(Request.java:346) at org.apache.catalina.connector.Request.getRemoteAddr(Request.java:1280) at org.apache.catalina.connector.RequestFacade.getRemoteAddr(RequestFacade.java:517) but this equivalent code works as it should ...servlet code ... String remoteAddr = request.getRemoteAddr(); throw new LoginException(String.format(Login failed for user %s from IP %s (%s), principalName, remoteAddr, type ), ex); .. Is this correct behavior ? -- Peter Cipov - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: hostConfigClass attribute
-Ursprüngliche Nachricht- Von: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Gesendet: Freitag, 17. August 2012 15:50 An: Tomcat Users List Betreff: Re: hostConfigClass attribute 2012/8/16 Schulz-Hildebrandt, Ole ole.schulz-hildebra...@ppimedia.de: Hi, I'm working with tomcat 7.0.29. In tomcat 5.x.x it was possible to use a custom HostConfig class by setting the hostConfigClass attribute at a Host element in the server.xml. This allowed to customize the order webapps were started, to avoid deploying of webapps at tomcat startup etc. Though this is still possible in tomcat 7.0.29 (internally still a LifecycleListenerRule for the hostConfigClass attribute is registered at the Digester) a warning is outputted (because the method setHostConfigClass was removed from the StandardHost): WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'hostConfigClass' to 'de.ppimedia.tomcat.hostconfig.AppControllerHostConfig' did not find a matching property. Does anybody know why this method was removed? Is hostConfigClass only a internal attribute in tomcat 7.x.x? If so is there a correct way to use a custom HostConfig? 1. For reference: The hostConfigClass attribute on a Host, configClass attribute on a Context, engineConfigClass on Engine should already work as is. The LifecycleListenerRule class that implements those attributes has direct access to attributes on an XML element and so no setter is actually needed. The SetPropertiesRule warning can be ignored in this case. This warning is a feature that was added in Tomcat 6 to catch common errors when people misspell attribute names. I think those attributes are a supported feature, but they are not mentioned in documentation (update the docs?). Does one need such properties on the StandardHost, StandardContext, StandardEngine classes + expose them through JMX? These attributes are used to configure those objects, but they would have no effect if one tries to change them at runtime, so what purpose would be to have such properties? One such purpose might be to be able to inspect existing configuration through JMX. 2. Remembering one of commits, http://svn.apache.org/viewvc?view=revisionrevision=1030602 I think it is possible to add support for hostConfigClass property on Engine, if anyone wants such feature. 3. I overwrote addLifecycleListener (replacing the default HostConfig by my custom HostConfig) It sounds like a hack. It is better to create the correct class instance when it is created. Your approach will break if the default HostConfig object were somehow configured before it is passed to addLifecycleListener(). It will also break if another reference to the default instance were kept elsewhere (accessing the default object, not knowing that you have replaced it). Hi, yes you are right it is a hack. I had choosen this way because I was not sure if the hostConfigClass attribute was a supported feature and I was afraid it could be removed in future tomcat versions. Now that I know (thanks to your information) that it is a supported feature I will switch back using hostConfigClass again. From my perspective as a tomcat user I would appreciate if those attribute were mentioned in the docs. Would it be possible to remove the SetPropertiesRule warning in future versions? Because so far the only way to avoid this message is (as Mark suggested) to use a custom Host class which provides dummy getter and setter for hostConfigClass which is kind of a hack as well... Best regards Ole - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Null pointer when calling getRemoteAddr in exception handling
2012/8/20 Peter Cipov pci...@kerio.com: Hello, I have encountered ambiguous feature/bug of request ...servlet code ... throw new LoginException(String.format(Login failed for user %s from IP %s (%s), principalName, request.getRemoteAddr(), type ), ex); .. throws java.lang.NullPointerException at org.apache.coyote.http11.Http11AprProcessor.actionInternal(Http11AprProcessor.java:272) at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:834) at org.apache.coyote.Request.action(Request.java:346) at org.apache.catalina.connector.Request.getRemoteAddr(Request.java:1280) at org.apache.catalina.connector.RequestFacade.getRemoteAddr(RequestFacade.java:517) but this equivalent code works as it should ...servlet code ... String remoteAddr = request.getRemoteAddr(); throw new LoginException(String.format(Login failed for user %s from IP %s (%s), principalName, remoteAddr, type ), ex); .. Is this correct behavior ? 1. It depends on version of Tomcat and on which connector you are using. If it is some old version of Tomcat 5.5 (your are not saying what you are using) and an APR connector (as can be confirmed from your stack trace), then yes, it is known behaviour that was fixed a year ago. 2. If you are using request object outside of its request processing cycle, it is also a known behaviour. (You do not have access to the socket if it is not the thread responding to the request). If it is none of the above, then yes - that would be a bug, but you have to provide a recipe (e.g. a simple web application) on how to reproduce it. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configure logs without date in the file name
Hello, I have tomcat 7.0.26 and I see how the /logs folder grow every day with tons of logs with the date, like: catalina.2012-08-20.loghost-manager.2012-08-20.loglocalhost_access_log.2012-08-20.txtlocalhost.2012-08-20.logmanager.2012-08-20.log How can I remove the date between the name and the file extension for rotate this files with logrotate? I have in the end of server.xml:Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / and in the top of logging.properties:handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler Thanks,
redirecting people to maintenance mode
Dear all, I have a Tomcat web server. From time to time, I need to do some maintenance and want people not to interact with the Tomcat server while I'm doing it. The key thing here is that the Tomcat server is up and running. This is what I want to achieve: - I want all people to be redirected from 80/443 port at server1 to a different URL http://server2/maintenance.html except my IP address (so I can check Tomcat myself). - If possible, I want this to be transparent to the user, so they get a http redirect showing the server1 in the client's browser, not server2 (but this is not that important). I assume I can use iptables to redirect people to a different web server, but how can I know that I need to redirect them to the maintenance.html if that server is serving other web pages too? Regards, Miguel This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
I assume I can use iptables to redirect people to a different web server, but how can I know that I need to redirect them to the maintenance.html if that server is serving other web pages too? You can try Valve filters . With Valve, you have access to Request and Response objects I didn't do ever , but it's an idea :-) Saludos - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
difficulty in running acegisample.war file in tomcat
Hi all, I am trying to run acegisample.war file from tomcat. I have followed all the instruction to run it from here. (http://www.ibm.com/developerworks/java/library/j-acegi1/#section6.2). When I try to run the file by (|http://localhost:8080/acegisample/|), it gives me http status- 404. catalina.log file has some exceptions. Please find the same attached herewith. Pl note that I am able to run other war files. Could anyone please tell what's going wrong while deploying acegisample.war file ? Thank you. Ragini. Aug 20, 2012 12:07:39 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/jdk1.6.0_33/jre/lib/i386/server:/usr/lib/jvm/jdk1.6.0_33/jre/lib/i386:/usr/lib/jvm/jdk1.6.0_33/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib Aug 20, 2012 12:07:39 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8080] Aug 20, 2012 12:07:39 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ajp-bio-8009] Aug 20, 2012 12:07:39 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 945 ms Aug 20, 2012 12:07:39 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Aug 20, 2012 12:07:39 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.28 Aug 20, 2012 12:07:39 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor /home/ragini/apache-tomcat-7.0.28_Profiling/conf/Catalina/localhost/predict.xml Aug 20, 2012 12:07:39 PM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase /home/ragini/apache-tomcat-7.0.28_Profiling/webapps/home/ragini/Application/predictions inside the host appBase has been specified, and will be ignored Aug 20, 2012 12:07:39 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Context/Realm} Setting property 'debug' to '99' did not find a matching property. Aug 20, 2012 12:07:39 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/ragini/apache-tomcat-7.0.28_Profiling/webapps/predict does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4905) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5085) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:679) Aug 20, 2012 12:07:39 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error in resourceStart() Aug 20, 2012 12:07:40 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error getConfigured Aug 20, 2012 12:07:40 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/predict] startup failed due to previous errors Aug 20, 2012 12:07:40 PM org.apache.catalina.deploy.NamingResources cleanUp WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/predict]] so no cleanup was performed for that container javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:168) at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:988) at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:970) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5494) at
Re: redirecting people to maintenance mode
On 20/08/2012 12:37, Jose María Zaragoza wrote: I assume I can use iptables to redirect people to a different web server, but how can I know that I need to redirect them to the maintenance.html if that server is serving other web pages too? You can try Valve filters . With Valve, you have access to Request and Response objects I didn't do ever , but it's an idea :-) maybe I haven't worded my idea correctly. I can't assume the Tomcat service in server1 is running all the time (since it's under maintenance, tomcat might be restarted a few times during the maintenance). That's why I thought about iptables. The issue is that iptables run at the IP level while redirects work at application level. Miguel This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
What about a non-tomcat solution like a load balancer (apache, nginx?) in front of your tomcats? Sent from my iPhone On 21.08.2012, at 12:25, Miguel González Castaños miguel_3_gonza...@yahoo.es wrote: Dear all, I have a Tomcat web server. From time to time, I need to do some maintenance and want people not to interact with the Tomcat server while I'm doing it. The key thing here is that the Tomcat server is up and running. This is what I want to achieve: - I want all people to be redirected from 80/443 port at server1 to a different URL http://server2/maintenance.html except my IP address (so I can check Tomcat myself). - If possible, I want this to be transparent to the user, so they get a http redirect showing the server1 in the client's browser, not server2 (but this is not that important). I assume I can use iptables to redirect people to a different web server, but how can I know that I need to redirect them to the maintenance.html if that server is serving other web pages too? Regards, Miguel This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. - 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: redirecting people to maintenance mode
maybe I haven't worded my idea correctly. I can't assume the Tomcat service in server1 is running all the time (since it's under maintenance, tomcat might be restarted a few times during the maintenance). That's why I thought about iptables. The issue is that iptables run at the IP level while redirects work at application level. I thought that you only wanted to avoid that users access to server ,and if the server is down ... In this case, I wouldn't have 2 server ( one for display a maintenance page ). I'd prefer a frontend server , like Apache , and to use some module to proxy /filter/check connection , etc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
2012/8/21 Miguel González Castaños miguel_3_gonza...@yahoo.es: On 20/08/2012 12:37, Jose María Zaragoza wrote: I assume I can use iptables to redirect people to a different web server, but how can I know that I need to redirect them to the maintenance.html if that server is serving other web pages too? You can try Valve filters . With Valve, you have access to Request and Response objects I didn't do ever , but it's an idea :-) maybe I haven't worded my idea correctly. I can't assume the Tomcat service in server1 is running all the time (since it's under maintenance, tomcat might be restarted a few times during the maintenance). That's why I thought about iptables. The issue is that iptables run at the IP level while redirects work at application level. 1. Yes, with iptables you can redirect requests to another port number (where other Tomcat instance runs, or just some other web server). There is an example of redirecting from port 80 to port 8080 using iptables. https://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F Note that there exists the proxyPort attribute on Connector element that will tell Tomcat what its public port number is. 2. Maybe you can redirect selectively by remote host address (I do not remember iptables docs so throughly, but I think it is possible), but an easier solution might be to just add a different Connector with different port number (and maybe with address=127.0.0.1 if you are connecting locally) that you would use for administering. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: difficulty in running acegisample.war file in tomcat
2012/8/20 Ragini raginippa...@gmail.com: Hi all, I am trying to run acegisample.war file from tomcat. I have followed all the instruction to run it from here. (http://www.ibm.com/developerworks/java/library/j-acegi1/#section6.2). Using Acegi in very outdated. This product has been renamed to Spring Security years ago and is now at version 3.1.2. http://www.springsource.org/spring-security http://static.springsource.org/spring-security/site/tutorial.html When I try to run the file by (http://localhost:8080/acegisample/), it gives me http status- 404. The web application failed to start. There is no wonder that it replies with 404. catalina.log file has some exceptions. Please find the same attached herewith. First, regarding predict.xml. There are a lot of errors that say that configuration of your web application (that conf/Catalina/localhost/predict.xml file) is broken. You are 1. Using attributes that do not exist (and that means that the docs that you followed are somewhat outdated) 2. Using wrong values for attributes. 3. Placing your files in the wrong place, where Tomcat cannot find them. The configuration reference for the context configuration file in Tomcat 7 is here: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html The usual place for context configuration file in Tomcat 7 is META-INF/context.xml inside of your web application. Second, regarding acegisample.war, there are errors that say that a lot of required classes are not found. Those should be some libraries in the WEB-INF/lib directory of your WAR, but all they are missing. Pl note that I am able to run other war files. Could anyone please tell what's going wrong while deploying acegisample.war file ? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configure logs without date in the file name
2012/8/20 Ricardo F ri...@hotmail.com: Hello, I have tomcat 7.0.26 and I see how the /logs folder grow every day with tons of logs with the date, like: catalina.2012-08-20.loghost-manager.2012-08-20.loglocalhost_access_log.2012-08-20.txtlocalhost.2012-08-20.logmanager.2012-08-20.log How can I remove the date between the name and the file extension for rotate this files with logrotate? I have in the end of server.xml:Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t %r %s %b / and in the top of logging.properties:handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler Regarding AccessLogValve: = rotatable=false [http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve] Regarding org.apache.juli.FileHandler: == itsname.rotatable=false [http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/juli/FileHandler.html] or use java.util.logging.FileHandler instead. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: Also in my localhost logs in tomcat 7.0.29. It is logging like this: 192.168.2.67 - - [20/Aug/2012:13:32:20 +0530] (¬ûÑ¿¿?? «ÊR˱{fÔb²¹? æè 5í?º Ù³,µj\ ´?? }b y* Ý?ÀB5ÅÖ8añ¹¶i? ùÇ Z;?ÐÀû#pÌ8 ûæ ý5Å *1éIEWç?[?Y°U?ïs,5tÕù )?WÆ?iU¼??/µ£kîUð$?+º05 | 7Î ¾ÒL«WXÒè¦-?Àp|wny· E ?éX68Ä400 - What does this indicate? -Sahana Somebody connects to your port and sends garbage. It is interpreted as an incorrect request (HTTP status code 400, see HTTP protocol specification). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: Konstantin Kolinko, U mentioned these steps in your mail: 1. Read documentation for AccessLogValve. 2. Use a text editor to edit server.xml file (for the global access log) or the META-INF/context.xml file of your web application (for your webapp's access log). 3. Restart Tomcat. 4. Read access log file and compare the value mentioned there with the size of your uploaded file. The value of content-length header should be slightly more than the size of your file (because of delimiters being added). Alternatively a browser can use content-encoding:chunked header. Can you please send me an example of how I can make these changes. For which step of the above? Documentation for AccessLogValve is Tomcat 7 docs home - Configuration reference - Valve - Access Log Valve. And read the previous thread that I mentioned before (with a link to archives). The thread name is Problems uploading huge files 2GB to Tomcat app. I mentioned my configuration there. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
Is there any size limitations fr this apache commons upload? Also is there any standalone application I can use? I think there is some problem in parsing because of which I am getting multipart/formdata request failed. On Mon, Aug 20, 2012 at 5:03 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: Konstantin Kolinko, U mentioned these steps in your mail: 1. Read documentation for AccessLogValve. 2. Use a text editor to edit server.xml file (for the global access log) or the META-INF/context.xml file of your web application (for your webapp's access log). 3. Restart Tomcat. 4. Read access log file and compare the value mentioned there with the size of your uploaded file. The value of content-length header should be slightly more than the size of your file (because of delimiters being added). Alternatively a browser can use content-encoding:chunked header. Can you please send me an example of how I can make these changes. For which step of the above? Documentation for AccessLogValve is Tomcat 7 docs home - Configuration reference - Valve - Access Log Valve. And read the previous thread that I mentioned before (with a link to archives). The thread name is Problems uploading huge files 2GB to Tomcat app. I mentioned my configuration there. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
The documentation is fine but how do you use content length there? On Mon, Aug 20, 2012 at 5:10 PM, Sahana Voleti sahanasithmas...@gmail.comwrote: Is there any size limitations fr this apache commons upload? Also is there any standalone application I can use? I think there is some problem in parsing because of which I am getting multipart/formdata request failed. On Mon, Aug 20, 2012 at 5:03 PM, Konstantin Kolinko knst.koli...@gmail.com wrote: 2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: Konstantin Kolinko, U mentioned these steps in your mail: 1. Read documentation for AccessLogValve. 2. Use a text editor to edit server.xml file (for the global access log) or the META-INF/context.xml file of your web application (for your webapp's access log). 3. Restart Tomcat. 4. Read access log file and compare the value mentioned there with the size of your uploaded file. The value of content-length header should be slightly more than the size of your file (because of delimiters being added). Alternatively a browser can use content-encoding:chunked header. Can you please send me an example of how I can make these changes. For which step of the above? Documentation for AccessLogValve is Tomcat 7 docs home - Configuration reference - Valve - Access Log Valve. And read the previous thread that I mentioned before (with a link to archives). The thread name is Problems uploading huge files 2GB to Tomcat app. I mentioned my configuration there. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
Miguel González Castaños wrote: Dear all, I have a Tomcat web server. Apparently, you also have an email program that sends messages dated from the future. Or, maybe you should say then : I will have a Tomcat web server. Either way, it makes it a bit harder to follow the gist of the conversation here. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: The documentation is fine but how do you use content length there? I am logging the value of the content-length header. What that header means is defined in the HTTP protocol specification. On Mon, Aug 20, 2012 at 5:10 PM, Sahana Voleti sahanasithmas...@gmail.comwrote: Is there any size limitations fr this apache commons upload? Also is there any standalone application I can use? I think there is some problem in parsing because of which I am getting multipart/formdata request failed. On Mon, Aug 20, 2012 at 5:03 PM, Konstantin Kolinko knst.koli...@gmail.com wrote: 2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: Konstantin Kolinko, U mentioned these steps in your mail: 1. Read documentation for AccessLogValve. 2. Use a text editor to edit server.xml file (for the global access log) or the META-INF/context.xml file of your web application (for your webapp's access log). 3. Restart Tomcat. 4. Read access log file and compare the value mentioned there with the size of your uploaded file. The value of content-length header should be slightly more than the size of your file (because of delimiters being added). Alternatively a browser can use content-encoding:chunked header. Can you please send me an example of how I can make these changes. For which step of the above? Documentation for AccessLogValve is Tomcat 7 docs home - Configuration reference - Valve - Access Log Valve. And read the previous thread that I mentioned before (with a link to archives). The thread name is Problems uploading huge files 2GB to Tomcat app. I mentioned my configuration there. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with uploading large files
can you give me a sample code using content length? On Mon, Aug 20, 2012 at 5:38 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: The documentation is fine but how do you use content length there? I am logging the value of the content-length header. What that header means is defined in the HTTP protocol specification. On Mon, Aug 20, 2012 at 5:10 PM, Sahana Voleti sahanasithmas...@gmail.comwrote: Is there any size limitations fr this apache commons upload? Also is there any standalone application I can use? I think there is some problem in parsing because of which I am getting multipart/formdata request failed. On Mon, Aug 20, 2012 at 5:03 PM, Konstantin Kolinko knst.koli...@gmail.com wrote: 2012/8/20 Sahana Voleti sahanasithmas...@gmail.com: Konstantin Kolinko, U mentioned these steps in your mail: 1. Read documentation for AccessLogValve. 2. Use a text editor to edit server.xml file (for the global access log) or the META-INF/context.xml file of your web application (for your webapp's access log). 3. Restart Tomcat. 4. Read access log file and compare the value mentioned there with the size of your uploaded file. The value of content-length header should be slightly more than the size of your file (because of delimiters being added). Alternatively a browser can use content-encoding:chunked header. Can you please send me an example of how I can make these changes. For which step of the above? Documentation for AccessLogValve is Tomcat 7 docs home - Configuration reference - Valve - Access Log Valve. And read the previous thread that I mentioned before (with a link to archives). The thread name is Problems uploading huge files 2GB to Tomcat app. I mentioned my configuration there. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
On 20/08/2012 13:50, André Warnier wrote: Miguel González Castaños wrote: Dear all, I have a Tomcat web server. Apparently, you also have an email program that sends messages dated from the future. Or, maybe you should say then : I will have a Tomcat web server. Either way, it makes it a bit harder to follow the gist of the conversation here. Sorry, for any reason the date was changed in my system inadvertently Corrected. Miguel This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
Sorry, for any reason the date was changed in my system inadvertently Corrected. I don't have any problem to fix issues to people from the future :-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
%{xxx}t not working
Hello Tomcat List, I was wondering if you could help me with a server.xml log question. I'm trying to format the times that go into the logs but not having any success. The output always ends up as : ???. I've read that any time format accepted by Java's SimpleDateFormat will work but this one doesn't seem to be working. The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t The whole log format line is: Valve className=org.apache.catalina.valves.AccessLogValve directory=${splunk.accesslogs} prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a url=quot;%rquot; query=%q status=%s time=%D size=%B agent=quot;%{User-Agent}iquot; resolveHosts=false / Everything works except the %{xxx}t variable. i.e. the output log line is: ??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET /iTranslate/index HTTP/1.1 query= status=200 time=449 size=8205 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25 (notice the ??? -- that's where the time/date formatted output should go. Can any one help me with this? Thank you, John John Byrne System Administrator, IST john_by...@apple.com
Re: %{xxx}t not working
2012/8/20 John Byrne john_by...@apple.com: I was wondering if you could help me with a server.xml log question. I'm trying to format the times that go into the logs but not having any success. The output always ends up as : ???. I've read that any time format accepted by Java's SimpleDateFormat will work but this one doesn't seem to be working. The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t The whole log format line is: Valve className=org.apache.catalina.valves.AccessLogValve directory=${splunk.accesslogs} prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a url=quot;%rquot; query=%q status=%s time=%D size=%B agent=quot;%{User-Agent}iquot; resolveHosts=false / Everything works except the %{xxx}t variable. i.e. the output log line is: ??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET /iTranslate/index HTTP/1.1 query= status=200 time=449 size=8205 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25 (notice the ??? -- that's where the time/date formatted output should go. Can any one help me with this? Your Tomcat version = ? IIRC, support for %{xxx}t was added less than a year ago. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: %{xxx}t not working
I've tried both 7.0.29 and 7.0.8. Thank you for the help. John Byrne John Byrne System Administrator, IST john_by...@apple.com On Aug 20, 2012, at 12:43 PM, Konstantin Kolinko wrote: 2012/8/20 John Byrne john_by...@apple.com: I was wondering if you could help me with a server.xml log question. I'm trying to format the times that go into the logs but not having any success. The output always ends up as : ???. I've read that any time format accepted by Java's SimpleDateFormat will work but this one doesn't seem to be working. The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t The whole log format line is: Valve className=org.apache.catalina.valves.AccessLogValve directory=${splunk.accesslogs} prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a url=quot;%rquot; query=%q status=%s time=%D size=%B agent=quot;%{User-Agent}iquot; resolveHosts=false / Everything works except the %{xxx}t variable. i.e. the output log line is: ??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET /iTranslate/index HTTP/1.1 query= status=200 time=449 size=8205 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25 (notice the ??? -- that's where the time/date formatted output should go. Can any one help me with this? Your Tomcat version = ? IIRC, support for %{xxx}t was added less than a year ago. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirecting people to maintenance mode
Miguel González Castaños wrote: Dear all, I have a Tomcat web server. From time to time, I need to do some maintenance and want people not to interact with the Tomcat server while I'm doing it. The key thing here is that the Tomcat server is up and running. This is what I want to achieve: - I want all people to be redirected from 80/443 port at server1 to a different URL http://server2/maintenance.html except my IP address (so I can check Tomcat myself). - If possible, I want this to be transparent to the user, so they get a http redirect showing the server1 in the client's browser, not server2 (but this is not that important). I assume I can use iptables to redirect people to a different web server, but how can I know that I need to redirect them to the maintenance.html if that server is serving other web pages too? This is a reply from someone who is not a Tomcat (nor even Java) programming specialist. If this was to do in Tomcat itself, I believe that it would have to be done in a Valve which you should program yourself (using the existing Valves as a guideline). The Valve could check on the request origin IP address, and either let the request go through unchanged (for your IP address), or change it to target maintenance.html (for all other IPs), depending on some condition that you could change dynamically (for example, whether a given flag file exists on the filesystem). If it is not in a Valve (which is involved before the request is attributed to a webapp), then you would have to do this in a servlet filter configured to run in every webapp. But since I am not a Tomcat or Java specialist, my own preference would be to do this at the level of a front-end webserver like Apache httpd. In normal circumstances, all requests get forwarded to Tomcat (via mod_proxy_http, mod_proxy_ajp or mod_jk). Whenever the maintenance flag is set at the Apache httpd level, it does not proxy anymore to Tomcat (except for your IP), but returns your maintenance.html page. Being myself more of a perl and mod_perl programmer, and since I am already running Apache httpd front-ends to all my Tomcats, I use a custom mod_perl module to do exactly that kind of thing. Apache httpd can have its configuration reloaded gracefully without stopping Apache httpd. So you could probably do this without mod_perl, using an alternative httpd.conf configuration file and conditional rewrite rules. I just created a custom mod_perl module because it was fun. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat and DB oracle problem - only in higher versions
Does this help? https://forums.oracle.com/forums/thread.jspa?threadID=279238
RE: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
So, I ran with JVM option -verbose:class Then I requested a jsp from app1 and the console printed: ... [Loaded javax.el.ExpressionFactory from file:/C:/apache-tomcat-7.0.27/lib/el-api.jar] [Loaded org.apache.jasper.runtime.JspApplicationContextImpl from file:/C:/sandpit-28/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/app2/WEB-INF/lib/jsp-2.1-6.1.14.jar] [Loaded javax.el.ELContext from file:/C:/apache-tomcat-7.0.27/lib/el-api.jar] [Loaded org.apache.jasper.runtime.ELContextImpl from file:/C:/sandpit-28/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/app2/WEB-INF/lib/jsp-2.1-6.1.14.jar] ... This seems to indicate that the class is being loaded by app1 from app2/WEB-INF/lib/jsp-2.1-6.1.14.jar. No? Dale