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

Actions not being parsed properly #165

Closed
SlexAxton opened this issue Nov 21, 2011 · 26 comments
Closed

Actions not being parsed properly #165

SlexAxton opened this issue Nov 21, 2011 · 26 comments

Comments

@SlexAxton
Copy link

I think this has happened before, perhaps some kind of regression, but here's an example

https://img.skitch.com/20111121-jqn44sdjq87f3r586t68fexds.jpg

The same thing happens with any 'action' (logs, lists, etc)- so it seems like a command line options parsing issue.

Thanks!

(this is on an ec2 machine with whatever their flavor of fedora-ish linux is using node 0.6.1)

@max-mapper
Copy link

also getting this on 0.6.2, seems like an 0.6.x bug

@qzaidi
Copy link

qzaidi commented Nov 21, 2011

I am also getting this right after upgrading to 0.6.2

@qzaidi
Copy link

qzaidi commented Nov 21, 2011

This seems to be an optimist/node issue. forever removes the action argument ('start' in this case) and then invokes optimist for option parsing, but optimist still gets the original argv array with action present. hence a lot of indexes are off by 1.

@lbdremy
Copy link

lbdremy commented Nov 21, 2011

also getting this on node 0.4.9 on an ec2 machine.

@xetorthio
Copy link

Is there any workaround meanwhile?

@ecto
Copy link

ecto commented Nov 21, 2011

Running node 0.6.2, fell all the way back to forever 0.6.0 and still get this error. Still investigating

@ecto
Copy link

ecto commented Nov 21, 2011

Found a temporary fix.

edit bin/forever line 139

var file = argv._[0], options = {};

should be

var file = argv._[1], options = {};

@qzaidi
Copy link

qzaidi commented Nov 21, 2011

If no action is specified, you can still run forever (i.e., don't use
the daemon mode).

On Mon, Nov 21, 2011 at 10:53 PM, Cam Pedersen
[email protected]
wrote:

Running node 0.6.2, fell all the way back to forever 0.6.0 and still get this error. Still investigating


Reply to this email directly or view it on GitHub:
#165 (comment)

@xetorthio
Copy link

as far as I could debug it seems like optimist is being loaded before forever remove the action from process.argv, so optimist parse process.argv when the action is still there. now this is very strange as I can't see any require('optimist') before action removal in forever.
I will keep digging.

@xetorthio
Copy link

It seems like the problem is a bit more complex. After fixing the argv parsing issue, it won't load the script in daemon mode. It seems like daemon module doesn't work properly with node 0.6.x

@ecto
Copy link

ecto commented Nov 21, 2011

If you ps aux | grep node you will see that it is indeed running a daemon, just not reporting back to forever

@Marak Marak closed this as completed Nov 21, 2011
@Marak Marak reopened this Nov 21, 2011
@Marak
Copy link
Contributor

Marak commented Nov 21, 2011

Err misclick. Someone is looking into this.

@indexzero
Copy link
Member

This may be a regression in a downstream dependency

@xetorthio
Copy link

yes, you are right. so it seems like forever and the "daemonized" process are not able to communicate.

@mmalecki
Copy link
Contributor

This is fixed in #166. @indexzero, are we able to get it merged soon?

@indexzero
Copy link
Member

@mmalecki. Reviewing it now.

@pacovell
Copy link

I accidentally got snared by this as well.

mmalecki added a commit to indexzero/nconf that referenced this issue Nov 22, 2011
@geddski
Copy link

geddski commented Nov 22, 2011

Thanks for the fix fellas. Once [email protected] is published to npm this issue may be closed. I updated it manually and it's working great.

@geddski
Copy link

geddski commented Nov 22, 2011

Uh oh. [email protected] causes a regression: Issue #129 - Watching files always detects changes

Using Node 0.6.0, forever 0.7.3, manually updated nconf to 0.4.6

@mmalecki
Copy link
Contributor

Sorry, but I can't see how [email protected] could even remotely cause this regression.

@xetorthio
Copy link

any news on this issue?

@mmalecki
Copy link
Contributor

Waiting for [email protected] to be published. You can try installing it from git, it should fix it.

@xetorthio
Copy link

Ok, this fixes the parsing issue. There are more errors regard daemonized processes are not being seen by forever. But it is not part of this issue. So I will check it there is one about that, and if not I will create one. Thanks a lot!

@indexzero
Copy link
Member

[email protected] is now published.

@geddski
Copy link

geddski commented Nov 22, 2011

@mmalecki updated via npm instead of via git and no regression. That's good, if not a little strange. Thanks.

I think this issue can be closed.

@mmalecki
Copy link
Contributor

As you wish! Thanks for help :).

fancy517 pushed a commit to fancy517/nconf that referenced this issue Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests