Ошибка установки Jenkins

Может ли кто-нибудь помочь мне с установкой Jenkin на Ubuntu

Я получаю следующий журнал

Reading package lists... Done
Building dependency tree       
Reading state information... Done
jenkins is already the newest version (2.222.3).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up oracle-java11-installer-local (11.0.7-1~linuxuprising0) ...
Before installing this package,
please download the Oracle JDK 11 .tar.gz file
with the same version as this package (version 11.0.4),
and place it in /var/cache/oracle-jdk11-installer-local,

E.g.:
sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.7_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up jenkins (2.222.3) ...
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
invoke-rc.d: initscript jenkins, action "start" failed.
● jenkins.service - LSB: Start Jenkins at boot time
   Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-04-29 10:49:28 IST; 4ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16643 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)

Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: Starting LSB: Start Jenkins at boot time...
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Found an incorrect Java version
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Java version found:
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: java version "13.0.2" 2020-01-14
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Java(TM) SE Runtime Environment (build 13.0.2+8)
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
Apr 29 10:49:28 ip-172-26-11-113 jenkins[16643]: Aborting
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: jenkins.service: Control process exited, code=exited status=1
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: Failed to start LSB: Start Jenkins at boot time.
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: jenkins.service: Unit entered failed state.
Apr 29 10:49:28 ip-172-26-11-113 systemd[1]: jenkins.service: Failed with result 'exit-code'.
dpkg: error processing package jenkins (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java11-installer-local
 jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)

В чем именно проблема? Какая версия Java требуется Янкинсу? Я считаю, что Java-13 - довольно новая версия, и java полностью обратно совместима.

0
задан 29 April 2020 в 08:23

1 ответ

Я думаю, Дженкинс пытается найти Oracle JDK 11. Это написано в приведенном выше сообщении

Oracle JDK 11 НЕ установлен.
dpkg: ошибка обработки пакета oracle-java11-installer-local (--configure):
подпроцесс установил послеустановочный сценарий, вернувший статус ошибки выхода 1

Если вы устанавливаете Jenkins, установите JDK 11 перед установкой Jenkins. Пожалуйста, следуйте приведенному ниже руководству для Ubuntu 20.04
Установка OpenJDK

Случай - 2
Если установлен Jenkins и он аварийно завершил работу с кодом выхода 1 и при попытке получить статус с systemctl status jenkins.service , и вы получите следующий вывод

Nov 13 09:35:43 tattve jenkins[1038744]: Found an incorrect Java version
Nov 13 09:35:43 tattve jenkins[1038744]: Java version found:
Nov 13 09:35:43 tattve jenkins[1038776]: openjdk version "11.0.9.1" 2020-11-04
Nov 13 09:35:43 tattve jenkins[1038776]: OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
Nov 13 09:35:43 tattve jenkins[1038776]: OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
Nov 13 09:35:43 tattve jenkins[1038744]: Aborting

Пожалуйста, реализуйте решение, предложенное здесь

1
ответ дан 24 December 2020 в 19:52

Другие вопросы по тегам:

Похожие вопросы: