vmware上でapacheとtomcatをインストールして動かしたいのですがapacheは入りましたがtomcatを起動するとエラーになり、原因がエラーログを見てもわかりません。権限も与えていると思うのですが上手く動作しなくて困っています。bugという単語もエラーに出てきていますがバグなのでしょうか
ご存じの方、お手数おかけして申し訳ないですがアドバイスお願いします。
環境
CentOS Linux release 8.3.2011
【エラーメッセージ】
[root@localhost bin]# systemctl start tomcat.service
Job for tomcat.service failed because the control process exited with error code.
See "systemctl status tomcat.service" and "journalctl -xe" for details.
【権限】
[root@localhost opt]# ll
合計 0
drwxr-xr-x. 9 tomcat tomcat 220 3月 12 07:06 apache-tomcat-9.0.43
[root@localhost opt]#
【/var/log/messages】
Mar 12 07:24:56 localhost systemd[1]: Starting Apache Tomcat 9...
Mar 12 07:24:56 localhost systemd[12746]: tomcat.service: Failed to execute command: Permission denied
Mar 12 07:24:56 localhost systemd[12746]: tomcat.service: Failed at step EXEC spawning /opt/apache-tomcat-9.0.43/bin/startup.sh: Permission denied
Mar 12 07:24:56 localhost systemd[1]: tomcat.service: Main process exited, code=exited, status=203/EXEC
Mar 12 07:24:56 localhost systemd[1]: tomcat.service: Failed with result 'exit-code'.
Mar 12 07:24:56 localhost systemd[1]: Failed to start Apache Tomcat 9.
Mar 12 07:24:56 localhost dbus-daemon[949]: [system] Activating service name='org.fedoraproject.Setroubleshootd' requested by ':1.492' (uid=0 pid=896 comm="/usr/sbin/sedispatch " label="system_u:system_r:auditd_t:s0") (using servicehelper)
Mar 12 07:24:56 localhost dbus-daemon[12755]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
Mar 12 07:24:57 localhost dbus-daemon[949]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Mar 12 07:24:58 localhost dbus-daemon[949]: [system] Activating service name='org.fedoraproject.SetroubleshootPrivileged' requested by ':1.777' (uid=991 pid=12755 comm="/usr/libexec/platform-python -Es /usr/sbin/setroub" label="system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023") (using servicehelper)
Mar 12 07:24:58 localhost dbus-daemon[12768]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
Mar 12 07:25:01 localhost dbus-daemon[949]: [system] Successfully activated service 'org.fedoraproject.SetroubleshootPrivileged'
Mar 12 07:25:04 localhost setroubleshoot[12755]: SELinux is preventing /usr/lib/systemd/systemd from execute access on the file startup.sh. For complete SELinux messages run: sealert -l b20080c8-091c-45dd-8f28-914b4c513eb9
Mar 12 07:25:04 localhost setroubleshoot[12755]
: SELinux is preventing /usr/lib/systemd/systemd from execute access on the file startup.sh.#012#012*****
Plugin catchall (100. confidence) suggests **************************
#012#012If you believe that systemd should be allowed execute access on the startup.sh file by default.
#012Then you should report this as a bug.#012You can generate a local policy module to allow this access
.#012Do#012allow this access for now by executing:#012# ausearch -c '(artup.sh)' --raw | audit2allow -M my-artupsh#012# semodule -X 300 -i my-artupsh.pp#012
[root@localhost conf]#
【tomcat.service】
[root@localhost system]# cat tomcat.service
[Unit]
Description=Apache Tomcat 9
After=network.target
[Service]
User=tomcat
Group=tomcat
Type=oneshot
PIDFile=/opt/apache-tomcat-9.0.43/tomcat.pid
RemainAfterExit=yes
ExecStart=/opt/apache-tomcat-9.0.43/bin/startup.sh
ExecStop=/opt/apache-tomcat-9.0.43/bin/shutdown.sh
ExecReStart=/opt/apache-tomcat-9.0.43/bin/shutdown.sh;/opt/apache-tomcat-9.0.44/bin/startup.sh
[Install]
WantedBy=multi-user.target
[root@localhost system]#