struCoder / pmgo

pmgo is a process manager for Golang applications.
MIT License
625 stars 65 forks source link

App does not start #58

Closed SametSahin10 closed 4 years ago

SametSahin10 commented 4 years ago

I'm using pmgo start ./work/src/github.com/sametsahin10/danef-dictionary-api/ danef-dictionary-api to start my app. It does not give an error and it's visible when I execute pmgo list. However, I'm unable to send any requests to it. It looks like the app does not start. On the list that pmgo list outputs, the CPU column is always zero. What is the problem with this? I can successfully run the app by go build && ./app-name

Output of tail -f ~/.pmgo/main.log

time="2020-07-18T22:44:00Z" level=info msg="Starting watcher on proc danef-dictionary-api"
time="2020-07-18T22:46:16Z" level=info msg="Trying to delete proc danef-dictionary-api"
time="2020-07-18T22:46:16Z" level=info msg="Stopping watcher on proc danef-dictionary-api"
time="2020-07-18T22:46:16Z" level=info msg="Proc danef-dictionary-api successfully stopped."
time="2020-07-18T22:46:16Z" level=info msg="Successfully deleted proc danef-dictionary-api"
time="2020-07-18T22:47:48Z" level=info msg="Starting watcher on proc danef-dictionary-api"
time="2020-07-18T22:48:23Z" level=info msg="Trying to delete proc danef-dictionary-api"
time="2020-07-18T22:48:23Z" level=info msg="Stopping watcher on proc danef-dictionary-api"
time="2020-07-18T22:48:23Z" level=info msg="Proc danef-dictionary-api successfully stopped."
time="2020-07-18T22:48:23Z" level=info msg="Successfully deleted proc danef-dictionary-api"

I've tried stopping, deleting and starting the app to see if there's a mistake. That's why those logs are there.

struCoder commented 4 years ago

Hi @SametSahin10 I used pmgo start my application in production env. If you start your application that has built you can try this command: pmgo start /path/to/your/binary/gofile appName true

For example in my case: pmgo start /home/dev/project/scheduler/scheduler scheduler true

and i got this: image

SametSahin10 commented 4 years ago

I've ended up using systemd to deamonize my application. When I think about this issue now, I think it might be due to application not finding environment variables where they supposed to be. This is just a thought. It's safe to close the issue At least for now.