strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

App not start in production server after slc deploy http://xxxx #238

Closed yagobski closed 9 years ago

yagobski commented 9 years ago

Hi,

I have strange problem to deploy my app to production server. I setup strong-pm on my production server all is fine. I use Git. I can build my app using slc build i have no errors

slc deploy http://admin:xxxxxxxx@www.xxxxxxxx.com Counting objects: 6621, done. Delta compression using up to 8 threads. Compressing objects: 100% (6131/6131), done. Writing objects: 100% (6607/6607), 6.90 MiB | 102.00 KiB/s, done. Total 6607 (delta 1375), reused 178 (delta 7) To http://admin:xxxxxxxx@www.xxxxxxxx.com:8701/api/services/1/deploy/default 2fd507c..4765f04 deploy -> deploy Deployed deploy as XX to http://admin:xxxxxxxx@www.xxxxxxxx.com:8701

I don't have any error and the application is deployed in production server.

My problem is the application don't start on production server and the port 3001 not active too.

rmg commented 9 years ago

@yagobski what does slc ctl -C http://admin:xxxxxxxx@www.xxxxxxxx.com status show? Are there any useful log messages on the server or from slc ctl -C http://admin:xxxxxxxx@www.xxxxxxxx.com log-dump 1?

yagobski commented 9 years ago

@rmg
Service ID: 1 Service Name: XXXXX Environment variables: No environment variables defined Instances: Version Agent version Cluster size Driver metadata 4.2.0 1.6.0 2 N/A Processes: ID PID WID Listening Ports Tracking objects? CPU profiling? Tracing? 1.1.11134 11134 0 1.1.26662 26662 207 xxxxxxxx:3001 1.1.26668 26668 208 xxxxxxxx:3001

No error in logs except this error : https://github.com/strongloop/loopback/issues/1430#issuecomment-108462944

This error is not the issue because the app run with slc run

rmg commented 9 years ago

That slc ctl status output shows very high WIDs (worker ids), which suggests the app is crashing and being restarted frequently. Based on the error you are seeing in the logs, I'd say you found the culprit.

@yagobski I'm closing this as a duplicate of strongloop/loopback#1430 to simplify tracking.

rmg commented 9 years ago

@yagobski my apologies, I didn't read closely enough. That error message shouldn't be causing your app to crash.. but your app does appear to be crashing and restarting.

Another thing to make sure of is that your server has port 3001 open on any firewalls that may be in place (or security groups in the case of AWS).

yagobski commented 9 years ago

Thanks for your answer I fixed the problem by creating the app from scratch and moving all my files one by one like that I use the strong loop last version. Know I can deploy to production even with the Myql error in the log.

How can I know if my app is crashing and restarting? Thanks in advance.

rmg commented 9 years ago

@yagobski there isn't currently a better way of checking for repeated crashes than looking at the worker ID and your app's logs.

On your server, did you do npm install -g strong-pm? or npm install -g strongloop?

yagobski commented 9 years ago

I do strong-pm installation in prod and strong loop installation in local

rmg commented 9 years ago

Did you say you reverted the server to an older version of strong-pm?

yagobski commented 9 years ago

No i upgrade my strongloop app to the last version.

The app is live in production now but i still have mysql error and my app status : You think the app is still crashing and restarting?

Service ID: 1 Service Name: XXXX Environment variables: No environment variables defined Instances: Version Agent version Cluster size Driver metadata 4.2.0 1.6.0 2 N/A Processes: ID PID WID Listening Ports Tracking objects? CPU profiling? Tracing? 1.1.11134 11134 0 1.1.1274 1274 211 XXXXXX:3001 1.1.1276 1276 212 XXXXXX:3001

rmg commented 9 years ago

The worker IDs are only slightly higher than the ones posted yesterday, which could be from deployments. If your app is accessible, then I'd say everything is more or less working.