By yedroj92
Hey,
I’ve been following a tutorial for deploying Strapi on Digital Ocean and I’ve got to the point of trying to make the GitHub action:
I have been through it all, and tested the webhook which appears to be working, no errors.
I then run the following:
sudo systemctl enable webhook.service
sudo systemctl start webhook
and all good, or no errors.
but when I check the status:
sudo systemctl status webhook
I get the following error:
● webhook.service - Github webhook
Loaded: loaded (/etc/systemd/system/webhook.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-05-28 11:42:40 UTC; 4s ago
Process: 9113 ExecStart=/usr/bin/nodejs /home/jordan/NodeWebhooks/webhook.js (code=exited, status=203/EXEC)
Main PID: 9113 (code=exited, status=203/EXEC)
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: webhook.service: Scheduled restart job, restart counter is at 5.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: Stopped Github webhook.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: webhook.service: Start request repeated too quickly.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: webhook.service: Failed with result 'exit-code'.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: Failed to start Github webhook.
I have tried a few different things and made some changes but nothing seems to change the “active” status.
My webhook.js and /etc/systemd/system/webhook.service are the same as in the tutorial, except the name and path. I am using node and not nodejs as I am running Ubuntu 21.04 x64, my GitHub repo is private.
I thought maybe that could be an issue? I did not git clone, and would need to setup ssh between them I guess.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @yedroj92,
It seems like that the main process is failing:
Process: 9113 ExecStart=/usr/bin/nodejs /home/jordan/NodeWebhooks/webhook.js (code=exited, status=203/EXEC)
If you run the command manually does it work as well or does it also crash?
I could suggest checking the syslogs logs to see why the Node JS process is crashing.
Regards, Bobby
I just solved this issue today. The logs like @bobbyiliev said to check wasn’t able to find nodejs. Since we are using node and not nodejs we simply edit the webhook.service file at ExecStart=
[Unit]
Description=Github webhook
After=network.target
[Service]
Environment=PATH=your_path
Type=simple
User=your-name
ExecStart=/usr/bin/node /home/your-name/NodeWebHooks/webhook.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.