본문 바로가기
인프라/젠킨스(jenkins)

[Jenkins] 젠킨스 버전 업그레이드 롤백

by IT맥구리나스 2022. 6. 15.

알람창에 신규버전을 받을 수있다는 알람이 나오고 "여기"버튼을 누르면 jenkins.war파일이 받아지는데

이럴필요없이 yum으로 구축했다면 yum으로 업데이트해주면 된다.

jenkins 업데이트 방법

## stop service
systemctl stop jenkins

##인증키 등록
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

## yum update
yum update jenkins -y

## start service
systemctl daemon-reload
systemctl start jenkins

## 다운그레이드 방법(롤백)
yum downgrade jenkins

 

업그레이드 후 문제발생

 yum 으로 업데이트를 했는데 구동이 안되는 문제가 있을 수 있다.

이 경우 구버전 설정이 남아서 그런건데 아래 파일을 삭제하고 재구동하면 된다.

/etc/systemd/system/jenkins.service.d/override.conf

2022년 centos7 jenkins의 경우 /usr/lib/systemd/system/jenkins.service에서 설정변경을 하는데

버전업그레이드가 되면서 /etc/systemd/system/jenkins.service.d/override.conf에 기존버전의 설정이 저장된다.

왜 그런지는 모르겠지만 override.conf 구동이 안되었다..

● jenkins.service - Jenkins Continuous Integration Server
   Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/jenkins.service.d
           └─override.conf
   Active: failed (Result: start-limit) since Fri 2022-06-24 10:24:38 KST; 2min 11s ago
  Process: 2881 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
 Main PID: 2881 (code=exited, status=1/FAILURE)

Jun 24 10:24:38 seo-node00-centos systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Jun 24 10:24:38 seo-node00-centos systemd[1]: Failed to start Jenkins Continuous Integration Server.
Jun 24 10:24:38 seo-node00-centos systemd[1]: Unit jenkins.service entered failed state.
Jun 24 10:24:38 seo-node00-centos systemd[1]: jenkins.service failed.
Jun 24 10:24:38 seo-node00-centos systemd[1]: jenkins.service holdoff time over, scheduling restart.
Jun 24 10:24:38 seo-node00-centos systemd[1]: Stopped Jenkins Continuous Integration Server.
Jun 24 10:24:38 seo-node00-centos systemd[1]: start request repeated too quickly for jenkins.service
Jun 24 10:24:38 seo-node00-centos systemd[1]: Failed to start Jenkins Continuous Integration Server.
Jun 24 10:24:38 seo-node00-centos systemd[1]: Unit jenkins.service entered failed state.
Jun 24 10:24:38 seo-node00-centos systemd[1]: jenkins.service failed.

 

그런데 jenkins 2.346.1-1-1 버전으로 업그레이를 하면 https가 먹히질 않는다.

/usr/lib/systemd/system/jenkins.service 에서 https 옵션 수정하면 시작시 오류발생

/etc/sysconfig/jenkins 파일에서 https 옵션 수정 후 시작해도 적용안됨

 

결국에는 2.332.4-1.1 버전으로 롤백해서 다시 사용하고있다..

 

 

몇달뒤 방법을 찾았는데

java11을 깔면 문제는 해결된다.


아래 제대로된 업그레이드 방법 참조

https://magnuxx.tistory.com/entry/JENKINS-CENTOS-%EC%A0%A0%ED%82%A8%EC%8A%A4-%EC%97%85%EA%B7%B8%EB%A0%88%EC%9D%B4%EB%93%9C-2443

반응형

댓글