zertrin / duplicity-backup.sh

Bash wrapper script for automated backups with duplicity supporting Amazon's S3 online storage as well as other storage destinations (ftp, rsync, sftp, local storage...).
https://zertrin.org/projects/duplicity-backup/
GNU General Public License v3.0
766 stars 187 forks source link

slack notifications not working: curl: (1) Protocol https not supported or disabled in libcurl #152

Closed syst0m closed 7 years ago

syst0m commented 7 years ago

config file:

NOTIFICATION_SERVICE="slack"
NOTIFICATION_FAILURE_ONLY="no" # send notifications only if there was an error while creating backup

# Provider: Slack
SLACK_HOOK_URL=" https://hooks.slack.com/services/_edited_out_"
SLACK_CHANNEL="#_edited_out_"
SLACK_USERNAME="duplicity-backup"
SLACK_EMOJI="package"

script stdout:

curl: (1) Protocol https not supported or disabled in libcurl

supported curl protocols:

# curl -V
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 
zertrin commented 7 years ago

Well, this issue seems to have to do with libcurl itself. I guess this is a problem from your distribution. I don't see where I can help here 😕

(well there is a space before the https in your SLACK_HOOK_URL but don't think that's the issue, is it?)

zertrin commented 7 years ago

Additionally, your distro may be quite old. I'm on Debian Jessie (which is also kind of always old) and I get the following curl output:

curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1t zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP

Note the versions of curl and openssl 😉

Not sure what Slack expects for it's HTTPS handshake.

In any case, make sure that you can "curl your way" directly to slack (by entering the curl command outside of duplicity-backup.sh) without error before using it in this script.

syst0m commented 7 years ago

I had a space in front of the SLACK_HOOK_URL, which made curl unable to interpret the protocol as https. x.X

Thnx for the help. :)