Uploaded image for project: 'JBoss Enterprise Web Server'
  1. JBoss Enterprise Web Server
  2. JBEWS-249

JAVA_OPTS in /etc/tomcat6/tomcat6.conf get added twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EWS 1.0.1
    • Fix Version/s: EWS 2.0.0
    • Labels:
      None
    • Environment:

      RHEL 5, probably other RHEL versions

    • Steps to Reproduce:
      Hide

      1) Edit /etc/tomcat6/tomcat6.conf and add:
      JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
      2) run "service tomcat6 start"
      3) Look at /var/log/tomcat6/catalina.out, and see that it has failed to start because the debug options have been specified twice

      This can be seen more clearly by editing /usr/sbin/tomcat6 to print out the command it is about to execute.

      Show
      1) Edit /etc/tomcat6/tomcat6.conf and add: JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" 2) run "service tomcat6 start" 3) Look at /var/log/tomcat6/catalina.out, and see that it has failed to start because the debug options have been specified twice This can be seen more clearly by editing /usr/sbin/tomcat6 to print out the command it is about to execute.
    • Workaround Description:
      Hide

      Remove the following lines from /usr/sbin/tomcat6

      # Get the tomcat config (use this for environment specific settings)
      if [ -z "${TOMCAT_CFG}" ]; then
        TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
      fi
      
      if [ -r "$TOMCAT_CFG" ]; then
        . $TOMCAT_CFG
      fi
      
      Show
      Remove the following lines from /usr/sbin/tomcat6 # Get the tomcat config (use this for environment specific settings) if [ -z "${TOMCAT_CFG}" ]; then TOMCAT_CFG= "/etc/tomcat6/tomcat6.conf" fi if [ -r "$TOMCAT_CFG" ]; then . $TOMCAT_CFG fi

      Description

      JVM options can be added to JAVA_OPTS in /etc/sysconfig/tomcat6 or /etc/tomcat6/tomcat6.conf (the former per service the latter global). When JAVA_OPTS are added to /etc/tomcat6/tomcat6.conf, they get appended to the command line twice, which can cause problems if specifying the option twice does not have the same effect as specifying it once.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                permaine Permaine Cheung
                Reporter:
                jameslivingston James Livingston
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: