# Can't use notification with slackbot due to ssl error

**URL:** <https://forum.ansible.com/t/cant-use-notification-with-slackbot-due-to-ssl-error/3482>\
**Category:** Get Help\
**Tags:** resolved, awx\
**Created:** [January 26, 2024, 1:30am UTC](https://forum.ansible.com/t/cant-use-notification-with-slackbot-due-to-ssl-error/3482 "2024-01-26T01:30:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crimrose](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/crimrose/32/2239_2.png) [@Crimrose](https://forum.ansible.com/u/Crimrose)\
**Post date:** [January 26, 2024, 1:30am UTC](https://forum.ansible.com/t/cant-use-notification-with-slackbot-due-to-ssl-error/3482/1 "2024-01-26T01:30:52Z")

</div>

I’m using AWX version 23.6.0, awx operator 2.10.0.  
I already followed the guide how to integrate slackbot to awx [23. Notifications — Ansible Tower User Guide v3.8.6](https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html#slack).  
But when I run test slack notification, I always get this error

```auto
    return backend_obj.send_messages([notification_obj])
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/notifications/slack_backend.py", line 48, in send_messages
    response = client.chat_postMessage(channel=channel, thread_ts=thread, as_user=True, text=m.subject)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/client.py", line 2072, in chat_postMessage
    return self.api_call("chat.postMessage", json=kwargs)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/base_client.py", line 156, in api_call
    return self._sync_send(api_url=api_url, req_args=req_args)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/base_client.py", line 187, in _sync_send
    return self._urllib_api_call(
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/base_client.py", line 294, in _urllib_api_call
    response = self._perform_urllib_http_request(url=url, args=request_args)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/base_client.py", line 473, in _perform_urllib_http_request
    raise err
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/base_client.py", line 397, in _perform_urllib_http_request
    resp = self._perform_urllib_http_request_internal(url, req)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/slack_sdk/web/base_client.py", line 502, in _perform_urllib_http_request_internal
    resp = opener.open(req, timeout=self.timeout) # skipcq: BAN-B310
  File "/usr/lib64/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib64/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.9/urllib/request.py", line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib64/python3.9/urllib/request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>

```

Do I need to configure anything else?  
I already set `validate_certs: false` but issue still there.

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [January 26, 2024, 3:13pm UTC](https://forum.ansible.com/t/cant-use-notification-with-slackbot-due-to-ssl-error/3482/2 "2024-01-26T15:13:30Z")

</div>

Hi, is your AWX behind proxy?  
If so, adding custom CA cert to AWX instance may help you: [Trusting a custom certificate authority - Ansible AWX Operator Documentation](https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/trusting-a-custom-certificate-authority.html)

---

<div class="post-metadata">

**Author:** ![Crimrose](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/crimrose/32/2239_2.png) [@Crimrose](https://forum.ansible.com/u/Crimrose)\
**Post date:** [January 26, 2024, 5:22pm UTC](https://forum.ansible.com/t/cant-use-notification-with-slackbot-due-to-ssl-error/3482/3 "2024-01-26T17:22:07Z")

</div>

I found out a way to fix it. Actually, I use mitmproxy, so I added `www.slack.com` in NO\_PROXY the problem gone away.

I had to build awx in my local (without proxy, https), itdisplay different message. So I awared that slack uses [https://www.slack.com/api/chat.postMessage](https://www.slack.com/api/chat.postMessage).

`│ 2024-01-26 16:46:41,474 ERROR [a4222c82c38d49e79eea6d28fbd7146a] awx.main.tasks.system Send Notification Failed The request to the Slack API failed. (url: https://www.slack.com/api/chat.postMessage) `

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 25, 2024, 5:22pm UTC](https://forum.ansible.com/t/cant-use-notification-with-slackbot-due-to-ssl-error/3482/4 "2024-02-25T17:22:49Z")

</div>

Closed on February 25, 2024, 5:22pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
