struCoder / pmgo

pmgo is a process manager for Golang applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

runtime error: invalid memory address or nil pointer dereference

StillFantastic opened this issue · comments

It seems like Digitalocean just restarted my server and after that pmgo dosn't work anymore.

$ pmgo list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7ae09e]

goroutine 1 [running]:
github.com/struCoder/pmgo/lib/master.(*RemoteClient).MonitStatus(0xc0000107a0, 0x8, 0xc0000107a0, 0xc000064f00, 0xc0000ffe08, 0x40d896)
	/root/go/src/github.com/struCoder/pmgo/lib/master/remote_master.go:218 +0xee
github.com/struCoder/pmgo/lib/cli.(*Cli).Status(0xc0000107a8)
	/root/go/src/github.com/struCoder/pmgo/lib/cli/cli.go:101 +0x46
main.main()
	/root/go/src/github.com/struCoder/pmgo/pmgo.go:124 +0x3d7
$ pmgo start . app
INFO[0000] daemon started                               
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7ae09e]

goroutine 1 [running]:
github.com/struCoder/pmgo/lib/master.(*RemoteClient).MonitStatus(0xc0000107a8, 0xc0000002b8, 0xc000064fb8, 0xc0000fdda0, 0x7a3c8c, 0xc0000fdda0)
	/root/go/src/github.com/struCoder/pmgo/lib/master/remote_master.go:218 +0xee
github.com/struCoder/pmgo/lib/cli.(*Cli).Status(0xc0000107b0)
	/root/go/src/github.com/struCoder/pmgo/lib/cli/cli.go:101 +0x46
main.main()
	/root/go/src/github.com/struCoder/pmgo/pmgo.go:103 +0x685

Now when I try to run pmgo list, it has the following error

FATA[0000] Failed to reborn daemon due to daemon: Resource temporarily unavailable. 

I think pmgo daemon is trying to restart my previous application:

$ pmgo info bullshit
INFO[0000] daemon started                               
─────────────────────────────────────────────────
│ outFile   │ /root/.pmgo/bullshit/bullshit.out │
│ errorFile │ /root/.pmgo/bullshit/bullshit.err │
│ pidFile   │ /root/.pmgo/bullshit/bullshit.pid │
│ path      │ /root/.pmgo/bullshit              │
│ uptime    │ 0s                                │
│ restart   │ 924                               │
│ name      │ bullshit                          │
│ pid       │ 6153                              │
│ status    │ running                           │
─────────────────────────────────────────────────

I am having the exact same error, did you find a solution to this?