hello i get this error and no matter what i tried nothing fixed it
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: failed (Result: exit-code) since Mon 2022-02-28 09:07:36 CET; 7ms ago
Docs: man:systemd-sysv-generator(8)
Process: 10513 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)
févr. 28 09:07:36 tristanpc systemd[1]: Starting LSB: Start Jenkins at boot time...
févr. 28 09:07:36 tristanpc jenkins[10513]: Found an incorrect Java version
févr. 28 09:07:36 tristanpc jenkins[10513]: Java version found:
févr. 28 09:07:36 tristanpc jenkins[10535]: openjdk version "16.0.1" 2021-04-20
févr. 28 09:07:36 tristanpc jenkins[10535]: OpenJDK Runtime Environment (build 16.0.1 9-Ubuntu-120.04)
févr. 28 09:07:36 tristanpc jenkins[10535]: OpenJDK 64-Bit Server VM (build 16.0.1 9-Ubuntu-120.04, mixed mode, sharing)
févr. 28 09:07:36 tristanpc jenkins[10513]: Aborting
févr. 28 09:07:36 tristanpc systemd[1]: jenkins.service: Control process exited, code=exited, status=1/FAILURE
févr. 28 09:07:36 tristanpc systemd[1]: jenkins.service: Failed with result 'exit-code'.
févr. 28 09:07:36 tristanpc systemd[1]: Failed to start LSB: Start Jenkins at boot time.
dpkg: erreur de traitement du paquet jenkins (--configure) :
installed jenkins package post-installation script subprocess returned error exit status 1
i used this installation steps
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
java version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1 9-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 16.0.1 9-Ubuntu-120.04, mixed mode, sharing)
and i'm using ubuntu
CodePudding user response:
Java 8 or Java 11 (recommended) are required. Install 11.
Also, for whatever else you are running on Java 16, that is deprecated. Move to 17 or 11.