x509: failed to load system roots and no roots provided
Closed this issue · 2 comments
PhilipSchmid commented
When using the official nanny docker image and slack
as notifier, the following error shows up and the slack message can't be sent:
service_1 | {"_t":"2018-08-14T12:36:27+0000", "_p":"1", "_l":"ERR", "_n":"~", "_m":"Notify error", "err":"error calling notifier: *notifier.slackNotifier with signal: {Name: Test@9.9.9.9 Notifier:0xc4204fafb0 NextSignal:5s Meta:map[] CallbackFunc:0x884210}: Post https://hooks.slack.com/services/<secret>: x509: failed to load system roots and no roots provided, ", "_c":["nanny/vendor/github.com/mgutz/logxi.Error() /go/src/nanny/vendor/github.com/mgutz/logxi/methods.go:25","nanny/api.(*Server).Handler.func1() /go/src/nanny/api/api.go:79","nanny/pkg/nanny.(*Timer).onExpire() /go/src/nanny/pkg/nanny/timer.go:43","nanny/pkg/nanny.(*Timer).(nanny/pkg/nanny.onExpire)-fm() /go/src/nanny/pkg/nanny/timer.go:22","runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2361"]}
This is caused by a missing root certificate inside the Docker image. To fix this, add the ca-certificates
to the Docker image. I'll fix this via a PR.
Regards,
Philip
lunemec commented
@PhilipSchmid I added you as collaborator here too 😉
PhilipSchmid commented
I saw that, thanks! Nevertheless, I thought it would be nicer to create a separate branch & PR (assigned to you) in order to make transparent changes to the Nanny code. I didn't wanted to just push to the master branch 😅.
Regards,
Philip