Linux

Running with Java 8 from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el8_7.x86_64/jre, which is older than the minimum required version (Java 11)

Naan 2023. 11. 19. 00:22
320x100

service jenkins start

jenkins.service: Main process exited, code=exited, status=1/FAILURE

jenkins.service: Failed with result 'exit-code'.

Failed to start Jenkins Continuous Integration Server.

Running with Java 8 from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el8_7.x86_64/jre, which is older than the minimum required version (Java 11).

rockey8.7 버전에서 jenkins 를 설치를 하고 구동을 하려고 하면 위와 같이 에러가 발생 된다.

내용을 잘 보면 아래쪽에 java 버전 이슈가 있다.

# java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)

rockey 8.7 버전에는 기본 java가 1.8 버전이 설치 되어 있다.

# yum install java-11* -y

# yum install java-11
Last metadata expiration check: 0:51:14 ago on Mon 16 Oct 2023 07:49:34 PM KST.
Dependencies resolved.
==============================================================================================================================
 Package                               Architecture        Version                               Repository              Size
==============================================================================================================================
Installing:
 java-11-openjdk                       x86_64              1:11.0.20.0.8-3.el8_8                 appstream              472 k
Upgrading:
 tzdata-java                           noarch              2023c-1.el8                           appstream              185 k
Installing dependencies:
 java-11-openjdk-headless              x86_64              1:11.0.20.0.8-3.el8_8                 appstream               42 M
 ttmkfdir                              x86_64              3.0.9-54.el8                          appstream               61 k
 xorg-x11-fonts-Type1                  noarch              7.5-19.el8                            appstream              521 k

Transaction Summary
==============================================================================================================================
Install  4 Packages
Upgrade  1 Package

Total download size: 43 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): ttmkfdir-3.0.9-54.el8.x86_64.rpm                                                       670 kB/s |  61 kB     00:00
(2/5): java-11-openjdk-11.0.20.0.8-3.el8_8.x86_64.rpm                                         2.8 MB/s | 472 kB     00:00
(3/5): tzdata-java-2023c-1.el8.noarch.rpm                                                     4.6 MB/s | 185 kB     00:00
(4/5): xorg-x11-fonts-Type1-7.5-19.el8.noarch.rpm                                             4.0 MB/s | 521 kB     00:00
(5/5): java-11-openjdk-headless-11.0.20.0.8-3.el8_8.x86_64.rpm                                8.6 MB/s |  42 MB     00:04
------------------------------------------------------------------------------------------------------------------------------
Total                                                                                         7.9 MB/s |  43 MB     00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: java-11-openjdk-headless-1:11.0.20.0.8-3.el8_8.x86_64                                                1/1
  Preparing        :                                                                                                      1/1
  Upgrading        : tzdata-java-2023c-1.el8.noarch                                                                       1/6
  Installing       : java-11-openjdk-headless-1:11.0.20.0.8-3.el8_8.x86_64                                                2/6
  Running scriptlet: java-11-openjdk-headless-1:11.0.20.0.8-3.el8_8.x86_64                                                2/6
  Installing       : ttmkfdir-3.0.9-54.el8.x86_64                                                                         3/6
  Installing       : xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                               4/6
  Running scriptlet: xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                               4/6
  Installing       : java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64                                                         5/6
  Running scriptlet: java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64                                                         5/6
  Cleanup          : tzdata-java-2022f-1.el8.noarch                                                                       6/6
  Running scriptlet: java-11-openjdk-headless-1:11.0.20.0.8-3.el8_8.x86_64                                                6/6
  Running scriptlet: java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64                                                         6/6
  Running scriptlet: tzdata-java-2022f-1.el8.noarch                                                                       6/6
  Verifying        : java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64                                                         1/6
  Verifying        : java-11-openjdk-headless-1:11.0.20.0.8-3.el8_8.x86_64                                                2/6
  Verifying        : ttmkfdir-3.0.9-54.el8.x86_64                                                                         3/6
  Verifying        : xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                               4/6
  Verifying        : tzdata-java-2023c-1.el8.noarch                                                                       5/6
  Verifying        : tzdata-java-2022f-1.el8.noarch                                                                       6/6

Upgraded:
  tzdata-java-2023c-1.el8.noarch
Installed:
  java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64              java-11-openjdk-headless-1:11.0.20.0.8-3.el8_8.x86_64
  ttmkfdir-3.0.9-54.el8.x86_64                              xorg-x11-fonts-Type1-7.5-19.el8.noarch

Complete!

java 11을 설치를 하고

# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el8_7.x86_64/jre/bin/java)
   2           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.20.0.8-3.el8_8.x86_64/bin/java)

Enter to keep the current selection[+], or type selection number: 2

기본 버전을 java 11 로 변경해주자.

# java -version
openjdk version "11.0.20" 2023-07-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.20.0.8-1) (build 11.0.20+8-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.20.0.8-1) (build 11.0.20+8-LTS, mixed mode, sharing)

11 버전으로 변경되었다.

# service jenkins start
Redirecting to /bin/systemctl start jenkins.service

정상적으로 구동이 된다.

 

 

 

320x100