0

Here is my log :

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

The service is defined as follows :

[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

It's a very simple nodeJS server and all the lines tnr-photos[68101]: Server running on port 2200 indicate that it is in fact starting properly.

How come it keeps timing out ?

Chapo
  • 71
  • 1
  • 8
  • Is `sudo /usr/bin/node /home/ubuntu/tnr-web-photos/index.js` as user `ubuntu` running without prompting for a password (sudoers set)? If it is running, are there any special ENV Vars set for user `ubuntu`which needs to be added to the [Service] as Environment.? Can you add more log data e.g. from `journalctl -xe`? – Michael D. Feb 10 '21 at 12:04
  • Thks for asking. it runs without prompting and this specific node server does not use any environment variables. I have deactivated it for the time being so don't have access to journalctl for it. If absolutely necessary I can rerun it. – Chapo Feb 10 '21 at 12:37

0 Answers0