티스토리 뷰

반응형

*현상


톰캣 구동을 하려고 했으나, failed라고 빨갛게 뜬다. 

journal -xe 명령어를 치자 아래와 같은 실패 로그가 나왔다. 




Failed at step EXEC spawning /etc/rc.d/init.d/tomcat: Exec for-- Subject: Process /etc/rc.d/init.d/tomcat could not be executed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- The process /etc/rc.d/init.d/tomcat could not be executed and failed.

--

-- The error number returned by this process is 8.

12월 14 09:13:52 localhost.localdomain systemd[1]: tomcat.service: control process exited, code=exited status=203

12월 14 09:13:52 localhost.localdomain systemd[1]: Failed to start SYSV: Tomcat Start Stop Restart.

-- Subject: Unit tomcat.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit tomcat.service has failed.

--

-- The result is failed.

12월 14 09:13:52 localhost.localdomain systemd[1]: Unit tomcat.service entered failed state.

12월 14 09:13:52 localhost.localdomain systemd[1]: tomcat.service failed.

12월 14 09:13:52 localhost.localdomain polkitd[679]: Unregistered Authentication Agent for unix-process:unix-process:30153:1269850145lines 3627-3655/3655 (END)



....

(중간 생략)

....



 Unit tomcat.service has begun starting up.

localhost.localdomain systemd[30160]: Failed at step EXEC spawning /etc/rc.d/init.d/tomcat: Exec form

-- Subject: Process /etc/rc.d/init.d/tomcat could not be executed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- The process /etc/rc.d/init.d/tomcat could not be executed and failed.

--

-- The error number returned by this process is 8.

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit tomcat.service has begun starting up.

localhost.localdomain systemd[30160]: Failed at step EXEC spawning /etc/rc.d/init.d/tomcat: Exec form

-- Subject: Process /etc/rc.d/init.d/tomcat could not be executed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- The process /etc/rc.d/init.d/tomcat could not be executed and failed.

--

-- The error number returned by this process is 8.

localhost.localdomain systemd[1]: tomcat.service: control process exited, code=exited status=203

localhost.localdomain systemd[1]: Failed to start SYSV: Tomcat Start Stop Restart.

-- Subject: Unit tomcat.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit tomcat.service has failed.




*해결


로그만 보고 이것저것 검색하다가

Failed at step EXEC spawning /etc/rc.d/init.d/tomcat: Exec format error 이라고 검색을 하면 

이런 주소의 페이지가 나온다. 

https://bbs.archlinux.org/viewtopic.php?id=149425 


읽어보면 #!/bin/bash를 넣었더니 잘 되더라는 내용이다.

처음에는 설마 #!/bin/bash를 깜박했을소냐. 이렇게 생각했는데 설마가 사실이었다. 


init.d에 있는 tomcat 설정 문서를 봤는데 없었다ㅠㅠ....  #!/bin/bash를 추가하고

systemctl daemon-reload 를 실행 한 후 (안 하면 하라고 나온다 ㅎㅎ)

tomcat을 시작하면 실행된다.

반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
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
글 보관함