-1

I am trying to set up an application as a service on OpenSUSE LEAP 15. Googling around I found that one does that (or should I say "one can do that"?) by providing a file <servicename>.service in /usr/lib/systemd/system/ and then one enables that service using YaST. I provided such a file (copying from a tomcat.service file already on the machine and replacing the misc. entries with values relevant for my application).

The setup using YaST seemed to have worked OK, the service was listed and I enabled it. But now I have an issue: when I start the application using service <servicename> start the startup fails. Using service <servicename> status I see the last 10 lines of some log which read:

Jun 08 14:41:04 test-vm ctlscript.sh[31955]:         at java.lang.reflect.Method.invoke(Method.java:498)
Jun 08 14:41:04 test-vm ctlscript.sh[31955]:         at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:371)
Jun 08 14:41:04 test-vm ctlscript.sh[31955]:         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:458)
...

This is the tail of some Java stacktrace, so obviously there is some exception while starting up. But to be able to figure out what is going wrong I would need to see more from that log but where is this service command logging to? I.e. from which logfile does the above content of the service ... status command come from?

mmo
  • 3,897
  • 11
  • 42
  • 63

1 Answers1

0

Ah - I finally found the solution: one can use journalctl -u <servicename> to see all log entries of a specific service. While that doesn't answer the original question it serves the underlying purpose of the question, namely to see all log entries for a specific service.

mmo
  • 3,897
  • 11
  • 42
  • 63