sensu-plugins / sensu-plugins-slack

Sensu Slack chat handlers
http://sensu-plugins.io
MIT License
30 stars 54 forks source link

Error SSL, dont work #33

Open jothoma1 opened 7 years ago

jothoma1 commented 7 years ago

Hi, i have a strange error i cant get the handler to work.... Here is my log file, it complains about SSL but it's not a self signed certificate and i have tried to add all CA intermediate but still no luck. I think it's something else.

{"timestamp":"2017-01-30T21:55:55.467577+0100","level":"info","message":"handler output","handler":{"type":"pipe","command":"handler-slack.rb -j slack","severities":["critical","unknown"],"name":"slack"},"output":["/opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:933:in connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (OpenSSL::SSL::SSLError)\n\tfrom /opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:933:inconnect'\n\tfrom /opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:863:in do_start'\n\tfrom /opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:852:instart'\n\tfrom /opt/sensu/embedded/lib/ruby/2.3.0/net/http.rb:1398:in request'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-slack-1.0.0/bin/handler-slack.rb:140:inpost_data'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-slack-1.0.0/bin/handler-slack.rb:92:in handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.4.2/lib/sensu-handler.rb:81:inblock in '\nwarning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nwarning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\n"]}

I have try to add an environment variable with export SSL_CERT_FILE but still no luck. I dont understand why it dont work. Can someone help me ? Thanks in advance

jothoma1 commented 7 years ago

Nobody ? am i the only one to have this type of error ? My certificate are good, everything works fine from firefox/opera/chrome/etc. I only have this SSL error with the slack handler...

eheydrick commented 7 years ago

That's odd. You aren't going through a proxy per chance?

jbrinson3 commented 6 years ago

I am also currently experiencing this bug. I am not a coder, but I am willing to help troubleshoot this to get this fixed. is there any info I can provide to help out?

majormoses commented 5 years ago

Would exposing http.ca_file as a CLI arg work for you guys? I think a large majority of people are using this either with hosted slack or certs that are part of the standard trusted Root CA chains.