Недавно я пытался запустить приложение nodejs, которое я создал с помощью pm2 и этого руководства: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04 Однако по какой-то причине он выдает эту ошибку и не может запуститься:
root@ip-XXXXXXXXXX:/home/ubuntu# systemctl status pm2-ubuntu.service
● pm2-ubuntu.service - PM2 process manager
Loaded: loaded (/etc/systemd/system/pm2-ubuntu.service; enabled; vendor preset: enabled)
Active: failed (Result: protocol) since Wed 2019-01-16 17:15:25 UTC; 5s ago
Docs: https://pm2.keymetrics.io/
Process: 1686 ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect (code=exited, status=0/SUCCESS)
Jan 16 17:15:25 ip-XXXXXXXXXX pm2[1686]: [PM2] Restoring processes located in /home/ubuntu/.pm2/dump.pm2
Jan 16 17:15:25 ip-XXXXXXXXXX pm2[1686]: ┌──────────┬────┬─────────┬──────┬──────┬────────┬─────────┬────────┬─────┬───────────┬──────┬──────────┐
Jan 16 17:15:25 ip-XXXXXXXXXX pm2[1686]: │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
Jan 16 17:15:25 ip-XXXXXXXXXX pm2[1686]: ├──────────┼────┼─────────┼──────┼──────┼────────┼─────────┼────────┼─────┼───────────┼──────┼──────────┤
Jan 16 17:15:25 ip-XXXXXXXXXX pm2[1686]: │ index │ 0 │ 1.0.0 │ fork │ 1394 │ online │ 0 │ 113s │ 0% │ 41.1 MB │ root │ disabled │
Jan 16 17:15:25 ip-XXXXXXXXXX pm2[1686]: └──────────┴────┴─────────┴──────┴──────┴────────┴─────────┴────────┴─────┴───────────┴──────┴──────────┘
Я пробовал редактировать файл pm2.pid с помощью nano, но его не существует. Что-то не так с моей установкой? Что мне делать?
Файл журнала PM2:
2019-01-16T16:51:39: PM2 log: ===============================================================================
2019-01-16T16:51:39: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
2019-01-16T16:51:39: PM2 log: Time : Wed Jan 16 2019 16:51:39 GMT+0000 (Coordinated Universal Time)
2019-01-16T16:51:39: PM2 log: PM2 version : 3.2.8
2019-01-16T16:51:39: PM2 log: Node.js version : 10.15.0
2019-01-16T16:51:39: PM2 log: Current arch : x64
2019-01-16T16:51:39: PM2 log: PM2 home : /home/ubuntu/.pm2
2019-01-16T16:51:39: PM2 log: PM2 PID file : /home/ubuntu/.pm2/pm2.pid
2019-01-16T16:51:39: PM2 log: RPC socket file : /home/ubuntu/.pm2/rpc.sock
2019-01-16T16:51:39: PM2 log: BUS socket file : /home/ubuntu/.pm2/pub.sock
2019-01-16T16:51:39: PM2 log: Application log path : /home/ubuntu/.pm2/logs
2019-01-16T16:51:39: PM2 log: Process dump file : /home/ubuntu/.pm2/dump.pm2
2019-01-16T16:51:39: PM2 log: Concurrent actions : 2
2019-01-16T16:51:39: PM2 log: SIGTERM timeout : 1600
2019-01-16T16:51:39: PM2 log: ===============================================================================
2019-01-16T16:51:39: PM2 log: App [index:0] starting in -fork mode-
2019-01-16T16:51:39: PM2 log: App [index:0] online
2019-01-16T16:56:59: PM2 log: pm2 has been killed by signal, dumping process list before exit...
2019-01-16T16:56:59: PM2 log: Deleting process 0
2019-01-16T16:56:59: PM2 log: Stopping app:index id:0
2019-01-16T16:56:59: PM2 log: App [index:0] exited with code [0] via signal [SIGHUP]
2019-01-16T16:56:59: PM2 log: pid=10369 msg=process killed
2019-01-16T16:56:59: PM2 log: Exited peacefully
2019-01-16T16:57:41: PM2 log: ===============================================================================
Любая помощь приветствуется