tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Different handling of -Dfoo="bar" between versions
Date Thu, 03 Oct 2013 15:24:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Steve,

On 10/3/13 11:12 AM, Steve Arch (sarch) wrote:
>>> AWS's tools pass the values to tomcat.
> 
>> This is not an adequate description.  Tomcat must be launched by
>> some mechanism, such as the java executable, JSVC service
>> wrapper, class loading from some already >running Java
>> application, etc.  What's being used here?
> 
> OK, in this case 'magic' is being used. The running process is:
> 
> /usr/lib/jvm/jre/bin/java -Dfoo="bar" -XX:MaxPermSize=64m -Xmx256m 
> -Xms256m -classpath 
> /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar
>
> 
- -Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7
> -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat7/temp 
> -Djava.util.logging.config.file=/usr/share/tomcat7/conf/logging.properties
>
> 
- -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> org.apache.catalina.startup.Bootstrap start

It's clear that Tomcat's bundled startup scripts are not in use, here.
Id so, there would be a -Dnop on the command line that is a hack to
prevent a broken command-line when no logging configuration has been
specified (which is the case above).

I don't have enough experience with jsvc to know what the command-line
looks like when its in use... you can easily check for the parent
process for the JVM and see if it's something like "jsvc" -- though it
could have been re-renamed by Amazon.

>>> Something has changed between version 24 and 37 in Tomcat when
>>> it parses the JVM options (-D).
> 
>> Again, Tomcat does not parse command line options and has
>> absolutely nothing to do with the JRE-supplied System class.  The
>> launcher used to start Tomcat does parse the >command line;
>> Tomcat has no built-in launcher.
> 
> Whatever parses the command line has not changed between versions
> of tomcat. At some stage, part or all of -Dfoo="bar" makes its way
> through to Tomcat. On tomcat 7.0.24, this results in the
> environment parameter 'foo' being set to 'bar'. On Tomcat 7.0.37,
> this results in the environment parameter 'foo' being set to
> '"bar"'.

Given that it's not Tomcat scripts, it's unlikely to have been
affected directly by the upgrade in Tomcat version. Instead, you are
probably seeing some environmental change that you may otherwise be
unaware of: Amazon changed something, and it happened at the same time
the Tomcat upgrade occurred.

I think logging a bug with Amazon was appropriate.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSTYw1AAoJEBzwKT+lPKRYPjwQAMZqZDwsAaPDfhjOwfmtMkVY
6ZJh1ouw/5Jv/w9Ir8SXkw2+n2a+ML25+yDW/K9SQ4lq6N0Q17WAIX0tXH/tmYPn
GCYRdnH9pUeLTtfhNPwPzCqcCvSaiofjQtI+Eqiz7/Q2hYSFm5j08D2XR+2sHJJJ
DGNzD070VQk4skWu8iL1rnfoWdazuKu/UviqUz3iWkPnMDQDUgtt92sK9P+sVaCf
bB1sRD9QAPYeW9+fnd48puA7Dtyo9UKrpln4iRGol0pfPUHHYRbo/ESULlu7D5hA
Uvc05fr2Hm9evgkwgHPrA4ALqxdjbwNvrtBkHhPoUhPQieQhUtr5LJJRHtjS06ZJ
YnwKDgZ2e/CYzzHeHuGfT3/j2S2Ml2C9ZC4Ho68JwzvomVfwPSRF+qXILtExpN+J
e9t+ds7MGKTNXWLjfvB9FKZfYhN/SHeH1/tvmMj/H6CY34aVrN0OwPeHRmzH6D+o
SkenwBEWvAv6ceH+eX3B25b99KcG0xel2t3Ch1g7OqYE4SnhFpweivNQwJfOwjjm
6LGIM2EjvU720aiNFe4QjL36m1Wosxijecq9qZQwQTIMX9rJOyjjhRITzEYwlfbQ
C4yrYjpwMXA+IRUBA+r0or+g3azMzApbFjANpoHzsPk9Z657cLsiNOXGwCS4aFCt
iAFfkmEbfrZ5iPRu0RzS
=qolt
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message