Re: Tomcat and Chunked Transfer-Encoding
Hi, We still have this issue open. The problem is happening from time to time. I have some wireshark logging. can this help you to further investigate? Walter From: Konstantin Kolinko knst.koli...@gmail.com To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 19:58 Subject:Re: Tomcat and Chunked Transfer-Encoding 2014-02-03 Mark Thomas ma...@apache.org: On 03/02/2014 12:46, walter.heesterm...@toyota-europe.com wrote: I can't reproduce it with simple web application, it happens in one of our applications, SDL WorldServer application which we bought for translations. Even there the issue is random. 1. When response mixups happen, the first thing I would recommend is to set the following system property (you can add it to catalina.properties file): apache.catalina.connector.RECYCLE_FACADES=true Documentation: http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Security That will make your configuration more secure (at price of some performance) and will raise the chances that meddling with requests/response objects outside of their lifecycle would not go unnoticed. Then look for any odd messages in the log files. E.g. attempts to write to a closed stream, or an IllegalStateException, etc A known culprit is javax.imageio.ImageIO API http://wiki.apache.org/tomcat/FAQ/KnownIssues#ImageIOIssues So far it looks like an application issue, as Mark mentioned. 2. The convention on this mailing list is to do not top-post. http://tomcat.apache.org/lists.html#tomcat-users - 6. 3. What connector implementation are you using? HTTP/AJP? BIO/NIO/APR? I guess that you use HTTP and are behind an HTTP proxy. 4. Do you use any Asynchronous IO, Comet, WebSockets (e.g. via Atmosphere framework)? 5. In your traffic snippet, does that HTML response match the request, or a previous request? What generates those scrollTo script fragments? 6. Note that you can configure AccessLogValve to log your thread name (%I), http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
Tomcat and Chunked Transfer-Encoding
Hi, Is there something we can enable on the tomcat level to have more logging for this issue, to be able to see if the problem is related to application or the tomcat? Regards Walter From: walter.heesterm...@toyota-europe.com To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 14:12 Subject:Re: Tomcat and Chunked Transfer-Encoding We don't have the source code Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 13:50 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 12:46, walter.heesterm...@toyota-europe.com wrote: I can't reproduce it with simple web application, it happens in one of our applications, SDL WorldServer application which we bought for translations. Even there the issue is random. Do the affected requests pass through any filters? Do you have the source code for those filters? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately. This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
Re: Tomcat and Chunked Transfer-Encoding
Added apache.catalina.connector.RECYCLE_FACADES=true Let's see what this gives. Walter From: Konstantin Kolinko knst.koli...@gmail.com To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 19:58 Subject:Re: Tomcat and Chunked Transfer-Encoding 2014-02-03 Mark Thomas ma...@apache.org: On 03/02/2014 12:46, walter.heesterm...@toyota-europe.com wrote: I can't reproduce it with simple web application, it happens in one of our applications, SDL WorldServer application which we bought for translations. Even there the issue is random. 1. When response mixups happen, the first thing I would recommend is to set the following system property (you can add it to catalina.properties file): apache.catalina.connector.RECYCLE_FACADES=true Documentation: http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Security That will make your configuration more secure (at price of some performance) and will raise the chances that meddling with requests/response objects outside of their lifecycle would not go unnoticed. Then look for any odd messages in the log files. E.g. attempts to write to a closed stream, or an IllegalStateException, etc A known culprit is javax.imageio.ImageIO API http://wiki.apache.org/tomcat/FAQ/KnownIssues#ImageIOIssues So far it looks like an application issue, as Mark mentioned. 2. The convention on this mailing list is to do not top-post. http://tomcat.apache.org/lists.html#tomcat-users - 6. 3. What connector implementation are you using? HTTP/AJP? BIO/NIO/APR? I guess that you use HTTP and are behind an HTTP proxy. 4. Do you use any Asynchronous IO, Comet, WebSockets (e.g. via Atmosphere framework)? 5. In your traffic snippet, does that HTML response match the request, or a previous request? What generates those scrollTo script fragments? 6. Note that you can configure AccessLogValve to log your thread name (%I), http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
Tomcat and Chunked Transfer-Encoding
Hi, We have some weird behaviopur with one of our applications using apache-tomcat-6.0.37. This is the report of the newtork engineer: The application (or app server - apache/coyote) is returning a response with Chunked Transfer-Encoding, but is sending the first chunks before giving the http headers (that defines the chunk-encoding). The result is that the client receives a response stating by the definition on the chunk lenght (7a5), and as the header Content-Encoding has not been received, that length definition is interpreted as response characters. Here is a dump of the communication between TARS Reverse Proxy and the Back-end. (You may notice the response headers - 200 OK - after the first chunk (in blue, starting by 7a5, the length in HEX ) See attached screenshot tcpstream.jpg. Regards Walter This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Chunked Transfer-Encoding
Hi, I have requested the trext format. In the meantime, how can I disable the 'Chunked Transfer-Encoding' inside Tomcat server? Regards Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 11:15 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 09:34, walter.heesterm...@toyota-europe.com wrote: Hi, We have some weird behaviopur with one of our applications using apache-tomcat-6.0.37. This is the report of the newtork engineer: /The application (or app server - apache/coyote) is returning a response with Chunked Transfer-Encoding, but is sending the first chunks before giving the http headers (that defines the chunk-encoding). That strikes me as pretty unlikely given the length of time 6.0.x has been released and the lack of similar reports. It may be possible if the application is doing something it shouldn't, like holding on to a reference to a response object and re-using it across multiple requests. The result is that the client receives a response stating by the definition on the chunk lenght (7a5), and as the header Content-Encoding has not been received, that length definition is interpreted as response characters. Here is a dump of the communication between TARS Reverse Proxy and the Back-end. (You may notice the response headers - 200 OK - after the first chunk (in blue, starting by 7a5, the length in HEX )/ See attached screenshot tcpstream.jpg. This list strips most attachments. Just put the plain text of the HTTP request and response headers in the body of your e-mail. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
Re: Tomcat and Chunked Transfer-Encoding
If it can't be disabled, who is then generating the issue, can it be tomcat issue or issue application relatd, not using correct response? Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 12:10 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 10:47, walter.heesterm...@toyota-europe.com wrote: Hi, I have requested the trext format. In the meantime, how can I disable the 'Chunked Transfer-Encoding' inside Tomcat server? You can't. Mark Regards Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 11:15 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 09:34, walter.heesterm...@toyota-europe.com wrote: Hi, We have some weird behaviopur with one of our applications using apache-tomcat-6.0.37. This is the report of the newtork engineer: /The application (or app server - apache/coyote) is returning a response with Chunked Transfer-Encoding, but is sending the first chunks before giving the http headers (that defines the chunk-encoding). That strikes me as pretty unlikely given the length of time 6.0.x has been released and the lack of similar reports. It may be possible if the application is doing something it shouldn't, like holding on to a reference to a response object and re-using it across multiple requests. The result is that the client receives a response stating by the definition on the chunk lenght (7a5), and as the header Content-Encoding has not been received, that length definition is interpreted as response characters. Here is a dump of the communication between TARS Reverse Proxy and the Back-end. (You may notice the response headers - 200 OK - after the first chunk (in blue, starting by 7a5, the length in HEX )/ See attached screenshot tcpstream.jpg. This list strips most attachments. Just put the plain text of the HTTP request and response headers in the body of your e-mail. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
Re: Tomcat and Chunked Transfer-Encoding
Here the text format of the traffic GET /ws/ws_ext?servlet=upload_file_project_attributesfileAttr=CompletedDTPCaptionKitproject=30452token=1358616358random=0.5308450920567584 HTTP/1.1 Host: td3worldserverlb.toyota-europe.com Accept: text/html, application/xhtml+xml, */* Accept-Language: nl-NL User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0) Accept-Encoding: gzip, deflate DNT: 1 Cookie: ACE_COOKIE=R660302447; TD3World=R760446058 SM_TRANSACTIONID: =?UTF-8?B?MGE2NDA2MDEtNDAzMy01MjdjYzlkMy0wMDBhLTJjMWI0NjJi?= SM_AUTHTYPE: =?UTF-8?B?QXV0bw==?= SM_SDOMAIN: =?UTF-8?B?LnRveW90YS1ldXJvcGUuY29t?= X-Forwarded-For: 77.60.99.113 X-Forwarded-Host: mytechdoc.toyota-europe.com X-Forwarded-Server: mytechdoc.toyota-europe.com Connection: Keep-Alive 7a5 html head titleIdiom WorldServer - File Upload Page/title link rel='stylesheet' href='style.css' type='text/css' script language=JavaScript src='general.js'/script script language=JavaScript src='ips.js'/script script language=JavaScript src='ws_ext?servlet=include_proxyfileName=ips.jstoken=1358616358'/script script language=JavaScriptlocation.href=location.href+'customopenertoken='+ getOpenerToken();/script /head body onload=requestFocus('uploadedFile') form style=width:100%; height: 100% method=post table width=100% height=100% cellpadding=5tr height=1%td class=popup_dialog_headerFile Upload/td/trtr height=100%td valign=top iClick on Browse button to browse and select the file to upload. /ipinput name=uploadedFile value= type=file input name=fileAttr value=CompletedDTPCaptionKit type=hidden input name=token value=1358616358 type=hidden input name=nextStep value=upload type=hidden script language=Javascript document.forms[0].encoding='multipart/form-data'; /script /td/tr tr height=1%tdinput name=ok value=nbsp;nbsp;OKnbsp;nbsp; onclick=javascript: disabled=1; doSubmit('ok'); type=button nbsp;input name=cancel value=Cancel onclick=self.close(); type=button /td/tr/tablescript language=javascriptself.focus()/scriptinput type=hidden name=formAction value=ws_ext?servlet=upload_file_project_attributesamp;fileAttr=CompletedDTPCaptionKitamp;project=30452amp;token=1358616358amp;random=6674 input type=hidden name=submittedBy value= input type=hidden name=methodUsed value=GET script language=javascript function doSubmit(name) { document.forms[0].action=document.forms[0].formAction.value; document.forms[0].target='_self'; document.forms[0].submittedBy.value=name; document.forms[0].submit(); } /script /form /body /html 0 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Fri, 08 Nov 2013 11:24:05 GMT 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script 45 . script language=javascriptwindow.scrollTo(0, 1);/script Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 12:10 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 10:47, walter.heesterm...@toyota-europe.com wrote: Hi, I have requested the trext format. In the meantime, how can I disable the 'Chunked Transfer-Encoding' inside Tomcat server? You can't. Mark Regards Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 11:15 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 09:34, walter.heesterm...@toyota-europe.com wrote: Hi, We have some weird behaviopur with one of our applications using apache-tomcat-6.0.37. This is the report of the newtork engineer: /The application (or app server - apache/coyote) is returning a response with Chunked Transfer-Encoding, but is sending the first chunks before giving the http headers (that defines the chunk-encoding). That strikes me as pretty unlikely given the length of time 6.0.x has been released and the lack of similar reports. It may be possible if the application is doing something it shouldn't, like holding on to a reference to a response object and re-using it across multiple requests. The result is that the client receives a response stating by the definition on the chunk lenght (7a5), and as the header Content-Encoding has not been received, that length definition is interpreted as response characters. Here is a dump of the communication between TARS Reverse Proxy and the Back-end. (You
Re: Tomcat and Chunked Transfer-Encoding
I can't reproduce it with simple web application, it happens in one of our applications, SDL WorldServer application which we bought for translations. Even there the issue is random. Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 13:43 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 11:21, walter.heesterm...@toyota-europe.com wrote: If it can't be disabled, who is then generating the issue, can it be tomcat issue or issue application relatd, not using correct response? As per my original response, this is most likely an application issue. Can you reproduce this with a simple web application (ideally a single Servlet or JSP) that demonstrates the issue on a clean Tomcat installation? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
Re: Tomcat and Chunked Transfer-Encoding
We don't have the source code Walter From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org, Date: 03/02/2014 13:50 Subject:Re: Tomcat and Chunked Transfer-Encoding On 03/02/2014 12:46, walter.heesterm...@toyota-europe.com wrote: I can't reproduce it with simple web application, it happens in one of our applications, SDL WorldServer application which we bought for translations. Even there the issue is random. Do the affected requests pass through any filters? Do you have the source code for those filters? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.
AUTO: Walter Heestermans/TMME is out of the office. (returning 22/07/2013)
I am out of the office until 22/07/2013. I will respond to your message as soon as possible. For urgent issues, contact WebSphere Support group for Java-WebSphere related activities or unix.admin group for Unix-WebSphere-Jetty related activities Note: This is an automated response to your message Re: Share info across different sessions servers sent on 6/07/2013 1:49:01. This is the only notification you will receive while this person is away. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6 and Windows Service
Implemented the listener and I can now start and stop the tomcat servers Thanks! Walter From: Jeffrey Janner jeffrey.jan...@polydyne.com To: 'Tomcat Users List' users@tomcat.apache.org, Date: 06/06/2013 15:31 Subject:RE: Tomcat 6 and Windows Service -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, June 05, 2013 8:04 AM To: Tomcat Users List Subject: RE: Tomcat 6 and Windows Service From: walter.heesterm...@toyota-europe.com [mailto:walter.heesterm...@toyota-europe.com] Subject: RE: Tomcat 6 and Windows Service I can set the following Java options -Dcom.sun.management.jmxremote.port=10150 The stop using shudown class is org.apache.catalina.startup.Bootstrap with argument stop, stays hanging because the java process to stop the service tries to connect port 10150; Initiating a stop creates another process which uses all of the options specified, thus creating the port conflict you're seeing. If you configure the ports using the JMX listener, only the server process will use them. http://tomcat.apache.org/tomcat-6.0- doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_- _org.apache.catalina.mbeans.JmxRemoteLifecycleListener You can also stop Tomcat by sending the process an appropriate signal, or running the shutdown.bat script (even when Tomcat is running as a service). The shutdown.bat script won't work if you set the shutdown port to -1. This appears to be the recommended practice for running as a Windows service, as it really isn't needed and limits the ability of a rogue user (non-admin) to shutdown the Tomcat service. Under Windows, you should really just use either the Services control panel, net start/stop at the command line, or the Monitor Tomcat application. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 and Windows Service
Hi, When I add the arguments to the startup arguments entry, and try to start the service start -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Then the following error is given WARNING: Bootstrap: command -Dcom.sun.management.jmxremote.authenticate=false does not exist. Tried conf/catalina.properties I just add the following to the file? -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false or com.sun.management.jmxremote.port=10150 com.sun.management.jmxremote.ssl=false com.sun.management.jmxremote.authenticate=false Nothing seems to work... Regards Walter From: Konstantin Kolinko knst.koli...@gmail.com To: Tomcat Users List users@tomcat.apache.org, Date: 03/06/2013 13:32 Subject:Re: Tomcat 6 and Windows Service 2013/6/3 walter.heesterm...@toyota-europe.com Hi, I'm running tomcat as Windows service. Now I like to add JMX support to the process: -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Configuring the service added the above options to the Java options. The start is then working fine and JMX is working fine. But since I made this service the stop operation is not working anymore. When I run via console, then I see that the stop is complaining on port (used by JMX), already in use. This is propably the root cause of the stop not working. Is there a way to specify JVM arguments for only the start operation? The service wrapper comes from Apache Commons Daemon project. http://commons.apache.org/proper/commons-daemon/ You are better to ask there. The things that I would try: a) add those -D,.. to start arguments setting. (The one that contains a single argument start by default). Maybe it works, maybe not. b) add those properties to conf/catalina.properties file It would not work if JVM reads them at startup (before the Bootstrap class runs), but should work if it reads them at a later time. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6 and Windows Service
Not working neither, I think that Tomcat as a service is not using this Walter From: Urkens Jean-Pierre jean-pierre.urk...@devoteam.com To: Tomcat Users List users@tomcat.apache.org, Date: 05/06/2013 13:52 Subject:RE: Tomcat 6 and Windows Service Try creating a file $TOMCAT_HOME/bin/setenv.bat and include following line in it: set JAVA_OPTS=-Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Original Message- From: walter.heesterm...@toyota-europe.com [ mailto:walter.heesterm...@toyota-europe.com] Sent: Wednesday, June 05, 2013 1:35 PM To: Tomcat Users List Subject: Re: Tomcat 6 and Windows Service Hi, When I add the arguments to the startup arguments entry, and try to start the service start -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Then the following error is given WARNING: Bootstrap: command -Dcom.sun.management.jmxremote.authenticate=false does not exist. Tried conf/catalina.properties I just add the following to the file? -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false or com.sun.management.jmxremote.port=10150 com.sun.management.jmxremote.ssl=false com.sun.management.jmxremote.authenticate=false Nothing seems to work... Regards Walter From: Konstantin Kolinko knst.koli...@gmail.com To: Tomcat Users List users@tomcat.apache.org, Date: 03/06/2013 13:32 Subject:Re: Tomcat 6 and Windows Service 2013/6/3 walter.heesterm...@toyota-europe.com Hi, I'm running tomcat as Windows service. Now I like to add JMX support to the process: -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Configuring the service added the above options to the Java options. The start is then working fine and JMX is working fine. But since I made this service the stop operation is not working anymore. When I run via console, then I see that the stop is complaining on port (used by JMX), already in use. This is propably the root cause of the stop not working. Is there a way to specify JVM arguments for only the start operation? The service wrapper comes from Apache Commons Daemon project. http://commons.apache.org/proper/commons-daemon/ You are better to ask there. The things that I would try: a) add those -D,.. to start arguments setting. (The one that contains a single argument start by default). Maybe it works, maybe not. b) add those properties to conf/catalina.properties file It would not work if JVM reads them at startup (before the Bootstrap class runs), but should work if it reads them at a later time. 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: Tomcat 6 and Windows Service
Hi,, I can set the following Java options -Djava.util.logging.config.file=c:\Idiom\WorldServer\WorldServer-web\conf\logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -verbose:gc -Xloggc:\Idiom\WorldServer\WorldServer-web\logs\gc.log -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintCommandLineFlags -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=c:\Idiom\WorldServer\WorldServer-web\heapdumps -Djava.endorsed.dirs=c:\Idiom\apache-tomcat-6.0.37\endorsed -Dcatalina.base=c:\Idiom\WorldServer\WorldServer-web -Dcatalina.home=c:\Idiom\apache-tomcat-6.0.37 -Djava.io.tmpdir=c:\Idiom\WorldServer\WorldServer-web\temp -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false and then start the service, I can use jmx via tools like VisualVM. Startup class is org.apache.catalina.startup.Bootstrap with argument start. All fine. The stop using shudown class is org.apache.catalina.startup.Bootstrap with argument stop, stays hanging because the java process to stop the service tries to connect port 10150; but this is already in used. Stop hangs... Walter From: Walter Heestermans/IS/TME/BE/ToyotaEurope To: Tomcat Users List users@tomcat.apache.org, Date: 05/06/2013 14:18 Subject:RE: Tomcat 6 and Windows Service Not working neither, I think that Tomcat as a service is not using this Walter From: Urkens Jean-Pierre jean-pierre.urk...@devoteam.com To: Tomcat Users List users@tomcat.apache.org, Date: 05/06/2013 13:52 Subject:RE: Tomcat 6 and Windows Service Try creating a file $TOMCAT_HOME/bin/setenv.bat and include following line in it: set JAVA_OPTS=-Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Original Message- From: walter.heesterm...@toyota-europe.com [ mailto:walter.heesterm...@toyota-europe.com] Sent: Wednesday, June 05, 2013 1:35 PM To: Tomcat Users List Subject: Re: Tomcat 6 and Windows Service Hi, When I add the arguments to the startup arguments entry, and try to start the service start -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Then the following error is given WARNING: Bootstrap: command -Dcom.sun.management.jmxremote.authenticate=false does not exist. Tried conf/catalina.properties I just add the following to the file? -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false or com.sun.management.jmxremote.port=10150 com.sun.management.jmxremote.ssl=false com.sun.management.jmxremote.authenticate=false Nothing seems to work... Regards Walter From: Konstantin Kolinko knst.koli...@gmail.com To: Tomcat Users List users@tomcat.apache.org, Date: 03/06/2013 13:32 Subject:Re: Tomcat 6 and Windows Service 2013/6/3 walter.heesterm...@toyota-europe.com Hi, I'm running tomcat as Windows service. Now I like to add JMX support to the process: -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Configuring the service added the above options to the Java options. The start is then working fine and JMX is working fine. But since I made this service the stop operation is not working anymore. When I run via console, then I see that the stop is complaining on port (used by JMX), already in use. This is propably the root cause of the stop not working. Is there a way to specify JVM arguments for only the start operation? The service wrapper comes from Apache Commons Daemon project. http://commons.apache.org/proper/commons-daemon/ You are better to ask there. The things that I would try: a) add those -D,.. to start arguments setting. (The one that contains a single argument start by default). Maybe it works, maybe not. b) add those properties to conf/catalina.properties file It would not work if JVM reads them at startup (before the Bootstrap class runs), but should work if it reads them at a later time. 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: Tomcat 6 and Windows Service
Ok, I will use the following: 1. Start using the normal Services dialog 2. Stop using shutdown script Regards Walter From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org, Date: 05/06/2013 15:05 Subject:RE: Tomcat 6 and Windows Service From: walter.heesterm...@toyota-europe.com [ mailto:walter.heesterm...@toyota-europe.com] Subject: RE: Tomcat 6 and Windows Service I can set the following Java options -Dcom.sun.management.jmxremote.port=10150 The stop using shudown class is org.apache.catalina.startup.Bootstrap with argument stop, stays hanging because the java process to stop the service tries to connect port 10150; Initiating a stop creates another process which uses all of the options specified, thus creating the port conflict you're seeing. If you configure the ports using the JMX listener, only the server process will use them. http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener You can also stop Tomcat by sending the process an appropriate signal, or running the shutdown.bat script (even when Tomcat is running as a service). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 and Windows Service
Hi, I'm running tomcat as Windows service. Now I like to add JMX support to the process: -Dcom.sun.management.jmxremote.port=10150 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Configuring the service added the above options to the Java options. The start is then working fine and JMX is working fine. But since I made this service the stop operation is not working anymore. When I run via console, then I see that the stop is complaining on port (used by JMX), already in use. This is propably the root cause of the stop not working. Is there a way to specify JVM arguments for only the start operation? Please advise Walter