No handlers could be found for logger "slackclient.client" (ubuntu WORKS, same code centos7 does not)
See original GitHub issueDescription
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:
- 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:
- Created 5 years ago
- Comments:5 (2 by maintainers)
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
@RodneyU215 yeah i did that before, thats how i found this: