Posted
Filed under 프로그래밍/JAVA
아니 apt upgrade했더니 젠킨스가 실행이 안된다 ㅋㅋㅋㅋ
업그레이드 안에 자바가 있는데 이게 문제인것이다.

root@devops:~# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
 Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
 Drop-In: /etc/systemd/system/jenkins.service.d
 └─override.conf
 Active: failed (Result: exit-code) since Fri 2022-03-11 09:51:28 KST; 9s ago
 Process: 2226 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
 Main PID: 2226 (code=exited, status=1/FAILURE)

Mar 11 09:51:27 devops systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE
Mar 11 09:51:27 devops systemd[1]: jenkins.service: Failed with result 'exit-code'.
Mar 11 09:51:27 devops systemd[1]: Failed to start Jenkins Continuous Integration Server.
Mar 11 09:51:28 devops systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 5.
Mar 11 09:51:28 devops systemd[1]: Stopped Jenkins Continuous Integration Server.
Mar 11 09:51:28 devops systemd[1]: jenkins.service: Start request repeated too quickly.
Mar 11 09:51:28 devops systemd[1]: jenkins.service: Failed with result 'exit-code'.
Mar 11 09:51:28 devops systemd[1]: Failed to start Jenkins Continuous Integration Server.


젠킨스는 8과 11만을 지원하기때문에 자바 버전을 변경해줘야 한다.
root@devops:/# update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

 Selection Path Priority Status
------------------------------------------------------------
 0 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 auto mode
* 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
 2 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 manual mode
 3 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode

Press <enter> to keep the current choice[*], or type selection number: 




2022/03/11 10:08 2022/03/11 10:08