[systemd-devel] Failed to start Apache Tomcat Web Application Container

Michal Sekletar msekleta at redhat.com
Wed Jul 25 10:31:15 UTC 2018


On Tue, Jul 24, 2018 at 5:04 PM Mark Huggins <mark.huggins315 at gmail.com> wrote:
> Question:
> Is there way to modify the template file: tomcat.service.erb to include creating ‘/opt/tomcat/logs/catalina.out' file prior to execution of the 'sudo systemctl daemon-reload'command? Also, I'm unsure how long  the command: 'sudo systemctl daemon-reload'  takes and perhaps is a causing the failed state of the tomcat.service since it times out?. If there's another resolution to this issue or the path I'm leading towards is the wrong direction, please advise.

In order to run some helper script prior to starting your actual
service, you can add ExecStartPre= stanza to your tomcat.service.erb
template. However, this seems more like SELinux issue instead of the
service issue. Please try to use distribution rpm instead of the
upstream download. Alternatively, you can set SELinux to permissive
mode.

Michal


More information about the systemd-devel mailing list