python-slack-logger icon indicating copy to clipboard operation
python-slack-logger copied to clipboard

SSL Error

Open shyyawn opened this issue 8 years ago • 2 comments

Hi, I am getting an SSL certificate, while using the plugin.

Code:

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

sh = SlackHandler(username='logger', icon_emoji=':robot_face:', url=buildConfig['slack']['url'])
sh.setLevel(logging.DEBUG)


f = SlackFormatter()
sh.setFormatter(f)
logger.addHandler(sh)

Log:

Traceback (most recent call last): File "/usr/lib/python3.6/logging/handlers.py", line 1174, in emit h.endheaders() File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib/python3.6/http/client.py", line 964, in send self.connect() File "/usr/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname) File "/usr/lib/python3.6/site-packages/gevent/_ssl3.py", line 60, in wrap_socket _session=session) File "/usr/lib/python3.6/site-packages/gevent/_ssl3.py", line 232, in __init__ raise x File "/usr/lib/python3.6/site-packages/gevent/_ssl3.py", line 228, in __init__ self.do_handshake() File "/usr/lib/python3.6/site-packages/gevent/_ssl3.py", line 545, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) Call stack: File "/usr/lib/python3.6/site-packages/gevent/greenlet.py", line 536, in run result = self._run(*self.args, **self.kwargs) File "/usr/lib/python3.6/site-packages/gevent/baseserver.py", line 26, in _handle_and_close_when_done return handle(*args_tuple) File "/usr/lib/python3.6/site-packages/gevent/pywsgi.py", line 1482, in handle handler.handle() File "/usr/lib/python3.6/site-packages/gevent/pywsgi.py", line 454, in handle result = self.handle_one_request() File "/usr/lib/python3.6/site-packages/gevent/pywsgi.py", line 671, in handle_one_request self.handle_one_response() File "/usr/lib/python3.6/site-packages/gevent/pywsgi.py", line 935, in handle_one_response self.run_application() File "/usr/lib/python3.6/site-packages/geventwebsocket/handler.py", line 87, in run_application return super(WebSocketHandler, self).run_application() File "/usr/lib/python3.6/site-packages/gevent/pywsgi.py", line 909, in run_application self.process_result() File "/usr/lib/python3.6/site-packages/gevent/pywsgi.py", line 893, in process_result for data in self.result: File "/usr/lib/python3.6/site-packages/werkzeug/debug/__init__.py", line 284, in debug_application app_iter = self.app(environ, start_response) File "/usr/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response) File "/usr/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)

Can you help me out on this, did I miss some configuration?

shyyawn avatar Dec 05 '17 05:12 shyyawn

@shyyawn It looks like the issue of python http library. Will you try this https://stackoverflow.com/questions/41691327/ssl-sslerror-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c?

junhwi avatar Dec 20 '17 17:12 junhwi

@shyyawn Do you have a soultion? Thanks.

RJ797 avatar Aug 12 '21 08:08 RJ797