
환경: 톰캣 9, 젠킨스 2.346.1
설명: 톰캣 8에서 9로 변경중에 오류 발생
오류 메시지:
org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/lib/jenkins/workspace/.war파일]
..
.
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
..
.
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://도메인:포트/manager/text/list
..
.
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
..
.
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://도메인:포트/manager/text/list
..
.
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE
해결방법:
1. /usr/local/apache-tomcat-9.0.115/conf/Catalina 경로 dir 내부에 도메인과 일치하는 dir 생성(예시: devsim.dev.co.kr)
해당 dir은 chmod 750 ok
2. 해당 dir 내부에 vi manager.xml 파일 생성 후 3번 내용을 입력(manager.xml 파일은 chmod 644 ok)
3. 내용
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" /> </Context>
4. service jenkins restart 로 젠킨스 재시작
5. 빌드를 진행해서 정상적으로 동작하는지 확인한다.










































