尝试运行 systemd 服务但找不到目录

尝试运行 systemd 服务但找不到目录

我正在尝试使用 在启动时运行 Lavalink 服务器systemd

这是我的.service文件

[Unit]
Description=Lavalink Server
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=bubble
WorkingDirectory=/home/bubble/Desktop/Project\ Proton
ExecStart=/usr/bin/java -jar ./Lavalink/Lavalink.jar

[Install]
WantedBy=multi-user.target

但是启动失败,以下是Journalctl的日志:

Apr 07 14:45:44 sen-zen systemd[1]: Started lavalink_server.service.
Apr 07 14:45:44 sen-zen systemd[13520]: lavalink_server.service: Changing to the requested working directory failed: No such file or directory
Apr 07 14:45:44 sen-zen systemd[13520]: lavalink_server.service: Failed at step CHDIR spawning /usr/bin/java: No such file or directory
Apr 07 14:45:44 sen-zen systemd[1]: lavalink_server.service: Main process exited, code=exited, status=200/CHDIR
Apr 07 14:45:44 sen-zen systemd[1]: lavalink_server.service: Failed with result 'exit-code'.

它说Failed at step CHDIR spawning /usr/bin/java: No such file or directory ,但是,这是输出whereis java

┌─[bubble@sen-zen] - [~] - [547]
└─[$] whereis java                                                                                                                                                                 [15:06:06]
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz

我尝试搜索此问题,但没有找到任何可以真正解决我的问题的方法。我做错了什么,有人能帮我吗?

答案1

该目录存在吗?

/home/bubble/Desktop/Project\ Proton

错误状态

Changing to the requested working directory failed: No such file or directory

相关内容