jaxxstorm / hookpick

A tool to manage some operational concepts of Hashicorp Vault
MIT License
84 stars 14 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #33

Open lrstanley opened 5 years ago

lrstanley commented 5 years ago

Just a heads up, received this when a node wasn't running, v0.2.1 on amd64/linux. Consistently does it when a connection error occurs (i/o timeout, connection refused, etc).

Also, check out https://github.com/lrstanley/vault-unseal -- this is useful for one-offs, but isn't useful for unsealing at more of an on-going basis, in a more secured manor.

$ ./hookpick unseal
INFO[0000] Vault is unsealed!                            host=vault-node-s02.domain.com progress=0 threshold=3
INFO[0000] Vault is unsealed!                            host=vault-node-s03.domain.com progress=0 threshold=3
ERRO[0030] Get https://vault-node-s01.domain.com:8200/v1/sys/init: dial tcp 1.2.3.4:8200: i/o timeout  host="https://vault-node-s01.domain.com:8200"
ERRO[0060] Get https://vault-node-s01.domain.com:8200/v1/sys/seal-status: dial tcp 1.2.3.4:8200: i/o timeout  host="https://vault-node-s01.domain.com:8200"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x755495]

goroutine 5 [running]:
github.com/jaxxstorm/hookpick/vault.Status(0xc42019c000, 0x1d)
        /home/travis/gopath/src/github.com/jaxxstorm/hookpick/vault/status.go:24 +0x95
github.com/jaxxstorm/hookpick/cmd.glob..func5.1(0xc4200174f0, 0x0, 0x0, 0xc4201139a0, 0xc420014920, 0x1d, 0x2008)
        /home/travis/gopath/src/github.com/jaxxstorm/hookpick/cmd/unseal.go:78 +0xd4
created by github.com/jaxxstorm/hookpick/cmd.glob..func5
        /home/travis/gopath/src/github.com/jaxxstorm/hookpick/cmd/unseal.go:70 +0x4d2