OpenSuse服务:日志在哪里?
我试图在Opensuse Leap 15上设置应用程序作为服务。 谷歌搜索搜索我发现这样做(或者我应该说“一个人可以做到”?),通过提供文件< serviceName> .service
in /usr/usr/lib/systemd/system /
,然后使用yast启用该服务。 我提供了这样的文件(从tomcat.service
文件复制,并用与我的应用程序相关的值替换杂项条目)。
使用Yast的设置似乎可以正常工作,列出了该服务,我启用了它。但是现在我有一个问题:当我使用service< serviceName>启动应用程序时启动
启动失败。使用服务< serviceName>状态
我看到了一些日志的最后10行,这些日志读:
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)
...
这是一些Java stacktrace的尾巴,因此显然在启动时有一些例外。 但是,要弄清楚出了什么问题,我需要从该日志中看到更多,但是此服务命令记录到哪里?即service ... status
命令来自哪个logFile?来自哪个logFile?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊 - 我终于找到了解决方案:一个人可以使用
journalctl -u&lt; serviceName&gt;
查看特定服务的所有日志条目。尽管这没有回答原始问题,但它是问题的根本目的,即查看特定服务的所有日志条目。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.