user3679710
user3679710

Reputation: 11

StrongLoop deployment

I want to install a service in AWS as below command since i have two apps needs to be hosted in the same server. I am able to deploy an app in the default service strong-pm. But when i try to create a new service as below

sudo slc pm-install --upstart 0.6 --user manhunt-pm --port 6666 --job-file /etc/init/manhunt-pm.conf

The service gets started. But when i try to deploy the tar file, I am getting the following error

Deploy /home/ec2-user/manhunt-0.0.0.tgz to http://localhost:6666 failed: read ECONNRESET

From the aws log, i see the following message

Feb 27 05:50:05 ip-172-31-28-147 strong-pm: TypeError: Object #<Object> has no method 'sendError'</b>
Feb 27 05:50:05 ip-172-31-28-147 strong-pm:   at /usr/lib/node_modules/strongloop/node_modules/strong-pm/lib/pack-receiver.js:94:12
Feb 27 05:50:05 ip-172-31-28-147 strong-pm:   at /usr/lib/node_modules/strongloop/node_modules/mkdirp/index.js:46:53
Feb 27 05:50:05 ip-172-31-28-147 strong-pm:   at Object.oncomplete (fs.js:107:15)
Feb 27 05:50:05 ip-172-31-28-147 strong-pm: 
Feb 27 05:50:05 ip-172-31-28-147 init: manhunt-pm main process (13087) terminated with status 8
Feb 27 05:50:05 ip-172-31-28-147 init: manhunt-pm main process ended, respawning
Feb 27 05:50:05 ip-172-31-28-147 su: (to manhunt-pm) root on none
Feb 27 05:50:10 ip-172-31-28-147 strong-pm: sl-pm.js: control listening on path `/var/lib/manhunt-pm/pmctl`
Feb 27 05:50:10 ip-172-31-28-147 strong-pm: sl-pm.js: listen on 6666, work base is `/var/lib/manhunt-pm/.strong-pm` with config `/var/lib/manhunt-pm/.strong-pm/config`

Am I missing something? Or is there any other way that I want to host two different apps in the same server in different port say 3000 and 3001. Please help.

Upvotes: 0

Views: 547

Answers (1)

Ryann Graham
Ryann Graham

Reputation: 8229

edit: the bug described below was fixed in [email protected]

The first line of the error looks like a bug. It is triggering an error while trying to tell you that it failed to create a temp directory.

Looking at the code that triggers that, I think this may be a permissions problem. You have two separate instances of strong-pm each running as their own user, but the way it creates temporary directories appears to assume semi-exclusive access.

I suspect that if you do ls -ld /tmp/strong-pm you will see that it is drwxr-xr-x and owned by strong-pm:strong-pm.

If you run sudo chmod o+w /tmp/strong-pm it should allow the second instance to create its temp directory like it is trying to. You should only need to do that once.

Upvotes: 0

Related Questions