【问题标题】:Ubuntu tells me my init.d Service of spring boot application not found and can not to run itUbuntu告诉我找不到spring boot应用程序的init.d服务并且无法运行它
【发布时间】:2021-05-27 11:42:13
【问题描述】:

我已经按照 Spring Boot 部署安装为 init.d 服务(系统 V) https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment-install

我的操作如下:

sudo ln -s /home/centre-0.0.1-SNAPSHOT.jar /etc/init.d/centre-0.0.1-SNAPSHOT

然后开始:

service centre-0.0.1-SNAPSHOT start

我收到一个错误:

Failed to start centre-0.0.1-SNAPSHOT.service: Unit centre-0.0.1-SNAPSHOT.service not found.

有没有忘记的操作?

【问题讨论】:

  • 假设您是按照文档一步一步来的,您可能需要检查权限。
  • @z atef 是的,我已经按照每个步骤进行操作,并使用 sudo /etc/init.d/centre-0.0.1-SNAPSHOT start 命令作为启动的替代方法。我还得到了一个错误告诉我 sudo: /etc/init.d/centre-0.0.1-SNAPSHOT: command not found

标签: java linux spring-boot ubuntu


【解决方案1】:

我使用了 sudo chmod +x /etc/inti.d/appname 命令和 sudo /etc/init.d/appname start 命令。它有效。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-20
    • 2021-07-29
    • 1970-01-01
    • 2020-10-03
    • 1970-01-01
    • 2017-12-15
    • 2018-05-08
    • 2020-05-12
    相关资源
    最近更新 更多