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

Cannot launch Strider using pm2 #979

Closed
mark-norgate opened this issue Aug 7, 2016 · 10 comments
Closed

Cannot launch Strider using pm2 #979

mark-norgate opened this issue Aug 7, 2016 · 10 comments

Comments

@mark-norgate
Copy link

mark-norgate commented Aug 7, 2016

Hi there

I am having trouble running Strider using pm2. I have successfully installed Strider and am able to launch it using npm start and navigating in my browser; that all works great.

However, I can't seem to be able to launch it using pm2. The process seems to launch ok, and pm2 show strider appears to indicate that all is ok, but I cannot navigate in my browser: I get a refused to connect error. What might I be doing wrong? The only configuration I am doing is for Strider itself, which works with npm so I think that might be red herring. In any case, here is my .striderrc:

{
    "NODE_ENV": "production",
    "SERVER_NAME": "http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com",
    "STRIDER_CLONE_DEST": "/home/ubuntu/strider-builds/",
    "PORT": "3000"
}

I have read all of the pm2 documentation but that hasn't helped. What can I do to get this up and running?

More info: I have just run pm2 logs and am horrified to discover that the process appears to be exiting and restarting every few seconds. Aargh! What does this indicate?

PM2 App [strider] with id [0] and pid [29945], exited with code [0] via signal [SIGINT]
PM2 Starting execution sequence in -fork mode- for app name:strider id:0
PM2 App name:strider id:0 online
PM2 App [strider] with id [0] and pid [29959], exited with code [0] via signal [SIGINT]
PM2 Starting execution sequence in -fork mode- for app name:strider id:0
PM2 App name:strider id:0 online
PM2 App [strider] with id [0] and pid [29969], exited with code [0] via signal [SIGINT]
PM2 Starting execution sequence in -fork mode- for app name:strider id:0
PM2 App name:strider id:0 online

Thanks, Mark

@knownasilya
Copy link
Member

Strider auto restarts on crash, so make sure to setup logs with pm2 to see what the error is.

@mark-norgate
Copy link
Author

I have checked strider-error-0.log and strider-out-0.log after starting the process but they are empty. Do I need to explicitly turn on pm2 logging?

@knownasilya
Copy link
Member

You need to also set DEBUG=strider* env

@mark-norgate
Copy link
Author

mark-norgate commented Aug 7, 2016

Apologies for being thick, but where do I do that? In the .striderrc? (not really a UNIX kinda guy)

@knownasilya
Copy link
Member

Yes

@mark-norgate
Copy link
Author

mark-norgate commented Aug 7, 2016

I have augmented my .striderrc to look like this:

{
    "NODE_ENV": "production",
    "SERVER_NAME": "http://ec2-xx-x-xx-xx.compute-1.amazonaws.com",
    "STRIDER_CLONE_DEST": "/home/ubuntu/strider-builds/",
    "PORT": "3000",
    "DEBUG": "strider* env"
}

Notice I included your DEBUG parameter. This still does not launch, and I cannot navigate to Strider. What am I missing?

M

@knownasilya
Copy link
Member

Remove the space and 'env'

@mark-norgate
Copy link
Author

That has fixed it, thank you very much!

@Arkotek
Copy link

Arkotek commented Aug 17, 2016

What was the error message? How have you fixed this @mark-norgate ?

@mark-norgate
Copy link
Author

Hi there, sorry for the delay in replying. I have been away from this project for a while.

Once I removed the space and 'env', I seem to remember, as suggested by @knownasilya , the application just started to work. I'm afraid I can't remember the error messages. I will try to give better feedback in future! Thank you guys for your help.

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

3 participants