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/01/10 06:32:54 UTC

[Bug 64068] New: Tomcat failes to start when JVM start option specified for new line by "\" on linux.

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

            Bug ID: 64068
           Summary: Tomcat failes to start when JVM start option specified
                    for new line by "\" on linux.
           Product: Tomcat 8
           Version: 8.5.49
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: risono@kogei.jp
  Target Milestone: ----

Tomcat 8.5.49 can't read the JVM start options written in srvstart.sh and
failes to start when using "\"on linux.

/usr/local/tomcat/bin/catalina.sh: line 468: -Xmx2560m: command not found
/usr/local/tomcat/bin/catalina.sh: line 469: -Djdk.tls.ephemeralDHKeySize=2048:
command not found
/usr/local/tomcat/bin/catalina.sh: line 470: -server: command not found
/usr/local/tomcat/bin/catalina.sh: line 471: -Dignore.endorsed.dirs=: command
not found

export JAVA_OPTS="
-Xmx2048m \
-XX:NewSize=768m \
-XX:MaxNewSize=768m \
-XX:MetaspaceSize=128m \
-XX:MaxMetaspaceSize=512m \
-XX:SurvivorRatio=2 \
-XX:MaxTenuringThreshold=15 \
-XX:TargetSurvivorRatio=90 \
-XX:ReservedCodeCacheSize=480m \
-XX:NonNMethodCodeHeapSize=15m \
-XX:+UseParallelOldGC \
-Xlog:gc*=info:file=${CATALINA_HOME}/logs/gc.${DATE_TIME}.log:time,level,tags:filesize=200m,filecount=30
"

export CATALINA_OPTS="
-server \
-Dsun.nio.cs.map=Windows-31J/Shift_JIS \
-Duser.timezone=JST
"

Tomcat 8.5.34 shows normal log, so I think Linux bash pursing is also normal.
Therefore, I try to add "\" to srvstart.sh where there was no "\"( <- add ).
Then, Tomcat 8.5.49 can read the options and start successfully.

Is this a bug? or The specification of Tomcat 8.5.49 or later? 
I guess that catalina.sh refactored in 8.5.49 has some bugs about parsing "\".

export JAVA_OPTS="\ <- add "\"
-Xmx2048m \
-XX:NewSize=768m \
-XX:MaxNewSize=768m \
-XX:MetaspaceSize=128m \
-XX:MaxMetaspaceSize=512m \
-XX:SurvivorRatio=2 \
-XX:MaxTenuringThreshold=15 \
-XX:TargetSurvivorRatio=90 \
-XX:ReservedCodeCacheSize=480m \
-XX:NonNMethodCodeHeapSize=15m \
-XX:+UseParallelOldGC \
-Xlog:gc*=info:file=${CATALINA_HOME}/logs/gc.${DATE_TIME}.log:time,level,tags:filesize=200m,filecount=30\
<- add "\"
"

export CATALINA_OPTS="\ <- add "\"
-server \
-Dsun.nio.cs.map=Windows-31J/Shift_JIS \
-Duser.timezone=JST\ <- add "\"
"

-- 
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 64068] Tomcat failes to start when JVM start option specified for new line by "\" on linux.

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
I can't reproduce this with the current fix in trunk.

I recommend trying with 8.5.50. If that doesn;t work, the fix will be in
8.5.51.

*** This bug has been marked as a duplicate of bug 63815 ***

-- 
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 64068] Tomcat failes to start when JVM start option specified for new line by "\" on linux.

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

--- Comment #4 from Rintaro ISONO <ri...@kogei.jp> ---
I tryed with 8.5.50 (Comment 2), then it didn't work like the previous my
report.

Comment 1 is also effective in 8.5.50 and 8.5.50 started normally with JVM
start options.

Results of discussions within our company, we skip the update to 8.5.50 and
wait the fix.

-- 
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 64068] Tomcat failes to start when JVM start option specified for new line by "\" on linux.

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

--- Comment #3 from Rintaro ISONO <ri...@kogei.jp> ---
Thank you for your comments !

We're going to discuss this solution and try to V&V for this bug with 8.5.50
in-house.
So the adoption of 8.5.49 and fix JVM options (Comment 1) are suspended.
If 8.5.50 could not start, we would skip the version-up of Tomcat from 8.5.34
to the one.

Truly yours,

-- 
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 64068] Tomcat failes to start when JVM start option specified for new line by "\" on linux.

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

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
I think you have been hit by the fix for bug 63815.

So the backslashes are needed to prevent the newlines (at least until we find a
better fix for the other bug).

-- 
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