Issue Summary

Self-hosted redash inside corporate firewall.
Symptom:
Slack webhook integration

    [2019-09-23 21:19:29,681][PID:204][ERROR][ForkPoolWorker-103] Slack send ERROR.
    Traceback (most recent call last):
      File "/app/redash/destinations/slack.py", line 70, in notify
        resp = requests.post(options.get('url'), data=json_dumps(payload), timeout=5.0)
      File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 116, in post
        return request('post', url, data=data, json=json, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 60, in request
        return session.request(method=method, url=url, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 646, in send
        r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 504, in send
        raise ConnectTimeout(e, request=request)
    ConnectTimeout: HTTPSConnectionPool(host='hooks.slack.com', port=443): Max retries exceeded with url: /services/REDACTED/REDACTED/REDACTED (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe2d56b8a50>, 'Connection to hooks.slack.com timed out. (connect timeout=5.0)'))

However, curling the webhook succeeds:

curl -X POST -H 'Content-type: application/json' --data '{"text":"Hello, World!"}' https://hooks.slack.com/services/REDACTED/REDACTED/REDACTED

Technical details:

  • Redash Version: 7.0.0+b18042
  • Browser/OS: Centos 7
  • How did you install Redash: shell script for Centos 7 from justinclift

Solved.

Configured docker like so: https://docs.docker.com/network/proxy/#configure-the-docker-client with http_proxy and https_proxy

docker-compose down then docker-compose up

Slack started working! Docker added new env variables into /opt/redash/env

1 Like