Serviço Tomcat falhou

Serviço Tomcat falhou

Olá, estou tentando executar o status do meu Apache Tomcat e continuo falhando. isso é o que estou recebendo

tomcat.service - Tomcat 10 configuration file
     Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Thu 2023-09-07 13:02:48 EDT; 53min ago
        CPU: 3ms

Sep 07 13:02:48 server1.example.com systemd[1]: Starting Tomcat 10 configuration file...
Sep 07 13:02:48 server1.example.com systemd[1263]: tomcat.service: Failed to locate executable /usr/local/tomcat10-server/bin/catalina.sh: Permission denied
Sep 07 13:02:48 server1.example.com systemd[1263]: tomcat.service: Failed at step EXEC spawning /usr/local/tomcat10-server/bin/catalina.sh: Permission denied
Sep 07 13:02:48 server1.example.com systemd[1]: tomcat.service: Control process exited, code=exited, status=203/EXEC
Sep 07 13:02:48 server1.example.com systemd[1]: tomcat.service: Failed with result 'exit-code'.
Sep 07 13:02:48 server1.example.com systemd[1]: Failed to start Tomcat 10 configuration file.

meu arquivo nano /etc/systemd/system/tomcat.serviceé:

[Unit]
Description=Tomcat 10 configuration file
After=syslog.target network.target
[Service]
Type=forking
User=tomcat
Group=tomcat
Environment=JAVA_HOME=/usr/lib/jvm/jre-17-openjdk
Environment='JAVA_OPTS=-Djava.awt.headless=true'
Environment=CATALINA_HOME=/usr/local/tomcat10-server
Environment=CATALINA_BASE=/usr/local/tomcat10-server
Environment=CATALINA_PID=/usr/local/tomcat10-server/temp/tomcat.pid
ExecStart=/usr/local/tomcat10-server/bin/catalina.sh start
ExecStop=/usr/local/tomcat10-server/bin/catalina.sh stop
[Install]
WantedBy=multi-user.target

Como posso corrigir isso para que isso não falhe?

Responder1

Sua mensagem de erro diz “permissão negada” em catalina.sh. Verifique se o arquivo é executável e também pertence ao tomcatusuário especificado no arquivo de serviço.

informação relacionada