Open msawired opened 7 years ago
Any update on this would help, facing same issues Amazon AMI.
Can you try solution found in https://github.com/zapty/forever-service/issues/50
Worked well with solution provided in #50
I have an error something like that: I try
sudo env "PATH=$PATH" forever-service install validex-cron -f " --watchDirectory ./src -w -o out.log -e err.log -c /home/ubuntu/.nvm/versions/node/v14.16.1/bin/node" --script ./src/index.js -e "PATH=/usr/local/bin:$PATH"
but not working, the service install ok, but not run the script, checking the service status:
● validex-cron.service - LSB: forever-service startup script for validex-cron
Loaded: loaded (/etc/init.d/validex-cron; generated)
Active: failed (Result: exit-code) since Fri 2021-04-16 16:05:29 UTC; 14min ago
Docs: man:systemd-sysv-generator(8)
Apr 16 16:05:29 ip-172-31-34-236 systemd[1]: Starting LSB: forever-service startup script for validex-cron...
Apr 16 16:05:29 ip-172-31-34-236 validex-cron[18066]: /usr/bin/env: ‘node’: No such file or directory
Apr 16 16:05:29 ip-172-31-34-236 validex-cron[18066]: Starting validex-cron
Apr 16 16:05:29 ip-172-31-34-236 validex-cron[18066]: /usr/bin/env: ‘node’: No such file or directory
Apr 16 16:05:29 ip-172-31-34-236 systemd[1]: validex-cron.service: Control process exited, code=exited status=127
Apr 16 16:05:29 ip-172-31-34-236 systemd[1]: validex-cron.service: Failed with result 'exit-code'.
Apr 16 16:05:29 ip-172-31-34-236 systemd[1]: Failed to start LSB: forever-service startup script for validex-cron.
Hi I am getting an error, which seems to say it is trying to run node as "/usr/bin/env: node", not "/usr/bin/env node".
forever-service version 0.5.9
Platform - CentOS Linux release 7.2.1511 (Core)
socketServer provisioned successfully
Commands to interact with service socketServer Start - "sudo service socketServer start" Stop - "sudo service socketServer stop" Status - "sudo service socketServer status" Restart - "sudo service socketServer restart" /usr/bin/env: node: No such file or directory Starting socketServer /usr/bin/env: node: No such file or directory Service could not be started