Closed aronduby closed 10 years ago
Can you just try running forever as sudo i.e. sudo forever and see if it works? I want to confirm forever is available in path when run as sudo.
It does NOT work
Please give me output of the following to further debug this,
sudo -s whereis forever echo $PATH
forever is in /usr/local/bin/forever
(which is actually a symlink)
$PATH is /sbin:/bin:/usr/sbin:/usr/bin
I did some poking around and came upon http://superuser.com/questions/548508/why-cant-i-sudo-some-commands-e-g-vim and removed the secure path variable as suggested (as root using visudo) and that didn't fix the issue
Great. I will also create a patch to provide a path for forever, this way for such situations you can manually feed in that path while provisioning the service
I have added cli arguments -p --foreverPath to specify the path, so you could now use following command as well,
forever-service install -s /web/grpl/node/server.js -p /usr/local/bin grpl
that fixed the forever error, but now I have the same issue with it not finding node
You can try using -c option with forever to specify node path On 19 Oct 2014 22:33, "aronduby" notifications@github.com wrote:
that fixed the forever error, but now I have the same issue with it not finding node
— Reply to this email directly or view it on GitHub https://github.com/zapty/forever-service/issues/2#issuecomment-59656388.
I ran whereis node
which gave me /usr/local/bin/node
so I changed the install command to be
forever-service install -s /web/grpl/node/server.js -p /usr/local/bin -f " -c /usr/local/bin/node" grpl
and now when trying to start it gives the error /usr/bin/env: node: No such file or directory
Looks like solution for /usr/bin/env: Node error ..
Thank you Arvind. For CentOS, I had needed to find "whereis node" Then simply create a symlink of that file to /usr/bin/node and then forever-service works fine.
Attempting to use this tool but it keeps saying that the forever command is not found on line 51 and 63 whenever I attempt to start the service. Both forever and forever-service were installed globally as root. Here's the full output:
After my first attempt not working I removed both forever and forever-script and re-installed them (again as root) since my install of forever was getting a bit old, but that made no noticeable difference.