i added this two line in .env file


but when i test email get this error
socket.error: [Errno 99] Cannot assign requested address
how to solve it

You need to set REDASH_MAIL_SERVER. It tries to send from localhost by default; which is why you see that error. Here is the relevant page in our documentation about how to configure the mail server.

i set it


now get htis error
socket.gaierror: [Errno -2] Name or service not known @jesse

Your mail server address should not be the same as your Redash host. Usually that address will be something like mail.speakol.com or smtp.speakol.com.

@jesse
i edited it


now i get this

is this internet connection problem or another issue?

It appears you haven’t changed any of your environment variables since your last post. Right now, Redash is trying to send emails using itself which won’t work. You need to point Redash at an SMTP server in your organization.

1 Like

Hi:
I have the similar problem.
The mail config of docker-compose.yml is shown as follow .


The test is success through command “docker-compose run --rm server manage send_test_mail”.
But when I send mail through redash,the error is raised.

Are you certain you Docker instance can access the internet? This looks like a DNS lookup problem.

Also, maybe try mail port 994 just in case 465 is too chatty.

Hi:
Thank you very much for you advise.
I try to change port 465 to 994, the test is success through command “docker-compose run --rm server manage send_test_mail” but redash send mail is failed.
The log is shown follow:


At the same time, my machine can access internet.
Do you mean to check docker container if can access internet?

Hi:
It seem ok when i set environment in “worker” and “server” tag of docker-compose.yml.
thank you verify much.

1 Like

Hello, dear Team,
I’ve come across the same problem.

At first, I added the configuration inside the env file, but I noticed that you suggested that I should modify the yml file if we were using the docker.

But my docker-compose.yml file seems a little different. I added the configuaration into the environment part.

I restarted the service and tested the email, there’s no error.

But it doesnt work, still saying ‘It seems that your email server is not configured’

Btw, I can acess the external network normally.

Thanks in advance.

This is a shot in the dark: but try changing REDASH_HOST from 0.0.0.0.0 to server. Restart the services and try again.

Thanks for your response.
I have tried to change the ‘0.0.0.0’ to ‘server’, server and the ip of the server. All failed with the same error that the mail server has not been configured yet. But there’s one difference, when I tried to run the test email command, I can get the result of the starting redash redis_1.


Furthermore, actually I received the test message from redash.

Maybe I can find some logs if that’s needed.

Thanks again.

For your information, I was using the latest version I think. It’s 8.0.0.b32245.

I have added the configuration to every environment variable there, but it still doesnt work somehow.

Sorry to keep disturbing. Don’t know where to go to troubleshooting this issue.

Not disturbing at all. I need to replicate your environment on my end and do some testing which might take me a few days. Meanwhile, you can actually use the Redash API to create your users if need be. The only places where you’ll need the emailer are for invitation links and alert destinations.

Thanks very much.

Really appreciated it.

Hey there,

Has there been any update to this? I’m in the same boat as many others. A very default install, just trying to get emails sent. Only specifying REDASH_MAIL_DEFAULT_SENDER as something I made up to test.

Trying:

docker-compose run --rm server manage send_test_mail

Results in:

socket.error: [Errno 99] Cannot assign requested address

please, can you tell to me about what mean of option “-rm” ?

@jesse
I’m also facing same email issue here is my env file and docker-compose.yml file

PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=XXXXXXXXXXXXXXXXXXXXX
REDASH_COOKIE_SECRET=XXXXXXXXXXXXXXXxxx
REDASH_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXxxxxx
REDASH_DATABASE_URL=postgresql://postgres:XXXXXXXXXXXXXXXXXXxxxx@postgres/postgres
REDASH_RATELIMIT_ENABLED=false
REDASH_MAIL_SERVER=email-smtp.us-east-1.amazonaws.com
REDASH_MAIL_PORT=587
REDASH_MAIL_USE_SSL=true
REDASH_MAIL_USE_TLS=true
REDASH_MAIL_USERNAME=XXXXXXXXXXXXX
REDASH_MAIL_PASSWORD=XXXXXXXXXXXXXXXXXXXXX
REDASH_MAIL_DEFAULT_SENDER=info@springrole.com
REDASH_HOST=https://redash.springworks.in

docker-compose.yml file

version: “2”
x-redash-service: &redash-service
image: redash/redash:10.0.0.b50363
depends_on:

  • postgres
  • redis
    env_file: /opt/redash/env
    restart: always
    services:
    server:
    <<: *redash-service
    command: server
    ports:
  • “5000:5000”
    environment:
    REDASH_WEB_WORKERS: 6
    scheduler:
    <<: *redash-service
    command: scheduler
    scheduled_worker:
    <<: *redash-service
    command: worker
    environment:
    QUEUES: “scheduled_queries,schemas”
    WORKERS_COUNT: 2
    adhoc_worker:
    <<: *redash-service
    command: worker
    environment:
    QUEUES: “email,queries,default,periodic”
    WORKERS_COUNT: 2
    worker:
    <<: *redash-service
    command: worker
    environment:
    QUEUES: “periodic emails default”
    WORKERS_COUNT: 2
    redis:
    image: redis:5.0-alpine
    restart: always
    postgres:
    image: postgres:9.6-alpine
    env_file: /opt/redash/env
    volumes:
  • /opt/redash/postgres-data:/var/lib/postgresql/data
    restart: always
    nginx:
    image: redash/nginx:latest
    ports:
  • “80:80”
    depends_on:
  • server
    links:
  • server:redash
    restart: always

No errors in the logs unable to add new users in the redash invite emails are not receiving or is there any way to set the password?
Any help here thanks in advance.