简体   繁体   中英

Spring Boot init.d not Not running (process not found)

I was trying to follow the instructions from here , where trying to run the Spring Boot app as init.d service but could not successfully.

I created the fully executable jar (myapp.jar) as mentioned and also created the symlink to /etc/init.d/myapp When I run the java -jar myapp.jar I could see the application start up successfully.

But when I try to use

service myapp status it says Not running (process not found)

service myapp start it says Failed to start

the documentation says " Assuming that you have a Spring Boot application installed in /var/myapp " I don't understand this point quite well. I copied the executable jar (via Jenkins) to /var/myapp. so it contains only one file which is jar. does this create the problem?

Any suggestions are appreciated.

Environment:

springBootVersion = '1.3.2.RELEASE'
JDK6 (yes it is)
Ubuntu 12.04

有时,您可能需要运行: sudo systemctl daemon-reload才能加载新服务。

在 ubuntu 中,您需要使用sudo systemctl daemon-reload

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM