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

rq worker does not honor REDIS_PASSWORD setting #809

Closed
guhcampos opened this issue Mar 31, 2017 · 8 comments
Closed

rq worker does not honor REDIS_PASSWORD setting #809

guhcampos opened this issue Mar 31, 2017 · 8 comments

Comments

@guhcampos
Copy link

guhcampos commented Mar 31, 2017

I have a settings module to configure the worker, and I'm using -c to pass this module to 'rq worker'.

All settings work fine, including the REDIS_URL and QUEUES settings. The REDIS_PASSWORD seems to be ignored though, as the worker fails with

redis.exceptions.ResponseError: NOAUTH Authentication required.

I have listened for incoming connections on my redis server with 'MONITOR', and can confirm that rq never sends the AUTH command, even with the password configured.

$ docker exec -ti {redacted} pip3 list | grep rq
rq (0.7.1)

@selwin
Copy link
Collaborator

selwin commented Apr 6, 2017

Could you please open a PR for this?

@guhcampos
Copy link
Author

I'm not sure I follow - I don't have a patch, how can I open a PR without one?

@sankaet
Copy link

sankaet commented Apr 23, 2017

was this ever resolved?

@selwin
Copy link
Collaborator

selwin commented Apr 23, 2017 via email

@katichev
Copy link
Contributor

katichev commented May 2, 2017

Why don't you put it into REDIS_URL?

REDIS_URL = 'redis://:password@localhost:6379/1'

There are two possible ways to define a Redis client: either use REDIS_URL, or REDIS_HOST+REDIS_PORT+ REDIS_DB+REDIS_PASSWORD, so you probably shall stick to one of them.

You can also check redis-py docs for reference.

# from url
r = StrictRedis.from_url(redis_url)
# from arguments
r = StrictRedis(host=host, port=port, db=db, password=password, **kwargs)

@theodesp
Copy link
Contributor

theodesp commented Sep 5, 2017

Shall we close this issue as resolved as @katichev explained?

@selwin
Copy link
Collaborator

selwin commented Sep 5, 2017

If someone's willing to make a PR for this, I'm willing to accept it :). It's good to give users the flexibility to specify Redis password via the password argument. Afterall, it's supported by the Redis library.

@theodesp
Copy link
Contributor

theodesp commented Sep 8, 2017

I just added some tests for this and it seems that the CLI does pass the options to the connection. Is it something I'm missing?

@selwin selwin closed this as completed in 0fab93d Sep 9, 2017
selwin added a commit that referenced this issue Sep 9, 2017
Fixed #809 - Added tests for various cli config parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants