티스토리 뷰
[Tomcat에러] Failed at step EXEC spawning /etc/rc.d/init.d/tomcat: Exec format error
sonna 2018. 12. 14. 09:48*현상
톰캣 구동을 하려고 했으나, 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을 시작하면 실행된다.
'문제해결을 위한 몸부림' 카테고리의 다른 글
엔터키를 쳤을 때 submit이 실행되는 현상 (0) | 2019.03.15 |
---|---|
[mysql 에러] THE TOTAL NUMBER OF LOCKS EXCEEDS THE LOCK TABLE SIZE (0) | 2019.03.15 |
[Firebase 에러] Request had invalid authentication credentials (2) | 2019.01.23 |
[Tomcat에러] Multiple Contexts have a path of "...." (0) | 2018.11.22 |
[mysql에러] Error Code: 1615 Prepared statement needs to be re-prepared (0) | 2018.10.24 |