[英]Ubuntu tells me my init.d Service of spring boot application not found and can not to run it
[英]Spring Boot init.d not Not running (process not found)
我试图按照此处的说明操作,尝试将 Spring Boot 应用程序作为 init.d 服务运行,但未能成功。
如前所述,我创建了完全可执行的 jar (myapp.jar),并创建了指向/etc/init.d/myapp的符号链接。当我运行java -jar myapp.jar 时,我可以看到应用程序成功启动。
但是当我尝试使用
service myapp status
它说Not running (process not found)
service myapp start
它说Failed to start
文档说“假设您在 /var/myapp 中安装了 Spring Boot 应用程序”,我不太明白这一点。 我将可执行 jar(通过 Jenkins)复制到 /var/myapp。 所以它只包含一个 jar 文件。 这会造成问题吗?
任何建议表示赞赏。
环境:
springBootVersion = '1.3.2.RELEASE'
JDK6 (yes it is)
Ubuntu 12.04
有时,您可能需要运行: sudo systemctl daemon-reload
才能加载新服务。
在 ubuntu 中,您需要使用sudo systemctl daemon-reload
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.