Re: Tomcat wont allow me to create files
Hi. Do not top-post. Follow the example of the previous person who answered your request. Elias Kopsiaftis wrote: On Mon, Feb 25, 2013 at 8:39 PM, Ben Stringer b...@burbong.com wrote: On 26/02/2013, at 12:14 PM, Elias Kopsiaftis yemi...@gmail.com wrote: I am running a webapp on Tomcat 7 and I am using log4j for logging. However, log4j cannot create a log file and Im getting a permission denied error in the catalina.out file. I am runnning on linux, and made sure that the current working directory(which I got by printing it from within the application), /var/lib/tomcat7, and all its subdirectories were in the tomcat7 group, which should give the web app permissions to create files, but its not working. any suggestions? Hi Elias, That directory will also need group write permission set. Best way to work through this problem is to sudo to the userid that will be running tomcat, then try and create a file in that directory from the shell. If it is the group write that is missing, this command will add it: chmod g+w /var/lib/tomcat7 But that is not where you should be writing logs. /var/log is a conventional place to keep logs. What is your log4j configuration? Hi Ben, I didnt mention that but I did check that write permissions were on. Currently I dont have a log4j configuration. I am just trying to get it to work. You need to check where log4j is (trying to) writing its logfiles. That is part of your log4j configuration. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat-7.0.35-windows-x86 ON 64 bit UNIX
dku...@ccilindia.co.in wrote: Hi, I have downloaded apache-tomcat-7.0.35-windows-x86.zip and runiing it on 64 bit UNIX machine and it is working fine. Is it OK to run x86 setup on 64 bit UNIX machine? Please reply. Server version: Apache Tomcat/7.0.35 Server built: Jan 10 2013 10:52:49 Server number: 7.0.35.0 OS Name:HP-UX OS Version: B.11.31 Architecture: IA64N JVM Version:1.7.0.04-jinteg_2012_11_21_09_34-b00 JVM Vendor: Hewlett-Packard Company That is a bit unconventional, to say the least. But Tomcat being java, and java being happy to run wherever there is a proper JVM running, it can work, as you just demonstrated. Now the real question is : given that your machine is Unix, and that there are Tomcat versions available on the site that are specifically indicated for that platform, why did you download and install a Windows version ? And given that your machine is 64-bit, why then a 32-bit version ? just to be original ? Tip : do not try to run any of the .exe files or .bat scripts. (But if you do, and it also works, let us know.) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
On Fri, Feb 22, 2013 at 8:44 PM, André Warnier a...@ice-sa.com wrote: chris derham wrote: The first part (running programs which require a Window) usually doesn't, because those programs are usually such that they do not work as a service. It is not usually only the fact that they need a console, but they need a whole bunch of other environment which a Service does not provide. It will only work when the other program is specifically designed to work that way. For example, OpenOffice in headless mode works fine. But MS-Office programs do not, and this mode of operation is explicitly indicated by Microsoft as not recommended and not supported. So summarising discussion so far 1) services generally run headless with no interaction with desktop 2) you can run a service with interaction with desktop enabled 3) this doesn't work under Windows Server 2008 and later. So questions to OP a) did the link I sent help? No the access to network resources is an issue when allowed to interact with desktop b) what programs are you trying to run that open windows on desktop? its a totally different application whose modules we are trying to access from our application c) what version of os are you running under? Its windows XP I would add another one : d) can you run instead Tomcat in a command window (via setup.bat), or is that not possible ? (I do this kind of thing under similar circumstances, using a virtual machine so that there is no physical console accessible). our client does not wish to have an window opened in the application. --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org We have made an online application and have technically developed an offline application using Tomcat So I guess we don't have a solution I have another related question, can we run Tomcat using javaw instead of java , this causes no command window to appear . but there are some other issues. is it Ok to do it like this?
Re: Nessus scan claims vulnerability in Tomcat 6
Hi Mark, thank you for the feedback! On Tue, Feb 26, 2013 at 2:27 AM, Mark Thomas ma...@apache.org wrote: On 25/02/2013 08:42, Robert Klemme wrote: Hi there, I have been confronted with a Nessus scan result which claims vulnerability to exploit TLS CRIME. Plugin 62565 allegedly has found this and the report states: The remote service has one of two configurations that are known to be required for the CRIME attack: - SSL / TLS compression is enabled. It is this one. That's what I figured. - TLS advertises the SPDY protocol earlier than version 4. There is no spdy support in any released Tomcat version. OK, that confirms what I was able to dig up. We have in server.xml: Connector SSLCertificateFile=/path SSLCipherSuite=*** protocol=HTTP/1.1 connectionTimeout=2 SSLCertificateKeyFile=/path secure=true scheme=https maxThreads=500 port=4712 maxSavePostSize=0 server=*** SSLProtocol=TLSv1 maxPostSize=2048 URIEncoding=UTF-8 SSLEnabled=true / That is the APR/native HTTPS connector. So one solution would be to remove APR lib from the system. Another one would be to change above to Connector SSLCertificateFile=/path SSLCipherSuite=*** protocol=org.apache.coyote.http11.Http11Protocol connectionTimeout=2 SSLCertificateKeyFile=/path secure=true scheme=https maxThreads=500 port=4712 maxSavePostSize=0 server=*** SSLProtocol=TLSv1 maxPostSize=2048 URIEncoding=UTF-8 SSLEnabled=true / and add all necessary configurations to make that work. And I guess a third option is to use export OPENSSL_NO_DEFAULT_ZLIB=1 before starting the JVM. Now, what to make of this? To me it seems only compression could be the culprit but is there any other way to enable compression for HTTPS than to include compression? Or does the TLS negotiation ignore setting compression? I could not find indication of any option to control compression in the Javadocs http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/package-summary.html You won't. My recollection is that Java does not support compression. OK, then it's no surprise that they do not mention it in the Javadocs. :-) APR/native does. An option was recently added. See: https://issues.apache.org/bugzilla/show_bug.cgi?id=54324 I found that but wasn't aware that this is actually used in Tomcat. There is no 6.0.x release with the necessary options yet. Do you know whether there will be? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 doesn't start on Windows
Hi list I have been trying to get this to work by looking a lot on similar situations around the net but nothing works. My setup is as follows: * Tomcat 7.0.37 installed via the Windows service installer package * Windows 2003 server * Java/JRE 1.7.0_15 * Using C:\Program Files\Java\jre7\bin\server\jvm.dll So the problem is that the Tomcat7 service won't start from the service control panel. I just get a Could not start … and Error 1053: The service did not respond …. There's nothing in the Tomcat logs (both stdout and stderr are empty). The event logs shows a generic service control manager error. But - If I start the service from the command line by typing tomcat7 //TS/Tomcat7 the thing works fine. Also if I change the service user account to the Administrator account I get a different error by startup Error 1068: The dependency service or group failed to start. Any ideas? /Rune - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Nessus scan claims vulnerability in Tomcat 6
On 26/02/2013 03:09, Robert Klemme wrote: On Tue, Feb 26, 2013 at 2:27 AM, Mark Thomas ma...@apache.org wrote: On 25/02/2013 08:42, Robert Klemme wrote: I have been confronted with a Nessus scan result which claims vulnerability to exploit TLS CRIME. Plugin 62565 allegedly has found this and the report states: We have in server.xml: Connector SSLCertificateFile=/path SSLCipherSuite=*** protocol=HTTP/1.1 connectionTimeout=2 SSLCertificateKeyFile=/path secure=true scheme=https maxThreads=500 port=4712 maxSavePostSize=0 server=*** SSLProtocol=TLSv1 maxPostSize=2048 URIEncoding=UTF-8 SSLEnabled=true / That is the APR/native HTTPS connector. So one solution would be to remove APR lib from the system. Yes, although you will see performance for SSL drop. Another one would be to change above to Connector SSLCertificateFile=/path SSLCipherSuite=*** protocol=org.apache.coyote.http11.Http11Protocol connectionTimeout=2 SSLCertificateKeyFile=/path secure=true scheme=https maxThreads=500 port=4712 maxSavePostSize=0 server=*** SSLProtocol=TLSv1 maxPostSize=2048 URIEncoding=UTF-8 SSLEnabled=true / and add all necessary configurations to make that work. And I guess a third option is to use Yes, with the same performance issue. export OPENSSL_NO_DEFAULT_ZLIB=1 before starting the JVM. I don't know if OpenSSL will honour that. APR/native does. An option was recently added. See: https://issues.apache.org/bugzilla/show_bug.cgi?id=54324 I found that but wasn't aware that this is actually used in Tomcat. SSLDisableCompression on the APR connector as of 7.0.37 There is no 6.0.x release with the necessary options yet. Do you know whether there will be? There will be but I'm not aware of any planned timing at this point. The changelog isn't that long but it has been a while since the last release so I guess we should start thinking about it. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wont allow me to create files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 2/26/13 12:02 AM, André Warnier wrote: Hi. Do not top-post. Follow the example of the previous person who answered your request. Elias Kopsiaftis wrote: On Mon, Feb 25, 2013 at 8:39 PM, Ben Stringer b...@burbong.com wrote: On 26/02/2013, at 12:14 PM, Elias Kopsiaftis yemi...@gmail.com wrote: I am running a webapp on Tomcat 7 and I am using log4j for logging. However, log4j cannot create a log file and Im getting a permission denied error in the catalina.out file. I am runnning on linux, and made sure that the current working directory(which I got by printing it from within the application), /var/lib/tomcat7, and all its subdirectories were in the tomcat7 group, which should give the web app permissions to create files, but its not working. any suggestions? Hi Elias, That directory will also need group write permission set. Best way to work through this problem is to sudo to the userid that will be running tomcat, then try and create a file in that directory from the shell. If it is the group write that is missing, this command will add it: chmod g+w /var/lib/tomcat7 But that is not where you should be writing logs. /var/log is a conventional place to keep logs. What is your log4j configuration? Hi Ben, I didnt mention that but I did check that write permissions were on. Currently I dont have a log4j configuration. I am just trying to get it to work. You need to check where log4j is (trying to) writing its logfiles. That is part of your log4j configuration. Also, Elias, are you running under a SecuritManager? If so, you'll have to adjust permissions in your policy file. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEs0CAACgkQ9CaO5/Lv0PCPgQCgucSbG2gpDLf9pLiivDtp05Lz 2UUAni1IaI1HPV66qjPTCs58ZDlxD4+w =YCvx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat-7.0.35-windows-x86 ON 64 bit UNIX
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Deepak, On 2/25/13 10:27 PM, dku...@ccilindia.co.in wrote: Hi, I have downloaded apache-tomcat-7.0.35-windows-x86.zip and runiing it on 64 bit UNIX machine and it is working fine. Is it OK to run x86 setup on 64 bit UNIX machine? Please reply. Server version: Apache Tomcat/7.0.35 Server built: Jan 10 2013 10:52:49 Server number: 7.0.35.0 OS Name:HP-UX OS Version: B.11.31 Architecture: IA64N JVM Version: 1.7.0.04-jinteg_2012_11_21_09_34-b00 JVM Vendor: Hewlett-Packard Company Let me guess... you wanted to run Tomcat as 32-bit so you downloaded the only 32-bit thing you could find on the Tomcat download page? Well, you've failed: the 32-bit in the filename refers to the tools that work with Microsoft Windows only. Everything else is all Java, so you are at the mercy of your JVM. Your JVM appears to be 64-bit (IA64 -- good luck!) so you will be running in 64-bit mode, anyway. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEs0MoACgkQ9CaO5/Lv0PDZoQCfQdO53DMP7Hv2/FWdg0mxOswj F/EAoJ0TZlzUO9pbpJ4a349aLI4xKgVx =nxkq -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Nessus scan claims vulnerability in Tomcat 6
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 2/26/13 7:04 AM, Mark Thomas wrote: On 26/02/2013 03:09, Robert Klemme wrote: I found that but wasn't aware that this is actually used in Tomcat. SSLDisableCompression on the APR connector as of 7.0.37 There is no 6.0.x release with the necessary options yet. Do you know whether there will be? There will be but I'm not aware of any planned timing at this point. The changelog isn't that long but it has been a while since the last release so I guess we should start thinking about it. This has been proposed for Tomcat 6.0.x and there are 2 votes for it thus far. Once we get another vote, someone (probably I) will commit the patch and then you just have to wait for another release. 6.0.x releases are less frequent than 7.0.x because Tomcat 6 is ... mature. I'm in Portland with several other Tomcat devs and I'm sure I can a) get someone else to vote for my patch and b) convince someone to roll a release in the near future. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEs0iEACgkQ9CaO5/Lv0PCBYgCfW4BvnsZQHrJ8JAQvSQuryGzH g7oAniHyy2NoH/KO/iVjpsPtAHjmjYY9 =8+mX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Nessus scan claims vulnerability in Tomcat 6
On Tue, Feb 26, 2013 at 4:04 PM, Mark Thomas ma...@apache.org wrote: On 26/02/2013 03:09, Robert Klemme wrote: So one solution would be to remove APR lib from the system. Yes, although you will see performance for SSL drop. Yes, of course. That's not important in our case. export OPENSSL_NO_DEFAULT_ZLIB=1 before starting the JVM. I don't know if OpenSSL will honour that. I'll let you know once I find out. There is no 6.0.x release with the necessary options yet. Do you know whether there will be? There will be but I'm not aware of any planned timing at this point. The changelog isn't that long but it has been a while since the last release so I guess we should start thinking about it. Good! Thanks for the update! Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk how to add JK_WORKER_NAME to http-header
Hello, i am trying to find an easy way to determine from the http-client side, which AJP13-worker handled my request. So my basic idea is to use mod_header to add mod_jk`s env-variable JK_WORKER_NAME to the Header of the http-response. I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e ... All my previous attempts resulted in http-responses looking like this: HTTP/1.1 200 OK Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/ Date: Tue, 26 Feb 2013 18:25:31 GMT Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22 OpenSSL/0.9.8x DAV/2 Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/ Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) ETag: 838b4ae2 Content-Length: 8043 X-Server-Ip: 110.160.11.26 TC-Server: (null) Content-Type: text/html;charset=utf-8 Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? Could anyone please help? Thanks! Jochen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6 j_security_check any parameter / sessions variable on failure?
On 2/25/2013 2:54 AM, Tanmoy Chatterjee wrote: Hello, Tech Stack: Tomcat: 6.0.35 Java: 1.6.0_18 OS: RHEL 5.3 I am using j_security_check (JNDIRealm - LDAP authentication). On failure I am sending the user to a common error.jsp in the application. On successful authentication of-course the page requested is displayed. The problem is that the error.jsp is called from the application as well if there are any errors/ exceptions in some functionality (I want to avoid writing any new error pages in my application). In the error.jsp, is there any way to know that the failure is because of j_security_check and not from anywhere else i.e does tomcat add any separate sessions parameter after unsuccessful j_security_check authentication which I can use for displaying proper error message? Thanks, Tanmoy Hi, Tanmoy- javax.servlet.error.request_uri is one attribute that is set on the request. Further information is available here: http://tomcat.apache.org/tomcat-6.0-doc/api/constant-values.html Also, I'd suggest taking a look at the Error Handling chapter in the Java Servlet Specification. -Terence Bandoian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 doesn't start on Windows
On Tue, Feb 26, 2013 at 7:04 AM, Rune Stilling s...@rdfined.dk wrote: Hi list I have been trying to get this to work by looking a lot on similar situations around the net but nothing works. My setup is as follows: * Tomcat 7.0.37 installed via the Windows service installer package * Windows 2003 server * Java/JRE 1.7.0_15 * Using C:\Program Files\Java\jre7\bin\server\jvm.dll I'm currently running tomcat7.0.37 (since I'm running TomEE 1.6.0-snapshot) on Windows Server 2008 R2 64bit, but when I was running tomcat7/tomee on Windows Server 2003 32-bit, I was running Client JVM instead of Server JVM (I wish I knew about Server JVM back in those days...2 or 3 months ago), but myself and endusers were satisfied with the performance of the web app running via tomcat7/tomee. So the problem is that the Tomcat7 service won't start from the service control panel. I just get a Could not start … and Error 1053: The service did not respond …. I experienced that Error 1053 last night (early this morning), but it was due to my attempt trying to get OpenOffice.org running as a service 'without' AlwaysUp software, but AlwaysUp software will definitely keep that software up and running. So, with that said, I will share my experience. tomcat7 (for windows) come bundled with tomcat7/bin/tomcat7w.exe, which is all you need (and which may be recommended by all/others) to start/stop and to configure the windows service. When installing tomcat7 as windows service for the first time, I have found success doing the following: 1. open Command Prompt window 2. cd \tomcat7\bin 3. service.bat install tomcat7 4. Create a shortcut to tomcat7w.exe, and copy the shortcut to your desktop (or Start menu, that's my preference) 5. Open tomcat7w.exe via your shortcut, Command Prompt, or whatever your preference, and go to Java tab, and configure the java options for the windows service, accordingly. There's nothing in the Tomcat logs (both stdout and stderr are empty). The event logs shows a generic service control manager error. But - If I start the service from the command line by typing tomcat7 //TS/Tomcat7 the thing works fine. Also if I change the service user account to the Administrator account I get a different error by startup Error 1068: The dependency service or group failed to start. It is not necessary (at all) to set Administrator. I always accept the default 'login' settings for tomcat7 windows service. I'm sure you can do the same, unless you have specific requirement to change service user account to Administrator. Any ideas? /Rune - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I saw your email earlier this morning, but waited to see if anyone else would respond. No response, so I took the liberty to offer/share my experience/opinion/recommendation.
Re: mod_jk how to add JK_WORKER_NAME to http-header
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jochen, On 2/26/13 10:41 AM, Jochen Wißmann wrote: I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e This looks like it should work from my brief review of the documentation. TC-Server: (null) Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? The httpd documentation says so. Can you give us more of your httpd.conf? Perhaps the Header directive isn't in a place where the environment variable has been set, goes out of scope, etc. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEtK1AACgkQ9CaO5/Lv0PAdmwCgvDx2p5ZNdLAU6E7xXIg4uuu6 tCcAoLWtF78/eXNDXvmV2FeR6TIOq0qj =f/sj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6 j_security_check any parameter / sessions variable on failure?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tanmoy, On 2/25/13 12:54 AM, Tanmoy Chatterjee wrote: Hello, Tech Stack: Tomcat: 6.0.35 Java: 1.6.0_18 OS: RHEL 5.3 I am using j_security_check (JNDIRealm - LDAP authentication). On failure I am sending the user to a common error.jsp in the application. On successful authentication of-course the page requested is displayed. The problem is that the error.jsp is called from the application as well if there are any errors/ exceptions in some functionality (I want to avoid writing any new error pages in my application). In the error.jsp, is there any way to know that the failure is because of j_security_check and not from anywhere else i.e does tomcat add any separate sessions parameter after unsuccessful j_security_check authentication which I can use for displaying proper error message? You could try one of the following: 1. form-error-page/error.jsp?reason=auth/form-error-page Then, your JSP can check the reason request parameter. I'm not sure if this works the way I'd expect. 2. Write a new login-error.jsp that looks like this: ? request.setAttribute(login-failed, Boolean.TRUE); ? jsp:include page=error.jsp % This goes roughly the same thing, but requires a separate error file. But at least you get to re-use all of your error.jsp page. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEtLIYACgkQ9CaO5/Lv0PD3NwCfR8wWIG6tJ/4ZUv8vlir0gAgI kSQAn0fisvdv4Z20OCV9KZ+/K94QJbXv =LzyF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 doesn't start on Windows
Rune Stilling wrote: Hi list I have been trying to get this to work by looking a lot on similar situations around the net but nothing works. My setup is as follows: * Tomcat 7.0.37 installed via the Windows service installer package * Windows 2003 server * Java/JRE 1.7.0_15 * Using C:\Program Files\Java\jre7\bin\server\jvm.dll So the problem is that the Tomcat7 service won't start from the service control panel. I just get a Could not start … and Error 1053: The service did not respond …. There's nothing in the Tomcat logs (both stdout and stderr are empty). The event logs shows a generic service control manager error. But - If I start the service from the command line by typing tomcat7 //TS/Tomcat7 the thing works fine. Also if I change the service user account to the Administrator account I get a different error by startup Error 1068: The dependency service or group failed to start. Any ideas? Hi. Running Tomcat as a Service under Windows, starting from the standard tomcat.apache.org Windows installer package, is something that just works for everyone, all the time. So it is probable that you are not getting any answers here, because nobody really has any idea why Tomcat would not start as a Service in your case in particular. Are you really running Tomcat as is, or did you fiddle with the configuration, or add some non-Tomcat component before you tried to start it ? Also your error The dependency service or group failed to start is rather puzzling, because to my knowledge the Tomcat Service does not depend on any other. It is easy to check, at least under Window XP. Unfortunately the location of this is something that the MS geniuses seem to take a vicious delight in changing in each new Windows version; but to get back to Windows XP at least : click Start..Run and enter services.msc. You will see a list of services. Find Tomcat, right-click on it a choose Properties. There should be a tab dependencies. In my case it's empty - and I believe that is how it should be. If in your case it isn't, that might give you a first idea of what is going on. A second source of ideas for what is going on may come from this Tomcat FAQ article : http://wiki.apache.org/tomcat/FAQ/Windows#Q11 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk how to add JK_WORKER_NAME to http-header
On 27/02/2013 5:42 AM, Jochen Wißmann jochen.wissm...@kepol.com wrote: Hello, i am trying to find an easy way to determine from the http-client side, which AJP13-worker handled my request. So my basic idea is to use mod_header to add mod_jk`s env-variable JK_WORKER_NAME to the Header of the http-response. I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e I think this should be Header add TC-Server %{JK_WORKER_NAME}n Please paste here the worker.properties file too. ... All my previous attempts resulted in http-responses looking like this: HTTP/1.1 200 OK Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/ Date: Tue, 26 Feb 2013 18:25:31 GMT Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22 OpenSSL/0.9.8x DAV/2 Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/ Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) ETag: 838b4ae2 Content-Length: 8043 X-Server-Ip: 110.160.11.26 TC-Server: (null) Content-Type: text/html;charset=utf-8 Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? Could anyone please help? Thanks! Jochen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk how to add JK_WORKER_NAME to http-header
On 26.02.2013 23:52, Igor Cicimov wrote: On 27/02/2013 5:42 AM, Jochen Wißmann jochen.wissm...@kepol.com wrote: Hello, i am trying to find an easy way to determine from the http-client side, which AJP13-worker handled my request. So my basic idea is to use mod_header to add mod_jk`s env-variable JK_WORKER_NAME to the Header of the http-response. I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e I think this should be Header add TC-Server %{JK_WORKER_NAME}n Please paste here the worker.properties file too. ... All my previous attempts resulted in http-responses looking like this: HTTP/1.1 200 OK Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/ Date: Tue, 26 Feb 2013 18:25:31 GMT Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22 OpenSSL/0.9.8x DAV/2 Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/ Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) ETag: 838b4ae2 Content-Length: 8043 X-Server-Ip: 110.160.11.26 TC-Server: (null) Content-Type: text/html;charset=utf-8 Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? Could anyone please help? Thanks! Jochen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi Igor, thanks for the tip, but using Header add TC-Server %{JK_WORKER_NAME}n as you suggested appears to be an invalid configuration: # apachectl configtest ... Syntax error on line 43 of /etc/apache2/sites-enabled/000-default: Unrecognized header format %n Action 'restart' failed. ... Regards Jochen -- Jochen Wißmann Head of operations KEBA GmbH Automation Vertretung der KEBA AG Linz Adenauerallee 73 D-53113 Bonn, Germany Phone +49/228/1848698014 Fax +49/228/1848698015 Mailto: jochen.wissm...@agimatec.de www.keba.com Geschäftsführer: Franz Berger, Thomas Linde, Michael Spatz Amtsgericht Ulm HRB 725943 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk how to add JK_WORKER_NAME to http-header
On 26.02.2013 22:38, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jochen, On 2/26/13 10:41 AM, Jochen Wißmann wrote: I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e This looks like it should work from my brief review of the documentation. TC-Server: (null) Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? The httpd documentation says so. Can you give us more of your httpd.conf? Perhaps the Header directive isn't in a place where the environment variable has been set, goes out of scope, etc. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEtK1AACgkQ9CaO5/Lv0PAdmwCgvDx2p5ZNdLAU6E7xXIg4uuu6 tCcAoLWtF78/eXNDXvmV2FeR6TIOq0qj =f/sj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi Christopher, my setup looks like this. * os: ubuntu, running apache 2.2 with mod_jk 1.2.36 * AJP13-Worker: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) , which is based on tomcat-6.0.29 000-default: # Load mod_jk configuration Include mod-jk.conf VirtualHost *:80 ServerAdmin webmaster@localhost DocumentRoot /var/www Directory / Options FollowSymLinks AllowOverride None /Directory Directory /var/www/ Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all /Directory ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ Directory /usr/lib/cgi-bin AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all /Directory ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 /Directory Header add X-Server-Ip %{SERVER_ADDR}e Header merge TC-Server-Ip %{JK_WORKER_NAME}e /VirtualHost mod_jk.conf: - # Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile workers.properties # Where to put jk logs JkLogFile ${APACHE_LOG_DIR}/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # LogFormat LogFormat %h %l %u %t \%r\ %s %b %{JK_WORKER_NAME}n %{JK_LB_FIRST_NAME}n \ %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n %{JK_LB_LAST_BUSY}n JkLogFile # Select the log format JkLogStampFormat %Y-%m-%d %H:%M:%S,%Q #SetEnv JK_WORKER_NAME {JK_WORKER_NAME}n Header add TC-Server-Ip %{JK_NOTE_WORKER_NAME}e # JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat %w %V %U %T %s %R # You can use external file for mount points. # It will be checked for updates each 60 seconds. # The format of the file is: /url=worker # /examples/*=loadbalancer JkMountFile uriworkermap.properties JkMountCopy all # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile /var/log/apache2/jk.shm worker.properties: # Define list of workers that will be used # for mapping requests worker.list=status,liferay # Status worker for managing load balancer worker.status.type=status # Liferay-Load-balancer worker.liferay.port=8009 worker.liferay.host=127.0.0.1 worker.liferay.type=ajp13 uriworkermap.properties: -- # Mount the Servlet context to the ajp13 worker /jkstatus/*=status # Liferay /c=liferay /c/*=liferay /group=liferay /group/*=liferay /html/*=liferay /image/*=liferay /language/*=liferay /layouttpl/*=liferay /user=liferay /user/*=liferay /web=liferay /web/*=liferay /kepol=liferay /kepol/*=liferay # Liferay Languages /da=liferay /da/*=liferay /de=liferay /de/*=liferay /en=liferay /en/*=liferay /ru=liferay /ru/*=liferay /tr=liferay /tr/*=liferay Using these config-files allows me to use JK_WORKER_NAME for logging, but not for header-manipulation, strange Any ideas? Thanks! Jochen -- Jochen Wißmann Head of operations KEBA GmbH Automation Vertretung der KEBA AG
Re: mod_jk how to add JK_WORKER_NAME to http-header
On 27/02/2013 10:47 AM, Jochen Wißmann jochen.wissm...@kepol.com wrote: On 26.02.2013 22:38, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jochen, On 2/26/13 10:41 AM, Jochen Wißmann wrote: I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e This looks like it should work from my brief review of the documentation. TC-Server: (null) Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? The httpd documentation says so. Can you give us more of your httpd.conf? Perhaps the Header directive isn't in a place where the environment variable has been set, goes out of scope, etc. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEtK1AACgkQ9CaO5/Lv0PAdmwCgvDx2p5ZNdLAU6E7xXIg4uuu6 tCcAoLWtF78/eXNDXvmV2FeR6TIOq0qj =f/sj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi Christopher, my setup looks like this. * os: ubuntu, running apache 2.2 with mod_jk 1.2.36 * AJP13-Worker: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) , which is based on tomcat-6.0.29 000-default: # Load mod_jk configuration Include mod-jk.conf VirtualHost *:80 ServerAdmin webmaster@localhost DocumentRoot /var/www Directory / Options FollowSymLinks AllowOverride None /Directory Directory /var/www/ Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all /Directory ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ Directory /usr/lib/cgi-bin AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all /Directory ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 /Directory Header add X-Server-Ip %{SERVER_ADDR}e Header merge TC-Server-Ip %{JK_WORKER_NAME}e /VirtualHost mod_jk.conf: - # Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile workers.properties # Where to put jk logs JkLogFile ${APACHE_LOG_DIR}/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # LogFormat LogFormat %h %l %u %t \%r\ %s %b %{JK_WORKER_NAME}n %{JK_LB_FIRST_NAME}n \ %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n %{JK_LB_LAST_BUSY}n JkLogFile # Select the log format JkLogStampFormat %Y-%m-%d %H:%M:%S,%Q #SetEnv JK_WORKER_NAME {JK_WORKER_NAME}n Header add TC-Server-Ip %{JK_NOTE_WORKER_NAME}e # JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat %w %V %U %T %s %R # You can use external file for mount points. # It will be checked for updates each 60 seconds. # The format of the file is: /url=worker # /examples/*=loadbalancer JkMountFile uriworkermap.properties JkMountCopy all # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile /var/log/apache2/jk.shm worker.properties: # Define list of workers that will be used # for mapping requests worker.list=status,liferay # Status worker for managing load balancer worker.status.type=status # Liferay-Load-balancer worker.liferay.port=8009 worker.liferay.host=127.0.0.1 worker.liferay.type=ajp13 uriworkermap.properties: -- # Mount the Servlet context to the ajp13 worker /jkstatus/*=status # Liferay /c=liferay /c/*=liferay /group=liferay /group/*=liferay /html/*=liferay /image/*=liferay /language/*=liferay /layouttpl/*=liferay /user=liferay /user/*=liferay /web=liferay /web/*=liferay /kepol=liferay /kepol/*=liferay # Liferay Languages /da=liferay /da/*=liferay /de=liferay /de/*=liferay /en=liferay /en/*=liferay /ru=liferay /ru/*=liferay /tr=liferay /tr/*=liferay Using these
Re: mod_jk how to add JK_WORKER_NAME to http-header
On 27/02/2013 10:47 AM, Jochen Wißmann jochen.wissm...@kepol.com wrote: On 26.02.2013 22:38, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jochen, On 2/26/13 10:41 AM, Jochen Wißmann wrote: I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e This looks like it should work from my brief review of the documentation. TC-Server: (null) Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? The httpd documentation says so. Can you give us more of your httpd.conf? Perhaps the Header directive isn't in a place where the environment variable has been set, goes out of scope, etc. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEtK1AACgkQ9CaO5/Lv0PAdmwCgvDx2p5ZNdLAU6E7xXIg4uuu6 tCcAoLWtF78/eXNDXvmV2FeR6TIOq0qj =f/sj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi Christopher, my setup looks like this. * os: ubuntu, running apache 2.2 with mod_jk 1.2.36 * AJP13-Worker: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) , which is based on tomcat-6.0.29 000-default: # Load mod_jk configuration Include mod-jk.conf VirtualHost *:80 ServerAdmin webmaster@localhost DocumentRoot /var/www Directory / Options FollowSymLinks AllowOverride None /Directory Directory /var/www/ Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all /Directory ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ Directory /usr/lib/cgi-bin AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all /Directory ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 /Directory Header add X-Server-Ip %{SERVER_ADDR}e Header merge TC-Server-Ip %{JK_WORKER_NAME}e /VirtualHost mod_jk.conf: - # Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile workers.properties # Where to put jk logs JkLogFile ${APACHE_LOG_DIR}/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # LogFormat LogFormat %h %l %u %t \%r\ %s %b %{JK_WORKER_NAME}n %{JK_LB_FIRST_NAME}n \ %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n %{JK_LB_LAST_BUSY}n JkLogFile # Select the log format JkLogStampFormat %Y-%m-%d %H:%M:%S,%Q #SetEnv JK_WORKER_NAME {JK_WORKER_NAME}n Header add TC-Server-Ip %{JK_NOTE_WORKER_NAME}e # JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat %w %V %U %T %s %R # You can use external file for mount points. # It will be checked for updates each 60 seconds. # The format of the file is: /url=worker # /examples/*=loadbalancer JkMountFile uriworkermap.properties JkMountCopy all # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile /var/log/apache2/jk.shm worker.properties: # Define list of workers that will be used # for mapping requests worker.list=status,liferay # Status worker for managing load balancer worker.status.type=status # Liferay-Load-balancer worker.liferay.port=8009 worker.liferay.host=127.0.0.1 worker.liferay.type=ajp13 uriworkermap.properties: -- # Mount the Servlet context to the ajp13 worker /jkstatus/*=status # Liferay /c=liferay /c/*=liferay /group=liferay /group/*=liferay /html/*=liferay /image/*=liferay /language/*=liferay /layouttpl/*=liferay /user=liferay /user/*=liferay /web=liferay /web/*=liferay /kepol=liferay /kepol/*=liferay # Liferay Languages /da=liferay /da/*=liferay /de=liferay /de/*=liferay /en=liferay /en/*=liferay /ru=liferay /ru/*=liferay /tr=liferay /tr/*=liferay Another
Re: Tomcat 7 doesn't start on Windows
On 2/26/2013 6:04 AM, Rune Stilling wrote: Hi list I have been trying to get this to work by looking a lot on similar situations around the net but nothing works. My setup is as follows: * Tomcat 7.0.37 installed via the Windows service installer package * Windows 2003 server * Java/JRE 1.7.0_15 * Using C:\Program Files\Java\jre7\bin\server\jvm.dll So the problem is that the Tomcat7 service won't start from the service control panel. I just get a Could not start … and Error 1053: The service did not respond …. There's nothing in the Tomcat logs (both stdout and stderr are empty). The event logs shows a generic service control manager error. But - If I start the service from the command line by typing tomcat7 //TS/Tomcat7 the thing works fine. Also if I change the service user account to the Administrator account I get a different error by startup Error 1068: The dependency service or group failed to start. Any ideas? /Rune Hi, Rune- I ran into something similar a while back on, I believe, Server 2008 R2. I ended up uninstalling Tomcat and all JVMs, manually removing all traces of the JVMs from the registry, and then re-installing a single JVM followed by Tomcat. -Terence Bandoian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk how to add JK_WORKER_NAME to http-header
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Igor, On 2/26/13 2:52 PM, Igor Cicimov wrote: On 27/02/2013 5:42 AM, Jochen Wißmann jochen.wissm...@kepol.com wrote: Header add TC-Server %{JK_WORKER_NAME}e I think this should be Header add TC-Server %{JK_WORKER_NAME}n ??! ${FOOBAR}n isn't defined only %{...}e and %{...}s. Please paste here the worker.properties file too. This should have no effect on things. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEtnUIACgkQ9CaO5/Lv0PBTswCdFDxSNRPn5oxZLqPAkuH8IJqy cUwAnjFcoojJ0IYGdtdQuNQw1oHvpYg+ =PLoS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issue with Async Servlet onTimeout
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sunit, On 2/26/13 8:05 PM, Sumit Bhardwaj wrote: Hi, I am using AsyncContext for implementing a file download app and seeing issues on the timeout. I am using tomcat 7.0.23 (and have tried on 7.0.28 as well, but seeing the issue in 28 as well) Any chance of testing on 7.0.37, the current release? There have been a number of fixes to the async portions of Tomcat since 7.0.23/28, though none of the changelog descriptions jump out at me as being obviously relevant. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEto8oACgkQ9CaO5/Lv0PDX8gCfVG46d8YDTpKxEXEtqik1E17x w60AoKrQ8yOuSfsZ23lcKLsBLxk1igwW =P8HP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issue with Async Servlet onTimeout
Sure Chris, would try with 7.0.37 Thanks, Sumit On Wed, Feb 27, 2013 at 11:42 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sunit, On 2/26/13 8:05 PM, Sumit Bhardwaj wrote: Hi, I am using AsyncContext for implementing a file download app and seeing issues on the timeout. I am using tomcat 7.0.23 (and have tried on 7.0.28 as well, but seeing the issue in 28 as well) Any chance of testing on 7.0.37, the current release? There have been a number of fixes to the async portions of Tomcat since 7.0.23/28, though none of the changelog descriptions jump out at me as being obviously relevant. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEto8oACgkQ9CaO5/Lv0PDX8gCfVG46d8YDTpKxEXEtqik1E17x w60AoKrQ8yOuSfsZ23lcKLsBLxk1igwW =P8HP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk how to add JK_WORKER_NAME to http-header
On 26.02.2013 19:41, Jochen Wißmann wrote: Hello, i am trying to find an easy way to determine from the http-client side, which AJP13-worker handled my request. So my basic idea is to use mod_header to add mod_jk`s env-variable JK_WORKER_NAME to the Header of the http-response. I tried to get something like this working: httpd.conf: ... Header add TC-Server %{JK_WORKER_NAME}e ... All my previous attempts resulted in http-responses looking like this: HTTP/1.1 200 OK Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/ Date: Tue, 26 Feb 2013 18:25:31 GMT Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22 OpenSSL/0.9.8x DAV/2 Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/ Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT; Path=/ Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011) ETag: 838b4ae2 Content-Length: 8043 X-Server-Ip: 110.160.11.26 TC-Server: (null) Content-Type: text/html;charset=utf-8 Why do i get TC-Server: (null) ? Using the Variable JK_WORKER_NAME to log the worker's name via mod_log_config works fine. Am i missing something? Is it even possible to access the env-variable JK_WORKER_NAME with module mod_header? Could anyone please help? Thanks! mod_jk respects the environment variable JK_WORKER_NAME when choosing a target worker, but it does not set it. mod_jk only sets a note with name JK_WORKER_NAME, which is different from an env var. The n in your log format means note. Unfortunately most variable use supported in Apache config is for env vars, not for notes, so you can't directly set the header from a note. There are two things you can experiment with: a) using an undocumented mod_rewrite feature to try to copy the note into an env var and then using that env var to set the header or b) not using the normal JkMount or uriworkermap.properties way of defining the workers responsible for handling the URIs, but instead using mod_rewrite via setting the env var JK:WORKER_NAME Ad a) Works roughly like that (untested): RewriteCond %{ENV:JK_WORKER_NAME} (.*) RewriteRule . - [ENV=WORKER:%1] Note 1: the undocumented feature of mod_rewrite is, that %{ENV:JK_WORKER_NAME} first looks for a note named JK_WORKER_NAME and only if it doesn't find it for an env var. Note 2: The RewriteRule now sets a new env var WORKER to the captured value of the note. lease choose a new variable name here, not JK_WORER_NAME. Now we add Header add TC-Server-Ip %{WORKER}e If you choose another name as WORKER for the new env var in the RewriteRule, please adjust here as well. Finally: if it doesn't work, try again by placing the Rewrite lines in a Directory/Directory block. Don't forget to switch RewriteEngine On Ad b) You can use mod_rewrite to set the env var JK_WORKER_NAME (now it is important to use that name). mod_jk will then route the request to that worker and since you had set the env var yourself, you can also copy it to a header. RewriteRule ^/c - [ENV=JK_WORKER_NAME:liferay] RewriteRule ^/c/.* - [ENV=JK_WORKER_NAME:liferay] RewriteRule ^/group - [ENV=JK_WORKER_NAME:liferay] RewriteRule ^/group/.* - [ENV=JK_WORKER_NAME:liferay] etc. and then Header add TC-Server-Ip %{JK_WORKER_NAME}e Final remarks: Your config does not really warrant this effort: you only have one worker name, so what do you expect in the header? I'm asking, because if you are using a load balancer worker (assumed name lb) in your real config, and it has sub workers for example node1 and node2 then JK_WORKER_NAME will always be lb. To actually get the chosen sub worker, only recipe 1 has a chance to work. You would there replace JK_WORJER_NAME in the RewriteCond by JK_WORKER_ROUTE. Unfortunately I think that the route note is not set before the request actually gets forwarded and that is to late for mod_rewrite to be able to copy it in an env var. In that case (load balancer and you want to know the chosen lb sub worker) we would either need to add something to mod_jk, or allow mod_headers to also support notes, or write a special small module. Having written all that, I think the following patch to mod_headers would be best. It simply adds support for notes to mod_headers (%{xxx}n notation): Index: modules/metadata/mod_headers.c === --- modules/metadata/mod_headers.c (revision 1449529) +++ modules/metadata/mod_headers.c (working copy) @@ -200,6 +200,16 @@ return (null); } +static const char *header_request_note(request_rec *r, char *a) +{ +const char *s = apr_table_get(r-notes,a); + +if (s) +return unwrap_header(r-pool, s); +else +return (null); +} + static const char *header_request_ssl_var(request_rec *r, char *name) { if (header_ssl_lookup) { @@ -853,6 +863,7