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

Configuring JENKINS_HOME in Tomcat context of the servlet

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Windows Server

      When attempting to upgrade from 2.319.3 to 2.332.1, the updated version of Jenkins is not using the JENKINS_HOME value set in conf/context.xml.  The instance is running as a Windows service using Apache Tomcat 9.

      <Context>
      <Environment name="JENKINS_HOME" value="C:\path_to_jenkins_home" type="java.lang.String"/>
      ...
      </Context>

      Instead, the default and initial value of JENKINS_HOME is being used (C:\users\someUser\.jenkins)

      There is a need to use a different setting in the servlet.

          [JENKINS-68081] Configuring JENKINS_HOME in Tomcat context of the servlet

          Basil Crow added a comment -

          JNDI support was removed in jenkinsci/jenkins#6111, which I'm guessing is your problem here. You can instead use a Java system property (e.g. -DJENKINS_HOME=/path/to/home) (which you can set for Tomcat in the CATALINA_OPTS environment variable) or an environment variable of JENKINS_HOME).

          Basil Crow added a comment - JNDI support was removed in jenkinsci/jenkins#6111 , which I'm guessing is your problem here. You can instead use a Java system property (e.g. -DJENKINS_HOME=/path/to/home ) (which you can set for Tomcat in the CATALINA_OPTS environment variable) or an environment variable of JENKINS_HOME ).

          Doug added a comment -

          Worked as stated, added -DJENKINS_HOME=C:\some_path_to_jenkins in Java Options.  I would still be struggling to put this together without your assistance.  Thank you very much.

          Doug added a comment - Worked as stated, added -DJENKINS_HOME=C:\some_path_to_jenkins in Java Options.  I would still be struggling to put this together without your assistance.  Thank you very much.

            Unassigned Unassigned
            diegoandroid Doug
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: