strongloop / strong-pm

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

strong-pm is fails to start. Throws “Unexpected end of input” answer #290

Closed aboosoyeed closed 8 years ago

aboosoyeed commented 8 years ago

I am using strong-pm on my ubuntu server for my node application. It was running all fine until it stopped one fine moment. Thereafter it doesnt start my service at all. tried restarting strong-pm and even rebooted my server. But in vain. the strong-pm.log keeps throwing the following log entry

Connection fails:  [SyntaxError: Unexpected end of input]
It will be retried for the next request.
Listening failed with: Unexpected end of input
events.js:85
      throw er; // Unhandled 'error' event
            ^
SyntaxError: Unexpected end of input
    at Object.parse (native)
    at parseAndLoad (/usr/lib/node_modules/strong-pm/node_modules/strong-mesh-models/node_modules/loopback-datasource-juggler/lib/connectors/memory.js:122:21)
    at /usr/lib/node_modules/strong-pm/node_modules/strong-mesh-models/node_modules/loopback-datasource-juggler/lib/connectors/memory.js:108:9
    at fs.js:334:14
    at /usr/lib/node_modules/strong-pm/node_modules/strong-docker-build/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:42:10
    at /usr/lib/node_modules/strong-pm/node_modules/strong-docker-build/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:42:10
    at /usr/lib/node_modules/strong-pm/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:42:10
    at FSReqWrap.oncomplete (fs.js:95:15)
rmg commented 8 years ago

This looks like some sort of corruption in /var/lib/strong-pm/strong-pm.json.

@aboosoyeed what version of strong-pm is this?

aboosoyeed commented 8 years ago

@rmg slc --version strongloop v5.0.1 (node v0.12.7) ├── strong-arc@1.8.3 (d95b140) ├── strong-build@2.0.6 (d008a3e) ├── strong-deploy@3.1.2 (be6180a) ├── strong-mesh-models@8.1.0 (62e539b) ├── strong-pm@5.0.1 (b96f806) ├── strong-registry@1.1.5 (f46e58f) ├── strong-start@1.3.2 (1327018) ├─┬ strong-supervisor@3.3.1 (1e39220) │ └── strong-agent@2.0.2 (4ea7ee9) ├── generator-loopback@1.12.1 (a374136) ├── node-inspector@0.7.4 └── nodefly-register@0.3.3

I deleted all files from /var/lib/strong-pm and it worked Is that a correct thing to do

rmg commented 8 years ago

@aboosoyeed it's the most reliable way to fix this. The latest version of strong-mesh-models (8.1.0, which is what you have) includes some changes that should make this more reliable.

Did you upgrade recently?

aboosoyeed commented 8 years ago

i dont recollect upgrading . Alright should i close it ?

rmg commented 8 years ago

Let us know if it happens again.