我正在尝试将 Node.js API 作为服务运行,但遇到了问题。
运行时systemctl status servicename.service
出现以下错误:
servicename.service - [Service description]
Loaded: leaded (/etc/systemd/system/servicename.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since [timestamp] ago
Process: 1142 ExecStart=/usr/bin/node /home/pi/Documents/server.js (code=exited, status=0/SUCCESS)
Main PID: 1142 (code=exited, status=0/SUCCESS)
[timestamp] hostname systemd[1]: servicename.service: Service hold-off time over, scheduling restart.
[timestamp] hostname systemd[1]: Stopped [Service description]
[timestamp] hostname systemd[1]: servicename.service: Start request repeated too quickly.
[timestamp] hostname systemd[1]: Failed to start [Service description]
[timestamp] hostname systemd[1]: servicename.service: Unit entered failed state.
[timestamp] …
Run Code Online (Sandbox Code Playgroud) 我正在运行 Ubuntu 14.10,当我打开“打印机”对话框时,收到一条错误消息“打印服务不可用。在此计算机上启动该服务或连接到另一台服务器”。
启动服务按钮呈灰色。
我试过了
$ sudo service cups start
start: Job is already running: cups
Run Code Online (Sandbox Code Playgroud)
其次是
ps -ef|grep cups | grep -v grep
root 1210 1 0 08:15 ? 00:00:03 /usr/sbin/cups-browsed
Run Code Online (Sandbox Code Playgroud)
我试图在日志中找到一些关于此的信息,但日志已经好几天没有被触及(并且它们是零字节)
ls -t -l
total 96
-rw-r----- 1 root lpadmin 0 Jan 3 08:45 access_log
-rw-r----- 1 root lpadmin 0 Jan 3 08:45 page_log
-rw-r----- 1 root lpadmin 7920 Jan 2 13:22 access_log.1
-rw-r----- 1 root lpadmin 3389 Jan 2 13:17 page_log.1
-rw-r----- 1 root lpadmin 125 Dec …
Run Code Online (Sandbox Code Playgroud)