Starting webhook in headless environment doesn't run #626
-
So while I have years of linux experience, I can't for the life of me get the webhook service to run via a cronjob. I've got an additional cronjob which checks to see if the process is still running, and I have a bash script to start it up again, but for whatever reason I can't debug, the webhook executable will not start. If I run the same script while in the shell, it starts and usually stays up for days, until it gets overrun with requests and dies. So at the moment, I got my cronjob watcher script send me a slack message whenever the process dies and then I log into my shell and start the webhook manually, but ideally it just restarts when it dies via my script. I'm running in Ubuntu 18.04.2 LTS with webhook 2.8.0 Any help would be greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Starting services from a cron job sounds less than ideal. Are you not using a service manager like systemd? Any cron logs? What user is running the cron job? |
Beta Was this translation helpful? Give feedback.
-
So after looking at this: https://gist.github.com/ragul28/6e5fc9ba7d1adbe761b8643b2a22a1a8 and with some modifications to the ExecStart to add in my custom parameters, it now seems to be running. It seems I was missing either a few settings in my webhook.service file or I needed to add -ip 0.0.0.0 because now it seems to work and when I kill it manually, it restarts immediately which is what I needed since on heavy loads, the process dies (either a panic) or bad payload. Thanks for insisting on systemd again as I was down that track earlier but would always die. |
Beta Was this translation helpful? Give feedback.
Starting services from a cron job sounds less than ideal. Are you not using a service manager like systemd?
Any cron logs? What user is running the cron job?