question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No handlers could be found for logger "slackclient.client" (ubuntu WORKS, same code centos7 does not)

See original GitHub issue

Description

Hi,

I am having issue to run my bot in centos7. I worked with code in ubuntu and it works with no problem. so i run the same code in centos7 with all pip requirements running, and when run in centos i have:

No handlers could be found for logger "slackclient.client"
Connection failed. Exception traceback printed above.

FUNNY THING IS: when I use bot check script which use same method to connect as my bot I can get return bot name from slack

i am really puzzled

######################### when run bot scriptto check my bot id i have:

DEBUG 2019-03-05 17:01:42,534 - Starting new HTTPS connection (1): slack.com:443
DEBUG 2019-03-05 17:01:42,880 - https://slack.com:443 "POST /api/users.list HTTP/1.1" 200 None

which is good, but when i run same thing with main bot script i have:

DEBUG 2019-03-05 16:58:14,448 - Starting new HTTPS connection (1): slack.com:443
DEBUG 2019-03-05 16:58:14,888 - https://slack.com:443 "POST /api/rtm.connect HTTP/1.1" 200 285
WARNING 2019-03-05 16:58:15,047 - Failed RTM connect
Traceback (most recent call last):
  File "/home/miklab01/python-slackclient/slackclient/client.py", line 140, in rtm_connect
    self.server.rtm_connect(use_rtm_start=with_team_state, **kwargs)
  File "/home/miklab01/python-slackclient/slackclient/server.py", line 159, in rtm_connect
    self.connect_slack_websocket(self.ws_url)
  File "/home/miklab01/python-slackclient/slackclient/server.py", line 200, in connect_slack_websocket
    raise SlackConnectionError(message=str(e))
SlackConnectionError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)

both bot check script and slack bot script connect with the same key

What type of issue is this? (place an x in one of the [ ])

  • bug ???
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • I’ve read and agree to the Code of Conduct.
  • I’ve searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

slackclient version: 1.3.1

python version: with ubuntu i use: Python 2.7.15rc1

with centos: Python 2.7.5

OS version(s): UBUNTU 18.04.1 Linux 4.15.0-45-generic LTS Server Centos7 Linux 3.10.0-862.11.6.el7.x86_64

Steps to reproduce:

  1. python script.py

Expected result:

run bot script on both cenots and ubuntu (only ubuntu works)

Actual result:

ubuntu works fine centos bot check script with the same method of connection works centos running actual bot script DOES NOT

No handlers could be found for logger "slackclient.client"
Connection failed. Exception traceback printed above.

any ideas ? anyone ?

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
miklaszcommented, Mar 6, 2019

i also found this: Resolution Steps: NOTE: We strongly recommend that Python is NOT updated to a version newer than python-2.7.5-48.el*.x86_64. If it is newer, downgrade if possible.

Cose: This is due to a defect in newer releases of Python 2.7.5 (build 58 or greater) which causes certificate validation to fail regardless of certificate status. This is outlined further in the following link:

https://community.hortonworks.com/questions/120861/ambari-agent-ssl-certificate-verify-failed-certifi.html Additionally, this can be caused by updating to a newer release of JDK above 1.8.0_131 and CentOS/RHEL versions 7.4 and above where TLS v1 has been disabled.

https://community.hortonworks.com/questions/134759/disabling-tlsv1-tls11-enabling-tlsv12.html

i didnt test it yet but i will tomorrow

1reaction
miklaszcommented, Mar 6, 2019

@RodneyU215 yeah i did that before, thats how i found this:

WARNING:slackclient.client:Failed RTM connect
Traceback (most recent call last):
  File "/home/miklab01/python-slackclient/slackclient/client.py", line 140, in rtm_connect
    self.server.rtm_connect(use_rtm_start=with_team_state, **kwargs)
  File "/home/miklab01/python-slackclient/slackclient/server.py", line 159, in rtm_connect
    self.connect_slack_websocket(self.ws_url)
  File "/home/miklab01/python-slackclient/slackclient/server.py", line 200, in connect_slack_websocket
    raise SlackConnectionError(message=str(e))
SlackConnectionError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)
Connection failed. Exception traceback printed above.
Read more comments on GitHub >

github_iconTop Results From Across the Web

No handlers could be found for logger "slackclient.client ...
Description Hi, I am having issue to run my bot in centos7. I worked with code in ubuntu and it works with no...
Read more >
slack rtm_connect is not returning the output - Stack Overflow
No handlers could be found for logger "slackclient.client" Connection Failed. Code Snippet: from slackclient import SlackClient import os ...
Read more >
No Handlers Could Be Found For Logger Basic Example
I am trying to enable logging in a module using a logger configured in an executable.Creating loggers handlers and formatters explicitly using Python...
Read more >
Important Notice — slackclient (Legacy Python Slack SDK)
These APIs allow you to build applications that interact with Slack just like the people on your team – they can post messages,...
Read more >
What is CentOS? - Red Hat
A Linux distro derived from source code released by Red Hat. The CentOS Project will discontinue updates and releases of CentOS Linux ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found