환경 : CentOS 7
설치 프로그램 : 젠킨스
문제 : CentOS 7 환경에서 젠킨스를 테스트 하기 위하여 설치 후 서비스를 시작하려고 하는데
자꾸 아래와 같은 오류가 발생하였다.
[root@localhost ~]# service jenkins start
Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
[실패]
[root@localhost ~]# systemctl status jenkins.service //자세한 사항을 확인하라고 하여 확인을 해보았다
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 목 2022-06-30 08:32:00 KST; 7s ago
Process: 7079 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 7079 (code=exited, status=1/FAILURE)
localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
localhost.localdomain systemd[1]: jenkins.service failed.
localhost.localdomain systemd[1]: jenkins.service holdoff time over, scheduling restart.
localhost.localdomain systemd[1]: Stopped Jenkins Continuous Integration Server.
localhost.localdomain systemd[1]: start request repeated too quickly for jenkins.service
localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
localhost.localdomain systemd[1]: jenkins.service failed.
[root@localhost ~]# journalctl -xe //더 자세한 사항을 확인해보라고 하여 확인 해보았다.....
localhost.localdomain jenkins[7079]: Caused: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349)
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310)
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.server.Server.doStart(Server.java:401)
localhost.localdomain jenkins[7079]: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
localhost.localdomain jenkins[7079]: at winstone.Launcher.<init>(Launcher.java:202)
localhost.localdomain jenkins[7079]: Caused: java.io.IOException: Failed to start Jetty
localhost.localdomain jenkins[7079]: at winstone.Launcher.<init>(Launcher.java:206)
localhost.localdomain jenkins[7079]: at winstone.Launcher.main(Launcher.java:405)
localhost.localdomain jenkins[7079]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
localhost.localdomain jenkins[7079]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
localhost.localdomain jenkins[7079]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
localhost.localdomain jenkins[7079]: at java.lang.reflect.Method.invoke(Method.java:498)
localhost.localdomain jenkins[7079]: at Main._main(Main.java:342)
localhost.localdomain jenkins[7079]: at Main.main(Main.java:117)
localhost.localdomain systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
원인 : 포트가 충돌나서 발생하는 문제이다. 분명 블로그 등에서 검색해서 /etc/sysconfig/jenkins 경로의 포트를 8080에서 9090으로 변경했는데... 오류가 발생하였다. 그리하여 로그를 자세히 보니 /usr/lib/systemd/system/jenkins.service 파일에도 동일한 내용이 들어있었다.
해결책 : vi나 vim을 사용하여 jenkins.service 파일의 Environment="JENKINS_PORT=9090"로 변경 후 다시 service jenkins start를 시도해 보면 정상적으로 젠킨스 서비스가 올라오는 것을 확인 할 수 있다.
'VCS, CI' 카테고리의 다른 글
젠킨스 Jenkins TomcatManagerException: The Tomcat Manager responded "<html> ... 문제 해결 (0) | 2022.07.13 |
---|---|
젠킨스 SSLHandshakeException: No subject alternative names matching IP address IP Address found 문제 해결 (0) | 2022.07.13 |
젠킨스 TLS(SSL) 접속 설정 방법 (0) | 2022.07.07 |
스프링 외부 jar 파일 추가 후 젠킨스 빌드하기 (0) | 2022.07.05 |
SVN E160028 오류 조치방법 (0) | 2018.06.21 |