contribsys / faktory_worker_ruby

Faktory worker for Ruby
GNU Lesser General Public License v3.0
214 stars 31 forks source link

Faktory::CommandError: ERR Invalid password #4

Closed jagthedrummer closed 7 years ago

jagthedrummer commented 7 years ago

I'm trying to connect to a local faktory instance with a password and am not having any luck.

I started the server like this:

$ FAKTORY_PASSWORD=test faktory

Then if I try to connect without configuring anything I see this, as expected:

> MyJob.perform_async(42)
ArgumentError: Server requires password, but none has been configured

So then I set ENV vars like this:

FAKTORY_PROVIDER=MY_FAKTORY_URL
MY_FAKTORY_URL=tcp://:test@localhost:7419

And then when I try to connect I see this:

> MyJob.perform_async(42)
Faktory::CommandError: ERR Invalid password

Am I missing something about how to configure the ruby client with a password?

mperham commented 7 years ago

Nice catch, I've verified that the server is hashing incorrectly; this will be fixed in the next release. The Ruby code is correct.

mperham commented 7 years ago

Of course, all my testing was with the Go client, which used the same incorrect algorithm so it passed. Doh. :-/

jagthedrummer commented 7 years ago

Excellent. I'll be watching out for the next release.

mperham commented 7 years ago

Another user pointed out that the Go was right and Ruby was wrong. You should be able to use fwr/master and get it to work against 0.6.0 now.

jagthedrummer commented 7 years ago

Yep, it's working as expected now. Thanks, @mperham!