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

Debian/Ubuntu installer fails with OpenJDK 11.0.9.1

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • packaging
    • None
    • Ubuntu 20.04, openjdk 11.0.9.1, Jenkins 2.249.3
    • Jenkins core 2.263.1

    Description

      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

      Attachments

        Issue Links

          Activity

            markewaite Mark Waite added a comment -

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

            markewaite Mark Waite added a comment - Included in weekly release Jenkins 2.268. Will be included in LTS release Jenkins 2.263.1.
            proski 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.

            proski 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.
            tam116 Tyler Maclean added a comment -

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

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: