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 list shows `no forever processes running` on Windows #337

Closed
hbrls opened this Issue Sep 12, 2012 · 92 comments

Comments

Projects
None yet
@hbrls
Copy link

hbrls commented Sep 12, 2012

I've seen related or duplicated issues, and all of which were fixed and closed.
But none of them was on windows.

I have fresh installed Windows 2008, node.js, forever.
and I got this issue:

.\forever start app.js   // functions well as expected
.\forever list  // no forever processes running
.\forever stop app.js // cannot find process with index: app.js

exactly the same symptom as issue#224 and etc.

@zensh

This comment has been minimized.

Copy link

zensh commented Sep 19, 2012

I had the same problem on Centos

@nikita-leonov

This comment has been minimized.

Copy link

nikita-leonov commented Oct 22, 2012

The same is reproducible on Windows 7.

@jazzzz

This comment has been minimized.

Copy link
Contributor

jazzzz commented Oct 22, 2012

The same on Windows XP.

@elgerlambert

This comment has been minimized.

Copy link

elgerlambert commented Oct 25, 2012

I came here searching for answers for exactly the same problem.

Windows 7
node 0.8.8
forever 0.10.0 -globally installed

p.s. would be nice if one could retrieve forever's version through the cli (maybe just include it as part of -h --help)

@ingmr

This comment has been minimized.

Copy link
Contributor

ingmr commented Nov 13, 2012

Same problem here! WinXP and forever 0.10.0

forever.Worker tries to use socket files on windows:

https://github.com/nodejitsu/forever/blob/master/lib/forever/worker.js#L113

What alternatives are there on windows?

@bigal488

This comment has been minimized.

Copy link

bigal488 commented Nov 29, 2012

I have 2 Mac servers running different versions of Node (0.6 and 0.8.14) and Mac OS and both exhibit this issue...whereas on 2 others with similar set ups, forever works fine running the same node scripts.

bash-3.2$ sudo forever start server.js
info:    Forever processing file: server.js
bash-3.2$ sudo forever list
info:    No forever processes running

I've tried uninstalling forever, removing ~/.forever etc.

@jfrux

This comment has been minimized.

Copy link

jfrux commented Dec 11, 2012

Ya same here... :-/ and now I can't stop the processes either... I've ended process tree and they still pop back up... 👍

@sanduhrs

This comment has been minimized.

Copy link

sanduhrs commented Dec 13, 2012

Same issue on CentOS 6.3
node@0.8.14
forever@0.10.0

@lakenen

This comment has been minimized.

Copy link

lakenen commented Feb 1, 2013

I am having this same issue on OS X 10.7.5 Server.
node@v0.8.14
forever@0.10.0

@JesusIslam

This comment has been minimized.

Copy link

JesusIslam commented Feb 3, 2013

Same issue on Ubuntu 12.04
node@v0.8.18
forever@0.10.0

@kevinsimper

This comment has been minimized.

Copy link

kevinsimper commented Feb 5, 2013

I get the same error on Windows 8 :-/

Just installed it, and the only way to get rid of is to restart.

It does not work to kill the node.js process tree, sadly.

@gblazex

This comment has been minimized.

Copy link

gblazex commented Feb 20, 2013

+1

@gblazex

This comment has been minimized.

Copy link

gblazex commented Feb 20, 2013

(in the meantime if you want to stop the process:
rename nodejs folder beforehand so that it can't start node again)

@gblazex

This comment has been minimized.

Copy link

gblazex commented Feb 25, 2013

The sock folder stays empty for me (while pids are getting filled).

@kevinsimper

This comment has been minimized.

Copy link

kevinsimper commented Feb 25, 2013

Until it is fix you can use Nodemon. It does what most need! (not aff)
https://github.com/remy/nodemon

@claytongulick

This comment has been minimized.

Copy link

claytongulick commented Feb 27, 2013

Same problem here, ubuntu 12.04

@aradnom

This comment has been minimized.

Copy link

aradnom commented Mar 11, 2013

Just a heads up on this, make sure you forever list as the user you launched the daemon under originally. I've seen this when I've launched a daemon as root and come back later as another user and can't find it again.

@gblazex

This comment has been minimized.

Copy link

gblazex commented Mar 11, 2013

@aradnom yes same user. That's not the problem here I guess. You see the sock folder is empty no wonder forever can't list the processes.

Is anybody looking into this btw?

@rushafi

This comment has been minimized.

Copy link

rushafi commented Mar 14, 2013

forever list or forever stopall just don't do anything until I press ctrl+c. I'm using Arch Linux.

@notabeatle

This comment has been minimized.

Copy link

notabeatle commented Apr 3, 2013

Another "me too". OSX, Mountain Lion. Forever 0.10.0

Launch a script with a -c command, "forever list" shows no processes running, "ps" and the pidfile (among other things) in my user's ~/.forever disagree.

I think I installed Node and NPM via Brew, if that helps.

UPDATE:

I do have a sock file for the process... until I run "forever list", at which point it disappears!

The task, and a forever monitor, continue to run, though.

This is with Node 0.10.0 BTW, though I've updated the Lazy package (even reinstalling forever and all dependencies, just to be sure) as recommended elsewhere, which is supposed to fix any trouble related to that.

@dnemoga

This comment has been minimized.

Copy link

dnemoga commented May 16, 2013

The same issue :(

Windows 7 x32/x64
Node.js 0.10.5
Forever 0.10.8

@johnoscott

This comment has been minimized.

Copy link

johnoscott commented May 28, 2013

I still cannot get forever to work on Windows 7

@JCMais

This comment has been minimized.

Copy link

JCMais commented May 28, 2013

Not working here too.
Versions are:

Windows 7 x64
forever 0.10.8
Node.js 0.10.5

What is strange is that the monitor is running on the background.

@morganherlocker

This comment has been minimized.

Copy link

morganherlocker commented May 29, 2013

Is there any way to stop or restart the process? So far the only thing I have been able to do is uninstall forever, which is a pain.

@morganherlocker

This comment has been minimized.

Copy link

morganherlocker commented May 29, 2013

Also, I know the title of this issue says Windows, but I am getting this behavior on Ubuntu 12.04, so it looks as if this may be occurring on all OSes and distros.

Update: I realized that I had been running forever with sudo privileges, since I was running on port 80. "sudo forever list" and "sudo forever stop 0" worked like a charm.

@agileabc

This comment has been minimized.

Copy link

agileabc commented Jun 6, 2013

"forever start index.js" and "forever list" are working fine in my Unix machine.
image

But they are not working in my Windows 7 machine.
image

I am now looking for another tool to do it :(

@gblazex

This comment has been minimized.

Copy link

gblazex commented Jun 6, 2013

Is anybody looking into this?

Most commented issue by far.

@miira

This comment has been minimized.

Copy link

miira commented Jul 17, 2014

The problem was because Windows can't create sockets named 'filepath.sock', it needs to use the named pipe prefix ('.\pipe'). Otherwise EACCESS error happens, when creating the socket. I created PR here - #575 . forever start, list, stop - everything works correctly now on Windows 7, 64 bit.

@gblazex

This comment has been minimized.

Copy link

gblazex commented Jul 17, 2014

Wow, does it mean that after two years this can really be fixed, instead of just being closed?
GJ miira

@fvoska

This comment has been minimized.

Copy link

fvoska commented Jul 29, 2014

I had this problem on Ubuntu but it was a result of my stupidity. I ran my script using sudo forever script.js on a sudoer user. When I tried forever list it showed nothing, but sudo forever list show it properly.

Maybe some others did the same as I did :)

@my8bit

This comment has been minimized.

Copy link

my8bit commented Aug 5, 2014

Another +1
win 7 64-bit
node@v0.10.30
forever@v0.11.1

@atulkarpe

This comment has been minimized.

Copy link

atulkarpe commented Aug 8, 2014

YEPPP...this works for me..sudo forever start Test.js and then sudo forever list
For some users if this doesn;t work then first clear the forever cache by npm cache clean and then reinstall forever by sudo npm install forever -g all on ubuntu 12.04

@dlbrown06

This comment has been minimized.

Copy link

dlbrown06 commented Aug 15, 2014

Why are people commenting on this issue saying it works then follows up and says the used Ubuntu...

Isn't this issue directly related to it not working on windows environments?

@syzer

This comment has been minimized.

Copy link

syzer commented Aug 18, 2014

@mwaarna

This comment has been minimized.

Copy link

mwaarna commented Sep 3, 2014

Same issue here with Windows Server 2003! the NodeJS application is running, but does not show up with "forever list"

@kaminskypavel

This comment has been minimized.

Copy link

kaminskypavel commented Sep 27, 2014

is anyone on this?

Win7
64-bit
forever 0.11.1

@miira

This comment has been minimized.

Copy link

miira commented Oct 1, 2014

why don't you just use #575 , as I wrote above? :)

@nev-dru

This comment has been minimized.

Copy link

nev-dru commented Oct 24, 2014

Same issue on Ubuntu 12.04.3
I got it working yesterday. Looked at it today it it was not running even with the "-w" flag set. Tried to restart it and now it wont work.

I get same message:
info: Forever processing file: /.....

then 'forever list' and get
info: No forever processes running

re-set my npm config just in case (so you don't need sudo) with:
npm config set prefix ~/npm

uninstalled:
npm uninstall -g forever
(and just in case I missed something I did: npm uninstall forever)

Then:
npm install -g forever

and it worked.

@kaminskypavel

This comment has been minimized.

Copy link

kaminskypavel commented Oct 24, 2014

@nev-dru
Forever is awesome.. Its just a small windows thingie.
I'm experiencing no problems in ubuntu at all.

Did you try running with sudo?

@krns

This comment has been minimized.

Copy link

krns commented Nov 5, 2014

Same behaviour here.
node 0.10.31
forever 0.10.11-win
win server 2008 64bit

@indexzero

This comment has been minimized.

Copy link
Member

indexzero commented Nov 5, 2014

@kms you are using an old, out-of-date version of forever that is incompatible with Windows.

npm i -g forever@0.13.0
@krns

This comment has been minimized.

Copy link

krns commented Nov 7, 2014

@indexzero that works like a charm, thanks.

@indexzero

This comment has been minimized.

Copy link
Member

indexzero commented Nov 7, 2014

@krns awesome. Super happy to hear that the new Windows fixes are working!

@jongha

This comment has been minimized.

Copy link

jongha commented Dec 19, 2014

+1 CentOS 6.x

@juanpasolano

This comment has been minimized.

Copy link

juanpasolano commented Jan 19, 2015

Same here on a Amazon EC2 Ubuntu
node@0.10.29
forever@0.13.0

@robcalcroft

This comment has been minimized.

Copy link

robcalcroft commented Jan 28, 2015

If you're running the forever command with sudo, this is what I think is breaking it. You can run sudo bash -c 'forever -w start server.js' which should run it in a root environment but not use the sudo command directly on forever. Or just become root sudo su

@syzer

This comment has been minimized.

Copy link

syzer commented Feb 24, 2015

+1 on win7 x64
inside script:

    var forever = require('forever');
    forever.restartAll(true);
error: Error: Cannot find forever process: undefined
    at node_modules\forever\lib\forever.js:204:31
    at node_modules\newrelic\node_modules\continuation-local-storage\node_modules\async-listener\glue.js:188:31
    at process._tickCallback (node.js:415:13)
@astw

This comment has been minimized.

Copy link

astw commented Aug 20, 2015

in windows prompt, after forever start, and type forever list in the same prompt window, I can see the process, but if I open another prompt window and type forever list, it shows nothing

@rahilwazir

This comment has been minimized.

Copy link

rahilwazir commented Oct 14, 2015

I'm having the same issue in Windows no list shows
@indexzero Is this resolved?

@vuongtran

This comment has been minimized.

Copy link

vuongtran commented Oct 30, 2015

+1 same issue on CentOS

@AdamGerthel

This comment has been minimized.

Copy link

AdamGerthel commented Nov 18, 2015

+1 on WIndows server 2012

@jagc

This comment has been minimized.

Copy link

jagc commented Dec 18, 2015

End of 2015.. Err yeah, still same issue. Still doesn't work. Same error message showing.
Environment:
OS: Windows 7 ultimate x64
Node: v.4.2.1
Forever: v.0.15.1
Nodemon: 1.8.1

@developez

This comment has been minimized.

Copy link

developez commented Feb 8, 2016

I set a daemon in ubuntu in this way:

start on startup exec forever start /foo/foo.js

The command forever list shows me no process with my user but it shows the process foo.js if doing "sudo" or enter as root using "su".

@Choko256

This comment has been minimized.

Copy link

Choko256 commented May 11, 2016

the config.json in .forever is empty... here's the reason.

@SHASHANK-PRO-05

This comment has been minimized.

Copy link

SHASHANK-PRO-05 commented Jun 9, 2016

linux users, check your memory guys might have been used up

@stefanofiorentino

This comment has been minimized.

Copy link

stefanofiorentino commented Jul 20, 2016

If you exec the forever start app.js within init.d you should later type sudo HOME=/home/pi/devel/web-app -u root forever list to have the correct list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment