Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Cannot assign requested address in scheduling reports #18885

Closed
FaidJalal19 opened this issue Feb 23, 2022 · 14 comments
Closed

Getting Cannot assign requested address in scheduling reports #18885

FaidJalal19 opened this issue Feb 23, 2022 · 14 comments
Labels
#bug Bug report

Comments

@FaidJalal19
Copy link

FaidJalal19 commented Feb 23, 2022

Hi

I am scheduling csv reports. The reports gets successfully scheduled and executed but I get following error while sending the mails
Report state: Failed generating dataframe <urlopen error [Errno 99] Cannot assign requested address>
Report state: Failed generating csv <urlopen error [Errno 99] Cannot assign requested address>
Screenshot from 2022-02-23 21-06-31

Can anyone help out

@FaidJalal19 FaidJalal19 added the #bug Bug report label Feb 23, 2022
@stale
Copy link

stale bot commented Apr 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 29, 2022
@pearsonhenri
Copy link

Running into the same issue here

@stale stale bot removed the inactive Inactive for >= 30 days label Dec 22, 2022
@divick
Copy link

divick commented Mar 22, 2023

Running into the same issue

@kokoroX
Copy link

kokoroX commented Mar 23, 2023

Running into the same issue

[2023-03-23 08:02:17,053: ERROR/ForkPoolWorker-7] A downstream exception occurred while generating a report: 10d38277-6a5e-4a11-b4e4-59dbae998741. [SupersetError(message='[Errno 99] Cannot assign requested address', error_type=<SupersetErrorType.REPORT_NOTIFICATION_ERROR: 'REPORT_NOTIFICATION_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra=None)]
Traceback (most recent call last):
  File "/app/superset/tasks/scheduler.py", line 87, in execute
    AsyncExecuteReportScheduleCommand(
  File "/app/superset/reports/commands/execute.py", line 723, in run
    raise ex
  File "/app/superset/reports/commands/execute.py", line 719, in run
    ReportScheduleStateMachine(
  File "/app/superset/reports/commands/execute.py", line 677, in run
    state_cls(
  File "/app/superset/reports/commands/execute.py", line 578, in next
    raise first_ex
  File "/app/superset/reports/commands/execute.py", line 547, in next
    self.send()
  File "/app/superset/reports/commands/execute.py", line 445, in send
    self._send(notification_content, self._report_schedule.recipients)
  File "/app/superset/reports/commands/execute.py", line 434, in _send
    raise ReportScheduleSystemErrorsException(errors=notification_errors)

@kvatsek
Copy link

kvatsek commented Jun 8, 2023

Тоже столкнулась с этой проблемой
Снимок экрана от 2023-06-08 12-46-52

Как решили?

@infl18
Copy link

infl18 commented Jun 8, 2023

Тоже столкнулась с этой проблемой Снимок экрана от 2023-06-08 12-46-52

Как решили?

чекайте smtp настройки. где-то ошибка.

@sfirke
Copy link
Member

sfirke commented Jul 21, 2023

The issue may be that you haven't specified the SMTP server. I believe that [Errno 99] Cannot assign requested address message is coming from the smtplib library, you'll see Airflow-related questions on the web with this same problem. Either you didn't specify the SMTP server at all, or Superset isn't able to connect to it, or you specified it in a config that isn't getting picked up or is being overwritten.

Look at the SMTP-related values in the config.py file that contains all the default config values, then override the relevant ones with your settings. For a docker-compose deployment, you would do this in superset_config.py or superset_config_docker.py in the docker/pythonpath_dev/ directory.

Someone wrote this in the Superset Slack chat in February 2023 after they debugged this error:

What I didn't really quite understand from the documentation regarding this, is whatever you specify in config.py, if you running on docker, you HAVE to migrate these settings to superset_config.py otherwise settings will not persist. My error is that I was not setting the SMTP settings inside the superset_config.py
Assuming you have all the settings correct, your SMTP credentials are good, you can get this one working quite easily, (it took me days to figure this out, but I didn't quite understand the structure in the begining, now everything is clear)

@sfirke sfirke closed this as completed Aug 2, 2023
@martyweb
Copy link

martyweb commented Oct 9, 2023

If it helps anyone, I was having this same problem and fixed it by moving all the SMTP:* variables from the "extraEnv" section to the "configOverrides" section. All the values were exactly the same but it appears they were not getting picked up in extraEnv.

@jesperbagge
Copy link

If it helps anyone, I was having this same problem and fixed it by moving all the SMTP:* variables from the "extraEnv" section to the "configOverrides" section. All the values were exactly the same but it appears they were not getting picked up in extraEnv.

Can confirm that this is still an issue and the suggested solution by @martyweb works!

@rusackas
Copy link
Member

rusackas commented Sep 9, 2024

@jesperbagge @martyweb it seems we've had a few people running into this. Do you think that adding some comments in the config file would help? And/or adding some notes in the docs? Would love to improve the situation rather than have more people googling for an antique GitHub issue :D

(cc @villebro / @sfirke who might also know a good way to improve this).

@sfirke
Copy link
Member

sfirke commented Sep 9, 2024

@rusackas it looks to me like what @jesperbagge and @martyweb are dealing with are related to deploying with the Kubernetes Helm chart. Can they confirm and is that also what you're seeing elsewhere?

If so maybe they or someone else can implement this in the Helm chart via a PR.

@rusackas
Copy link
Member

rusackas commented Sep 9, 2024

Ahh, if it's implementable/fixable in the helm chart, that's ideal. I thought maybe it was a case of adding a line to the docs somewhere :) As it stands, this thread is the only resource for others who run into the issue.

@martyweb
Copy link

martyweb commented Sep 9, 2024

@rusackas it looks to me like what @jesperbagge and @martyweb are dealing with are related to deploying with the Kubernetes Helm chart. Can they confirm and is that also what you're seeing elsewhere?

If so maybe they or someone else can implement this in the Helm chart via a PR.

Yep, I'm deploying to k8s using Helm

@jesperbagge
Copy link

@rusackas it looks to me like what @jesperbagge and @martyweb are dealing with are related to deploying with the Kubernetes Helm chart. Can they confirm and is that also what you're seeing elsewhere?

If so maybe they or someone else can implement this in the Helm chart via a PR.

Yes, I’m also deploying with the Helm chart. Ideally the solution would be to make the extraEnv key work as expected. Unfortunately, K8s is still magic to me. I do a victory dance every time I manage to do something that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

10 participants