Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68245

systemd migration breaks installations where JAVA_OPTS contains timestamped log path

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Jenkins LTS on Amazon Linux (amzn2.aarch64)

      Based on this article from cloudbees, I had the following in /etc/sysconfig/jenkins:

      JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
      

      The relevant part there seems to be:

      -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m

      When I upgraded to 2.332.2, the migration moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:

      Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
      Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
      Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
      Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
      Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
      

      I think this is because of the %t in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

      I've submitted feedback to cloudbees as well, and it seems to have been updated on another page that deals with these options.

          [JENKINS-68245] systemd migration breaks installations where JAVA_OPTS contains timestamped log path

          Cody Rank created issue -
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:

          {{JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"}}

          Whe{{monospaced text}}n I upgraded to 2.332.2, the service failed to start, with the following from {{journalctl -xe}}:

          {code}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}

          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:

          {code}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}

          Whe{{monospaced text}}n I upgraded to 2.332.2, the service failed to start, with the following from {{journalctl -xe}}:

          {code}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}

          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:

          {code}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}

          Whe{{monospaced text}}n I upgraded to 2.332.2, the service failed to start, with the following from {{journalctl -xe}}:

          {code}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}

          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          When I upgraded to 2.332.2, the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          When I upgraded to 2.332.2, the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          When I upgraded to 2.332.2, the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          When I upgraded to 2.332.2, the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          The relevant part there seems to be {code}-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m{code}

          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          The relevant part there seems to be {code}-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m{code}

          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          The relevant part there seems to be:
          {code:java}
          -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m{code}
          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          Cody Rank made changes -
          Description Original: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          The relevant part there seems to be:
          {code:java}
          -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m{code}
          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options
          New: Based on [this article from cloudbees|https://docs.cloudbees.com/docs/admin-resources/latest/jvm-troubleshooting/#java11-arguments], I had the following in /etc/sysconfig/jenkins:
          {code:java}
          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/ -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m -XX:ErrorFile=/var/log/jenkins/hs_err_%p.log -XX:+LogVMOutput -XX:LogFile=/var/log/jenkins/hs_%p.log"
          {code}
          The relevant part there seems to be:
          {code:java}
          -Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-%t.log:utctime:filecount=2,filesize=100m{code}
          When I upgraded to 2.332.2, the [migration|https://github.com/jenkinsci/packaging/blob/master/systemd/migrate.sh] moved these values to /etc/systemd/system/jenkins.service.d/override.conf, but the service failed to start, with the following output from journalctl -xe:
          {code:java}
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Error opening log file '/var/log/jenkins/gc-/run.log': No such file or directory
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: [0.001s][error][logging] Initialization of output 'file=/var/log/jenkins/gc-/run.log' using options 'filecount=2,filesize=
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Invalid -Xlog option '-Xlog:gc*,gc+heap=trace,gc+age*=trace,gc+ref*=trace,gc+ergo*=trace:file=/var/log/jenkins/gc-/run.log
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: Could not create the Java Virtual Machine.
          Apr 08 21:07:49 ip-10-0-0-74.ec2.internal jenkins[7288]: Error: A fatal exception has occurred. Program will exit.
          {code}
          I think this is because of the {{%t}} in the trace:file path, which adds a timestamp to the file name. That substitution doesn't seem to work after the migration to systemd.

          I've submitted feedback to cloudbees as well, and it seems to have been updated on [another page|https://support.cloudbees.com/hc/en-us/articles/222446987-Prepare-Jenkins-for-Support#jvmrecommendedarguments] that deals with these options.

            Unassigned Unassigned
            codyrank Cody Rank
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: