Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-53524

Service.sh and setenv.bat files set different Java options

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • 8.0.0
    • 6.1.1, 6.3.2, 6.4.0, 6.10.0, 7.11.0
    • None

      Summary

      The service.bat file that's used for creating the Windows service for Confluence sets different Java options than the setenv.bat file:

      Options in common

      -XX:+UseG1GC
      -XX:-PrintGCDetails
      -XX:-PrintTenuringDistribution
      -XX:+UseGCLogFileRotation
      -XX:NumberOfGCLogFiles=5
      -XX:GCLogFileSize=2M
      -Xloggc:%CATALINA_HOME%/logs/gc-%%t.log
      -Djava.awt.headless=true
      -Datlassian.plugins.enable.wait=300
      

      Options set by service.bat

      -Dcatalina.home=%CATALINA_HOME%
      -XX:+PrintGCTimeStamps
      -Dcatalina.base=%CATALINA_BASE%
      -Djava.endorsed.dirs=%CATALINA_HOME%\endorsed
      -Djava.io.tmpdir=%CATALINA_BASE%\temp
      -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
      -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
      

      Options set by setenv.bat

      -XX:+PrintGCDateStamps 
      -XX:G1ReservePercent=20
      -Xms1024m 
      -Xmx1024m 
      -Dsynchrony.enable.xhr.fallback=true
      -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768
      %START_CONFLUENCE_JAVA_OPTS%
      -Dconfluence.context.path=%CONFLUENCE_CONTEXT_PATH%
      

      The START_CONFLUENCE_JAVA_OPTIONS set in setenv.bat is probably not needed in service.bat since it's used for starting Confluence in safe mode, but the ones relating to Synchrony should be included in service.bat.

      Note

      We've undertaken some work to improve on this issue in 7.12.0.

      The service.bat file now implements all of the same configurations as the setenv.sh and setenv.bat files, except for

      So with the release of 7.12.0, most of this issue is fixed, but there's some more to go. We additionally want to look at having the service.bat file inherit its configuration from setenv.bat to simplify the process of installing Confluence on Windows.

      Hopefully this helps in the interim.

            [CONFSERVER-53524] Service.sh and setenv.bat files set different Java options

            Hi All,

            I've undertaken some work to improve on this issue.

            The service.bat file now implements all of the same configurations as the setenv.sh and setenv.bat files, except for

            So with the release of 7.12.0, most of this issue is fixed, but there's some more to go. We additionally want to look at having the service.bat file inherit its configuration from setenv.bat to simplify the process of installing Confluence on Windows.

            Once both these issues are addressed, we can close the ticket.

            Hopefully this helps in the interim.

            Thanks,
            James Ponting
            Premier Support Engineer

            James Ponting added a comment - Hi All, I've undertaken some work to improve on this issue. The service.bat file now implements all of the same configurations as the setenv.sh and setenv.bat files, except for Differences required by starting as a service Java 11 GC settings which are overridden in part by Java 8 settings - I've opened a bug to track this at CONFSERVER-61415: Java 11 Garbage Collection Logging Settings Are Not Correctly Applied on Confluence Start as I was unable to resolve this prior to the release of 7.12.0. So with the release of 7.12.0, most of this issue is fixed, but there's some more to go. We additionally want to look at having the service.bat file inherit its configuration from setenv.bat to simplify the process of installing Confluence on Windows. Once both these issues are addressed, we can close the ticket. Hopefully this helps in the interim. Thanks, James Ponting Premier Support Engineer

              jponting James Ponting
              btom1 Brian
              Affected customers:
              5 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: