restart doesn't restart #185

Closed
jgallen23 opened this Issue Dec 4, 2011 · 6 comments

Projects

None yet

4 participants

[root] /var/www/ [master]: forever list
info: Forever processes running
data: uid command script forever pid logfile uptime
data: [0] lf2g node server.js 19230 19236 /root/.forever/lf2g.log 0:0:5:31.888

[root] /var/www/ [master]: forever restart server.js
info: Forever restarted process(es):
data: uid command script forever pid logfile uptime
data: [0] lf2g node server.js 19230 19236 /root/.forever/lf2g.log 0:0:5:40.7

[root] /var/www/ [master]: forever list
info: No forever processes running

Contributor
Marak commented Dec 4, 2011

I believe the command might be:

 forever list

 forever restart 0

Does that work?

That doesn't seem to work either:

[root] /var/www/ [master]: forever list
info:   Forever processes running
data:       uid  command script    forever pid   logfile                 uptime       
data:   [0] zxbx node    splash.js 19800   19803 /root/.forever/zxbx.log 0:0:4:10.688 
data:   [1] utVb node    server.js 20213   20218 /root/.forever/utVb.log 0:0:1:58.118 

[root] /var/www/ [master]: forever restart 1
info:   Forever restarted process(es):
data:       uid  command script    forever pid   logfile                 uptime      
data:   [0] utVb node    server.js 20213   20218 /root/.forever/utVb.log 0:0:2:4.601 

[root] /var/www/ [master]: forever list
info:   Forever processes running
data:       uid  command script    forever pid   logfile                 uptime       
data:   [0] zxbx node    splash.js 19800   19803 /root/.forever/zxbx.log 0:0:4:20.798 
Contributor
Marak commented Dec 4, 2011

So I've done a bit of local testing here with the latest published forever version on node 0.4.12, and I am seeing the exact same behavior.

Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ sudo forever start helloworld/bin/server
info:   Forever processing file: helloworld/bin/server
Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ sudo forever start web-http-client/bin/server 
info:   Forever processing file: web-http-client/bin/server
Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ sudo forever list
info:   Forever processes running
data:       uid  command script                     forever pid   logfile                               uptime      
data:   [0] BVXx node    web-http-client/bin/server 67813   67846 /Users/maraksquires/.forever/BVXx.log 0:0:0:0.134 
data:   [1] _2mr node    helloworld/bin/server      67810   67811 /Users/maraksquires/.forever/_2mr.log 0:0:0:20.86 
Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ sudo forever restart 1
info:   Forever restarted process(es):
data:       uid  command script                     forever pid   logfile                               uptime      
data:   [0] BVXx node    web-http-client/bin/server 67813   67877 /Users/maraksquires/.forever/BVXx.log 0:0:0:0.408 
Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ sudo forever list
info:   Forever processes running
data:       uid  command script                forever pid   logfile                               uptime       
data:   [0] _2mr node    helloworld/bin/server 67810   67811 /Users/maraksquires/.forever/_2mr.log 0:0:0:30.668 
Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ ps -ax | grep node
67810 ??         0:00.06 node /usr/local/bin/forever start helloworld/bin/server
67811 ??         0:00.10 node /Users/maraksquires/dev/nodeapps/helloworld/bin/server
67885 ttys001    0:00.00 grep node
Marak-Squiress-MacBook-Pro:nodeapps maraksquires$ 

It appears that forever restart might not be working as expected right now. Looking further into this.

i have issue with forever restart 0 too
i have node 0.6.5 and installed forever from git branch 0.6 as suggested @indexzero on #175 and this solved forever list issue

$ forever list
The "sys" module is now called "util". It should have a similar interface.
info:   Forever processes running
data:       uid  command script                             forever pid   logfile                        uptime        
data:   [0] z9UE node    /home/mikosh/node/server.js 17734   14324 /home/mikosh/.forever/z9UE.log 0:5:25:31.258

but with forever restart 0 it crashes with this:

$ forever restart 0
The "sys" module is now called "util". It should have a similar interface.
{
"process": {
"pid": 30197,
"uid": 10003,
"gid": 10003,
"cwd": "/home/mikosh",
"execPath": "/usr/local/bin/node",
"version": "v0.6.5",
"argv": [
"node",
"/usr/local/bin/forever",
"restart",
"0"
],
"memoryUsage": {
"rss": 14430208,
"heapTotal": 8441056,
"heapUsed": 3532036
}
},
"os": {
"loadavg": [
0.0224609375,
0.01611328125,
0
],
"uptime": 13048022.866109
},
"trace": [
{
"column": 37,
"file": "/home/mikosh/forever/lib/forever.js",
"function": null,
"line": 484,
"method": null,
"native": false
},
{
"column": 13,
"file": "/home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js",
"function": null,
"line": 97,
"method": null,
"native": false
},
{
"column": null,
"file": null,
"function": "Array.forEach",
"line": null,
"method": "forEach",
"native": true
},
{
"column": 24,
"file": "/home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js",
"function": null,
"line": 26,
"method": null,
"native": false
},
{
"column": 9,
"file": "/home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js",
"function": "Object.forEach",
"line": 96,
"method": "forEach",
"native": false
},
{
"column": 13,
"file": "/home/mikosh/forever/lib/forever.js",
"function": "",
"line": 464,
"method": null,
"native": false
},
{
"column": 17,
"file": "events.js",
"function": "EventEmitter.emit",
"line": 67,
"method": "emit",
"native": false
},
{
"column": 17,
"file": "/home/mikosh/forever/lib/forever.js",
"function": null,
"line": 438,
"method": null,
"native": false
},
{
"column": 25,
"file": "/home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js",
"function": "",
"line": 105,
"method": null,
"native": false
},
{
"column": 17,
"file": "events.js",
"function": "ChildProcess.emit",
"line": 70,
"method": "emit",
"native": false
}
],
"stack": [
"ReferenceError: command is not defined",
" at /home/mikosh/forever/lib/forever.js:484:37",
" at /home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js:97:13",
" at Array.forEach (native)",
" at /home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js:26:24",
" at Object.forEach (/home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js:96:9)",
" at EventEmitter. (/home/mikosh/forever/lib/forever.js:464:13)",
" at EventEmitter.emit (events.js:67:17)",
" at /home/mikosh/forever/lib/forever.js:438:17",
" at ChildProcess. (/home/mikosh/forever/node_modules/utile/node_modules/async/lib/async.js:105:25)",
" at ChildProcess.emit (events.js:70:17)"
],
"level": "error",
"message": "uncaughtException"
}

and after this, forever list says

info:   No forever processes running

bump?

Owner

This should be fixed in forever@0.8.0

@indexzero indexzero closed this Jan 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment