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

Debian/Ubuntu installer fails with OpenJDK 11.0.9.1

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • packaging
    • None
    • Ubuntu 20.04, openjdk 11.0.9.1, Jenkins 2.249.3
    • Jenkins core 2.263.1

      Jenkins fails to find a valid openjdk version on Ubuntu 20.04 when the version of openjdk includes more than three dots such as 11.0.9.1. 

      The sed regex used in the init script needs to be updated to more accurately match the version string.

       

      This is similar to bug JENKINS-57096

          [JENKINS-64212] Debian/Ubuntu installer fails with OpenJDK 11.0.9.1

          Tyler Maclean added a comment -

          I've made a pull request with a proposed fix at https://github.com/jenkinsci/packaging/pull/198

          Tyler Maclean added a comment - I've made a pull request with a proposed fix at https://github.com/jenkinsci/packaging/pull/198

          Pavel Roskin added a comment -

          This is working for me:

          JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\([^.]*\)\.\([^.]*\)\..*".*/\1\2/p;')
          

          I replaced "." (any symbol) with "[^.]" (not a period) in two places, it was apparently the intention to match numbers, not periods, and it only worked by accident for shorter version numbers.

          Pavel Roskin added a comment - This is working for me: JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\([^.]*\)\.\([^.]*\)\..*" .*/\1\2/p;' ) I replaced "." (any symbol) with " [^.] " (not a period) in two places, it was apparently the intention to match numbers, not periods, and it only worked by accident for shorter version numbers.

          Mark Waite added a comment -

          Included in weekly release Jenkins 2.268. Will be included in LTS release Jenkins 2.263.1.

          Mark Waite added a comment - Included in weekly release Jenkins 2.268. Will be included in LTS release Jenkins 2.263.1.

            Unassigned Unassigned
            tam116 Tyler Maclean
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: