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

NOAUTH Authentication required #491

Open
Somebi opened this issue Aug 29, 2016 · 9 comments
Open

NOAUTH Authentication required #491

Somebi opened this issue Aug 29, 2016 · 9 comments

Comments

@Somebi
Copy link

Somebi commented Aug 29, 2016

Using Ubuntu 16.04.1 LTS, nutcracker version 0.4.1

nc_redis.c:2936 SELECT 10 failed on redis-pool | my_ip_here:6379: NOAUTH Authentication required.

nutcracker -d -c /var/local/nutcracker.yml -a 0.0.0.0 -s 20100 -v 11 -o /var/log/nutcracker.log

redis-pool:
  listen: 127.0.0.1:20001
  distribution: random
  redis: true
  servers:
   - my_ip_here:6379:1
  redis_db: 10
  redis_auth: my_password_here

With preconnect: true throwing right away.

Select command is not supported, so i fearing that it's not selecting 10 redis_db and using 0 db as default one.

Could you please look into it?

@Somebi
Copy link
Author

Somebi commented Aug 29, 2016

Yap it's not selecting required 10 database. It's selecting default 0 database.

@Somebi
Copy link
Author

Somebi commented Aug 29, 2016

redis_auth should have password in there or just a boolean? redis_auth: true or redis_auth: password.
Password should have this format "password" or just clean password?
Something is wrong there definitely.

@Somebi
Copy link
Author

Somebi commented Aug 29, 2016

Just tried to compile from master, by cloning. Same results. preconnect: true with password and redis_db: 10 for example.

nc_redis.c:2948 SELECT 10 failed on redis-pool | my_ip:6379: NOAUTH Authentication required.

Worth look into that problem i think.

@charsyam
Copy link
Contributor

@Somebi Your client should send auth command to twemproxy.
this doesn't support to skip enter password for client.

@Somebi
Copy link
Author

Somebi commented Aug 29, 2016

Yes, but it doesn't allow to select database from client. But to select it from twemproxy I need provide auth password... How do i do that? O_o

@therealbill
Copy link

When a Redis instance is configured for authentication, you must send the auth command before it will let you do anything other than disconnect. If you have to use the select command, you can't use Twemproxy as it isn't a supported command.

@Somebi
Copy link
Author

Somebi commented Aug 30, 2016

But in twemproxy there is configuration option for that...

redis_db: The DB number to use on the pool servers. Defaults to 0. Note: Twemproxy will always present itself to clients as DB 0.

What this option for then?

redis_auth: Authenticate to the Redis server on connect.

Should be removed from documentation then...

If you can't use these options together preconnect + redis_db + redis_auth, then it's should be documented as well.

@Somebi
Copy link
Author

Somebi commented Aug 30, 2016

Guess i'll have to use ssh tunnel to redis server to use twemproxy without password...

@charsyam
Copy link
Contributor

@Somebi
also. You can use this patch, #458

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

3 participants