Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forever not seeing scripts that were started, nor able to STOP or LIST them #562

Closed
Analogreality opened this issue Jun 4, 2014 · 4 comments

Comments

@Analogreality
Copy link

I've created a Linux service that uses forever to start my node script.

My command line is as follows, with the tokens expanded properly:
${FOREVER} start -l "${LOG_FILE}" -a --spinSleepTime 5000 --minUptime 1000 --pidFile "${PIDFILE}" "${SCRIPT_PATH}" --profile="bob"

I can start the script, and it returns with a

info: Forever processing file: myawesomescript.js

However immediately after that, it does not list them in 'forever list' nor registers that it should be stopped when I do 'forever stopall'.

I confirmed using ps that the process is still active. Forever just doesn't see it.

Any idea?

@Analogreality Analogreality changed the title Forever not seeing scripts that were started, nor list them Forever not seeing scripts that were started, nor able to STOP or LIST them Jun 4, 2014
@samallison
Copy link

I'm experiencing this as well, any ideas?

I'm calling it from a Centos service. After i start it I see nothing from "forever list" whether i run it on the console, or the actual service itself the line after forever start.

@nhorvath
Copy link

nhorvath commented Sep 3, 2014

I'm also having the same issue.

11:00 AM ansible@proxy$ sudo service npm-lazy-mirror start
Starting npm-lazy-mirror: warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: /usr/lib/node_modules/npm-lazy-mirror/server.js

11:00 AM ansible@proxy$ ps aux | grep node
root 13609 7.5 1.1 760760 22700 ? Ssl 11:00 0:00 /usr/bin/node /usr/lib/node_modules/forever/bin/monitor /usr/lib/node_modules/npm-lazy-mirror/server.js
root 13616 15.3 1.9 769780 36816 ? Sl 11:00 0:00 /usr/bin/node /usr/lib/node_modules/npm-lazy-mirror/server.js -C /usr/lib/node_modules/npm-lazy-mirror/config/config.json
ansible 13623 0.0 0.0 103248 836 pts/1 S+ 11:00 0:00 grep node
11:00 AM ansible@proxy$ forever list
info: No forever processes running
11:00 AM ansible@proxy$ node -v
v0.10.29

@gabrielf
Copy link

This is probably not the problem you see but for others finding this issue it is good to know that forever list will not find processes started as another user. If you start a process with user foo then running forever list as root will not show the started process. I don't know how forever handles processes that changes user after they have started though...

@indexzero
Copy link
Member

This is basically a duplicate of #544. forever needs to drop the sudo bit or change it to a specific user so that the bookkeeping files ownership stays consistent across multiple users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants