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

            tam116 Tyler Maclean created issue -
            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
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            markewaite Mark Waite made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            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.
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-64226 [ JENKINS-64226 ]
            markewaite Mark Waite made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
            markewaite Mark Waite made changes -
            Remote Link This issue links to "PR-198 update JDK version check in init script (Web Link)" [ 26342 ]
            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.
            dhs Dirk Heinrichs made changes -
            Comment [ [~markewaite], just installed 2.263.1 on a test host. Looks like the fix is not included. ]
            markewaite Mark Waite made changes -
            Summary Debian/Ubuntu installer fails with openjdk 11.0.9.1 Debian/Ubuntu installer fails with OpenJDK 11.0.9.1
            markewaite Mark Waite made changes -
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]
            markewaite Mark Waite made changes -
            Released As 2.263.1
            markewaite Mark Waite made changes -
            Released As 2.263.1 Jenkins core 2.263.1

            People

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

              Dates

                Created:
                Updated:
                Resolved: