ofelia icon indicating copy to clipboard operation
ofelia copied to clipboard

Posting to slack webhook fails

Open m-cg opened this issue 6 years ago • 2 comments

Hi, I recently found Ofelia and it looks great! Seems very simple to use. I'm testing it with a simple config.ini:

[global]
slack-webhook = https://hooks.slack.com/services/xxxxxxxxx/yyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzzzzz

[job-run "job-executed-on-new-container"]
schedule = * * * * *
image = ubuntu:latest
command = touch /tmp/example

Yet, when I look into the logs I see: 2018/09/06 13:39:55 slack.go:64 ▶ ERROR Slack error calling "https://hooks.slack.com/services/xxxxxxxxx/yyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzzzzz" error: "Post https://hooks.slack.com/services/xxxxxxxxx/yyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzzzzz: x509: failed to load system roots and no roots provided"

I tried to google the error and it seems to be related with missing CA certificates. Is there anything wrong in the config file?

m-cg avatar Sep 06 '18 14:09 m-cg

Nope, I just found this out my self as well. The certificates are missing docker image. If you're running on linux you can add this volume: -v /etc/ssl/certs:/etc/ssl/certs

For a real solution, the Docker file needs to be adjusted.

Duvel avatar Sep 07 '18 07:09 Duvel

This has been solved by ab72415, please close this issue.

TheDevMinerTV avatar Apr 04 '23 06:04 TheDevMinerTV