일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Java
- Eclipse
- MariaDB
- centos7
- NextJS
- security
- config
- Push
- FCM
- nodejs
- SpringBoot
- yona
- PM2
- mysql
- javascript
- submit
- Maven
- spring3
- popup
- jquery
- git
- mybatis
- MSsql
- Next.js
- rocky9
- jenkins
- pwa
- node.js
- ajax
- docker
- Today
- Total
ふたりで
jenkins upgrade후 해주어야 할 것들 java11 본문
기존 jenkins를 2.1XX.X 버전을 사용하고 있었는데 현재 기준 최신버전 2.426.2 버전으로 업그레이드를
하고 나니 jenkins가 실행이 아니 된다...
하여 해결했던 과정을 정리해 본다.
1. jenkins 최신버전 war파일 다운로드.
https://get.jenkins.io/war-stable/2.426.2/jenkins.war
2. 기존 jenkins.war 파일 백업 및 다운로드한 jenkins.war 파일로 교체 작업은 /home/graykang 에서 한다.
백업 # cp /usr/share/java/jenkins.war ./jenkins.backup.war
교체 # cp ./jenkins.war /usr/share/java/
3. 2번까지 하고 jenkins를 실행하면 아래와 같은 오류가 빡 발생한다.
]# systemctl start jenkins
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
]#
겁내 구글링을 해본 결과 음... jenkins의 실행 포트문제 또는 JAVA버전문제라고...
4. jenkins.service 상태를 확인하면 아래와 같이 나온다.
]# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/jenkins.service.d
└─override.conf
Active: failed (Result: start-limit) since 수 2024-01-17 15:56:25 KST; 56min ago
Process: 7360 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 7360 (code=exited, status=1/FAILURE)
1월 17 15:56:25 localhost.localdomain systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
1월 17 15:56:25 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
1월 17 15:56:25 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
1월 17 15:56:25 localhost.localdomain systemd[1]: jenkins.service failed.
1월 17 15:56:25 localhost.localdomain systemd[1]: jenkins.service holdoff time over, scheduling restart.
1월 17 15:56:25 localhost.localdomain systemd[1]: Stopped Jenkins Continuous Integration Server.
1월 17 15:56:25 localhost.localdomain systemd[1]: start request repeated too quickly for jenkins.service
1월 17 15:56:25 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
1월 17 15:56:25 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
1월 17 15:56:25 localhost.localdomain systemd[1]: jenkins.service failed.
]#
음...failed 라네.... 구글링을 통해 습득한 정보를 토대로 ㄱㄱㄱ
4. yum으로 openjdk-11을 설치해 준다.
]# yum install -y java-11-openjdk-devel.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.kaist.ac.kr
* extras: ftp.kaist.ac.kr
* updates: ftp.kaist.ac.kr
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
--> Running transaction check
---> Package java-11-openjdk-devel.x86_64 1:11.0.21.0.9-1.el7_9 will be installed
--> Processing Dependency: java-11-openjdk(x86-64) = 1:11.0.21.0.9-1.el7_9 for package: 1:java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64
--> Running transaction check
---> Package java-11-openjdk.x86_64 1:11.0.21.0.9-1.el7_9 will be installed
--> Processing Dependency: java-11-openjdk-headless(x86-64) = 1:11.0.21.0.9-1.el7_9 for package: 1:java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64
--> Running transaction check
---> Package java-11-openjdk-headless.x86_64 1:11.0.21.0.9-1.el7_9 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================================================================================
Installing:
java-11-openjdk-devel x86_64 1:11.0.21.0.9-1.el7_9 updates 3.4 M
Installing for dependencies:
java-11-openjdk x86_64 1:11.0.21.0.9-1.el7_9 updates 242 k
java-11-openjdk-headless x86_64 1:11.0.21.0.9-1.el7_9 updates 39 M
Transaction Summary
===============================================================================================================================================================================================================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 43 M
Installed size: 170 M
Downloading packages:
(1/3): java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64.rpm | 242 kB 00:00:00
(2/3): java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64.rpm | 3.4 MB 00:00:00
(3/3): java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64.rpm | 39 MB 00:00:03
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 10 MB/s | 43 MB 00:00:04
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64 1/3
Installing : 1:java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64 2/3
Installing : 1:java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64 3/3
Verifying : 1:java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64 1/3
Verifying : 1:java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64 2/3
Verifying : 1:java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64 3/3
Installed:
java-11-openjdk-devel.x86_64 1:11.0.21.0.9-1.el7_9
Dependency Installed:
java-11-openjdk.x86_64 1:11.0.21.0.9-1.el7_9 java-11-openjdk-headless.x86_64 1:11.0.21.0.9-1.el7_9
Complete!
]#
5. jenkins.service 내용 수정.
centos7의 기본 JAVA_HOME 설정은 jdk1.8로 되어있는 상태이고 추가로 jdk11을 설치한 상태이며 이 상태에서
jenkins가 구동될 때만 jdk11을 바라보도록 해준다.
yum으로 jdk를 설치할 경우 보통 /usr/lib/jvm/ 경로에 설치가 된다.
]# vi /usr/lib/systemd/system/jenkins.service
수정한 부분: jdk11 경로 설정 및 jenkins의 포트설정.
# The Java home directory. When left empty, JENKINS_JAVA_CMD and PATH are consulted.
Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64/"
# Port to listen on for HTTP requests. Set to -1 to disable.
# To be able to listen on privileged ports (port numbers less than 1024),
# add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities
# directive below.
Environment="JENKINS_PORT=9100"
위와 같이 설정해 주고 실행하니 아주 잘 된다. ㅎㅎ http://localhost:9100/으로 접근하면 새로 바뀐 로그인 화면이 뜨고
로그인하면 기존에 등록했던 Job들도 잘 보인다.
참고로 이 글을 작성하는 기준 24년 6월에 CentOS7 지원이 공식 적으로 중단된다고 한다 ㅠㅜ;;
나만 몰랐던것 같다 ㅠㅜ;;;
한바탕 뒤집어질 것 같다;;;;;
'Jenkins' 카테고리의 다른 글
Jenkins + GIT + Tag + RollBack (0) | 2024.03.21 |
---|---|
jenkins + yona(Git) + node.js + next.js + deploy config (0) | 2024.02.02 |
jenkins+SVN Tag를 활용한 이전(과거) 빌드번호로 재배포 하기 (0) | 2024.01.08 |
tomcat8 manager 설정. (0) | 2020.05.14 |
Centos7+jenkins+Maven+SVN+tomcat8 배포 설정. (0) | 2020.05.14 |