You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/02/24 17:31:51 UTC

[Bug 64174] New: Double quotes around CATALINA_OPTS cause startup crash with Introscope

https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

            Bug ID: 64174
           Summary: Double quotes around CATALINA_OPTS cause startup crash
                    with Introscope
           Product: Tomcat 9
           Version: 9.0.30
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: sh4990@att.com
  Target Milestone: -----

Created attachment 37040
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37040&action=edit
errors produced at startup

Somewhere between 9.0.22 and 9.0.30 double quotes were added around
CATALINA_OPTS and JAVA_OPTS in the catalina.sh script in bin dir. These caused
issues with starting Tomcat (with Confluence 6.13.8) when Introscope present.
Returning the variables to the config found in 9.0.22 corrected the issue. At a
minimum it would seem they should have been escaped, which also creates startup
crash.

9.0.22:
 eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS
$CATALINA_OPTS \

9.0.30:
 eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS"
"$CATALINA_OPTS" \

Attaching the errors in catalina.out. I diff'ed the 2 versions and removed
double quotes so it looked like 9.0.22, and startup worked. 

I then escaped the vars, "\"<var>\"" - gave me this error in catalina.out:

Error: Could not find or load main class  -Djdk.tls.ephemeralDHKeySize=2048
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
-Dorg.apache.catalina.security.SecurityListener.UMASK=0022

Assuming this is why these vars were not escaped.

JDK 1.8.0_231
Running Confluence 6.13.8

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

--- Comment #3 from Steve H <sh...@att.com> ---
Created attachment 37042
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37042&action=edit
wiki.jopts.introscope.sh

This includes introscope.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

--- Comment #5 from Steve H <sh...@att.com> ---
I forgot to mention - the catalina.properties change I found was the addition
of:
catalina-ssi.jar,\

I did add this include with the original catalina.sh but it still failed to
start Confluence with Introscope.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
What have you added to setenv.sh to configure Introscope?

Have you tried this with a clean Tomcat install from the ASF?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEEDINFO                    |RESOLVED

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
It is the new lines in introscope_vars that are the cause of the problem. I see
the same error if I use a simplified version of those scripts to configure
YourKit Java Profiler.

Once the new lines are removed, Tomcat starts correctly.

The change in behaviour for new lines is documented in the change log. Look for
bug 63815.
I typically use the following pattern
CATALINA_OPTS="..."
CATALINA_OPTS="$CATALINA_OPTS ..."
if I want to use separate lines for clarity.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

--- Comment #4 from Steve H <sh...@att.com> ---
I always get Tomcat from ASF. I believe that the original version of Tomcat for
Confluence 6.13.8 is 9.0.12 or 9.0.18. Pretty sure I've upgraded to 9.0.22. And
I'm upgraded per Atlassian's recommended methodology (although that missed the
change in conf/catalina.properties). I have lower environments that do not have
Introscope and they upgraded to 9.0.30 just fine. I just know that restoring
catalina.sh to the 9.0.22 configuration allows Confluence to start with
Introscope, and that the difference seems to be the double quotes around the
two vars listed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

--- Comment #7 from Steve H <sh...@att.com> ---
Yep - that was it. Sorry about that, and thank you!

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64174] Double quotes around CATALINA_OPTS cause startup crash with Introscope

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64174

--- Comment #2 from Steve H <sh...@att.com> ---
Created attachment 37041
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37041&action=edit
setenv.sh

The Confluence setenv.sh script. at the bottom is a routine that pulls in the
wiki.jopts.introscope.sh file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org