strongloop / strong-pm

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

strong-pm start error with systemctl #337

Closed casamia918 closed 4 years ago

casamia918 commented 8 years ago

[Host environment] aws ec2 with Linux RHEL-7.2 node v4.4.3 strong-pm 5.2.1

I'm following setting up a production host guide. https://docs.strongloop.com/display/SLC/Setting+up+a+production+host

I installed process manager as a system service by executing '$ sudo env PATH="$PATH" sl-pm-install --systemd'

After that, I tried to start the service with the command '$ sudo /usr/bin/systemctl start strong-pm"

But then, I received this message.

[ec2-user@ip-172-31-25-33 ~]$ sudo systemctl start strong-pm
Warning: strong-pm.service changed on disk. Run 'systemctl daemon-reload' to reload units.

To check the service status, I executed '$sudo /usr/bin/systemctl status strong-pm' and the return message is shown below.

[ec2-user@ip-172-31-25-33 ~]$ sudo systemctl status strong-pm -l
● strong-pm.service - StrongLoop Process Manager
   Loaded: loaded (/etc/systemd/system/strong-pm.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Mon 2016-04-18 19:29:26 EDT; 1min 7s ago
  Process: 32709 ExecStart=/usr/bin/node /usr/lib/node_modules/strong-pm/bin/sl-pm.js --listen 8701 --base /var/lib/strong-pm --base-port 3000 --driver direct (code=exited, status=1/FAILURE)
 Main PID: 32709 (code=exited, status=1/FAILURE)

Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service: main process exited, code=exited, status=1/FAILURE
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Unit strong-pm.service entered failed state.
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service failed.
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service holdoff time over, scheduling restart.
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: start request repeated too quickly for strong-pm.service
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Failed to start StrongLoop Process Manager.
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Unit strong-pm.service entered failed state.
Apr 18 19:29:26 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service failed.
Warning: strong-pm.service changed on disk. Run 'systemctl daemon-reload' to reload units.

What's wrong with this?

casamia918 commented 8 years ago

After execute "sudo systemctl reset-failed strong-pm", I execute again "sudo systemctl start strong-pm". Then, "sudo systemctl status strong-pm" has return message with active service.

[ec2-user@ip-172-31-25-33 ~]$ sudo systemctl status strong-pm
� strong-pm.service - StrongLoop Process Manager
   Loaded: loaded (/etc/systemd/system/strong-pm.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2016-04-18 19:01:19 EDT; 407ms ago
 Main PID: 32359 (node)
   CGroup: /system.slice/strong-pm.service
           ��32359 /usr/bin/node /usr/lib/node_modules/strong-pm/bin/sl-pm.js --listen 8701 --base /var/lib/strong-pm --base-port 3000 --...

Apr 18 19:01:19 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service holdoff time over, scheduling restart.
Apr 18 19:01:19 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Started StrongLoop Process Manager.
Apr 18 19:01:19 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Starting StrongLoop Process Manager...

But, when I check the status 2 seconds later, it gives failure message

[ec2-user@ip-172-31-25-33 ~]$ sudo systemctl status strong-pm
� strong-pm.service - StrongLoop Process Manager
   Loaded: loaded (/etc/systemd/system/strong-pm.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Mon 2016-04-18 19:02:08 EDT; 5s ago
  Process: 32423 ExecStart=/usr/bin/node /usr/lib/node_modules/strong-pm/bin/sl-pm.js --listen 8701 --base /var/lib/strong-pm --base-port 3000 --driver direct (code=exited, status=1/FAILURE)
 Main PID: 32423 (code=exited, status=1/FAILURE)

Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service: main process exited, code=exited, stat...LURE
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Unit strong-pm.service entered failed state.
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service failed.
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service holdoff time over, scheduling restart.
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: start request repeated too quickly for strong-pm.service
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Failed to start StrongLoop Process Manager.
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: Unit strong-pm.service entered failed state.
Apr 18 19:02:08 ip-172-31-25-33.ap-northeast-1.compute.internal systemd[1]: strong-pm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
casamia918 commented 8 years ago

When I followed the "setting up a production host" guide with new ubuntu 14.04 server, the strong-pm service started with no problem. Node version 4.4.3, strong-pm version 5.2.1

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding.