Search code examples
javascriptnode.jsloopbackjsstrongloop

strong-pm always display connection refused


I have installed strong-pm on my remote server and have successfully deployed one strongloop application. I can use sl-pmctl ls to see the service and its id is 1.

First, i tested remotely, I get an 502 error. Then I tested on the remote server using

curl -H "Content-Type: application/json" -X POST --data '{"userName":"e23213123", "password":"safdaff"}' http://127.0.0.1:3001/ And the terminal shows me

curl: (7) Failed to connect to 127.0.0.1 port 3001: Connection refused

I googled several hours and cannot find any solution. It just shows me Connection refused, where should I start to fix it.


Solution

  • You can monitor the process on the remote server using

    sudo tail -f -n 200 /var/log/upstart/strong-pm.log
    

    or a similar tail on that log. If nothing seems out of the ordinary and there aren't any connection errors, the service is running properly.

    But if port 3001 is not allowed even from localhost, you have other config issues besides the strongloop strong-pm process.