I'm following the deployment guide of AWS which can be found here. I've made it up to the point where we set up a Webhook. I'm using commands below to enable and start the webhook as it's stated in the documentation.
sudo systemctl enable webhook.service
sudo systemctl start webhook
However when I use sudo systemctl status webhook
to check the status of the webhook, I get the following output that indicates there's an error.
● webhook.service - Github webhook Loaded: loaded (/etc/systemd/system/webhook.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2020-06-29 14:21:43 UTC; 29s ago Process: 26849 ExecStart=/usr/bin/nodejs /home/ubuntu/NodeWebHooks/webhook.js (code=exited, status=1/FAILURE) Main PID: 26849 (code=exited, status=1/FAILURE)
Jun 29 14:21:42 ip-172-31-41-113 systemd1: webhook.service: Main process exited, code=exited, status=1/FAILURE Jun 29 14:21:42 ip-172-31-41-113 systemd1: webhook.service: Failed with result 'exit-code'. Jun 29 14:21:43 ip-172-31-41-113 systemd1: webhook.service: Service hold-off time over, scheduling restart. Jun 29 14:21:43 ip-172-31-41-113 systemd1: webhook.service: Scheduled restart job, restart counter is at 5. Jun 29 14:21:43 ip-172-31-41-113 systemd1: Stopped Github webhook. Jun 29 14:21:43 ip-172-31-41-113 systemd1: webhook.service: Start request repeated too quickly. Jun 29 14:21:43 ip-172-31-41-113 systemd1: webhook.service: Failed with result 'exit-code'. Jun 29 14:21:43 ip-172-31-41-113 systemd1: Failed to start Github webhook.
What could be wrong with this setup?
System
Node.js version: v12.18.1
NPM version: 6.14.5
Strapi version: 3.0.1
Database: PostgreSQL
Operating system: Ubuntu 18.04 LTS