apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
60.5k stars 13.07k forks source link

Superset Email Report Fail due connection Unexpectedly Closed #28033

Open Hardik94 opened 2 months ago

Hardik94 commented 2 months ago

Bug description

We have existing Superset 2.0.1 Installed on cluster and docker was working fine. Due to new release and some more features. we have tried to move to Superset 3.0.3

we have restored all the backup from older version. Most functionality working fine. but Alerts and Reports are not working. However the Application is creating the thumbnail. but at time of sending the report , it fails the connections.

So, we have tried to fresh install the superset and reproduce the bug. just to check the email report functionality works or not.

How to reproduce the bug

Install Superset 3.0.3 or 3.1.0 (both have same issue)

Added below mentioned flag in superset_config.py


ALERT_REPORTS_NOTIFICATION_DRY_RUN = False

from superset.tasks.types import ExecutorType

THUMBNAIL_SELENIUM_USER = 'admin'
ALERT_REPORTS_EXECUTE_AS = [ExecutorType.SELENIUM]

# smtp server configuration
EMAIL_NOTIFICATIONS = True  # all the emails are sent using dryrun
SMTP_HOST = "smtp.sendgrid.net"
SMTP_STARTTLS = True
SMTP_SSL = False
SMTP_USER = "apikey"
SMTP_PORT = 587
SMTP_PASSWORD = ""
SMTP_MAIL_FROM = ""
# If True creates a default SSL context with ssl.Purpose.CLIENT_AUTH using the
# default system root CA certificates.
SMTP_SSL_SERVER_AUTH = False
ENABLE_CHUNK_ENCODING = False

Changes in Dockerfile for Selenium

FROM apache/superset:3.1.0

USER root

RUN apt-get update && \
    apt-get install --no-install-recommends -y firefox-esr wget

ENV GECKODRIVER_VERSION=0.29.0
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz && \
    tar -x geckodriver -zf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -O > /usr/bin/geckodriver && \
    chmod 755 /usr/bin/geckodriver && \
    rm geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz

RUN pip install --no-cache gevent

USER superset

Screenshots/recordings

Screenshot 2024-04-15 at 10 53 52 AM

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

Vidityagnik commented 2 months ago

I am facing the same issue. Please help

rusackas commented 2 months ago

Maybe @eschutho would be able to spot something wrong/missing from the config? ¯\_(ツ)_/¯

mcdogg17 commented 1 month ago

Please help. I also faced this issue.

rusackas commented 1 month ago

@mcdogg17 Is there any context you can add? Are you using the same config, getting the same errors? What version are you running?