这是我的日志:
Feb 10 10:19:25 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service...
Feb 10 10:19:26 ip-172-31-47-29 tnr-photos[67938]: Server running on port 2200
Feb 10 10:20:56 ip-172-31-47-29 systemd[1]: tnr-photos.service: start operation timed out. Terminating.
Feb 10 10:20:56 ip-172-31-47-29 systemd[1]: tnr-photos.service: Failed with result 'timeout'.
Feb 10 10:20:56 ip-172-31-47-29 systemd[1]: Failed to start TNR Photo Download Service.
Feb 10 10:21:01 ip-172-31-47-29 systemd[1]: tnr-photos.service: Scheduled restart job, restart counter is at 14.
Feb 10 10:21:01 ip-172-31-47-29 systemd[1]: Stopped TNR Photo Download Service.
Feb 10 10:21:01 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service...
Feb 10 10:21:01 ip-172-31-47-29 tnr-photos[67988]: Server running on port 2200
Feb 10 10:22:31 ip-172-31-47-29 systemd[1]: tnr-photos.service: start operation timed out. Terminating.
Feb 10 10:22:31 ip-172-31-47-29 systemd[1]: tnr-photos.service: Failed with result 'timeout'.
Feb 10 10:22:31 ip-172-31-47-29 systemd[1]: Failed to start TNR Photo Download Service.
Feb 10 10:22:36 ip-172-31-47-29 systemd[1]: tnr-photos.service: Scheduled restart job, restart counter is at 15.
Feb 10 10:22:36 ip-172-31-47-29 systemd[1]: Stopped TNR Photo Download Service.
Feb 10 10:22:36 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service...
Feb 10 10:22:37 ip-172-31-47-29 tnr-photos[68036]: Server running on port 2200
Feb 10 10:24:07 ip-172-31-47-29 systemd[1]: tnr-photos.service: start operation timed out. Terminating.
Feb 10 10:24:07 ip-172-31-47-29 systemd[1]: tnr-photos.service: Failed with result 'timeout'.
Feb 10 10:24:07 ip-172-31-47-29 systemd[1]: Failed to start TNR Photo Download Service.
Feb 10 10:24:12 ip-172-31-47-29 systemd[1]: tnr-photos.service: Scheduled restart job, restart counter is at 16.
Feb 10 10:24:12 ip-172-31-47-29 systemd[1]: Stopped TNR Photo Download Service.
Feb 10 10:24:12 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service...
Feb 10 10:24:12 ip-172-31-47-29 tnr-photos[68068]: Server running on port 2200
Feb 10 10:25:42 ip-172-31-47-29 systemd[1]: tnr-photos.service: start operation timed out. Terminating.
Feb 10 10:25:42 ip-172-31-47-29 systemd[1]: tnr-photos.service: Failed with result 'timeout'.
Feb 10 10:25:42 ip-172-31-47-29 systemd[1]: Failed to start TNR Photo Download Service.
Feb 10 10:25:47 ip-172-31-47-29 systemd[1]: tnr-photos.service: Scheduled restart job, restart counter is at 17.
Feb 10 10:25:47 ip-172-31-47-29 systemd[1]: Stopped TNR Photo Download Service.
Feb 10 10:25:47 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service...
Feb 10 10:25:48 ip-172-31-47-29 tnr-photos[68101]: Server running on port 2200
该服务定义如下:
[Unit]
Description=TNR Photo Download Service
After=network.target
[Service]
Type=forking
User=ubuntu
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Restart=always
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=tnr-photos
WorkingDirectory=/home/ubuntu/tnr-web-photos
ExecStart=sudo /usr/bin/node /home/ubuntu/tnr-web-photos/index.js
[Install]
WantedBy=multi-user.target
这是一个非常简单的nodeJS
服务器,所有的行都tnr-photos[68101]: Server running on port 2200
表明它实际上正在正常启动。
怎么老是超时?