nickelser/zhong

unable to run due to client error: Suo::LockClientError

alexpil opened this issue · 11 comments

Hello Nick,

I have this error "unable to run due to client error: Suo::LockClientError" when trying to run zhong on our staging server (redis is located on different instance). Locally everything works fine.
Could it be some permission/configuration missing?

Thank you,
Alex

@alexpil that is usually a result of a connection error when attempting to lock. Looks like the backtrace and the wrapping exception are currently masked... I can make zhong print the backtrace, but if you fork zhong, comment out lines 76-78 here: https://github.com/nickelser/zhong/blob/master/lib/zhong/job.rb#L76, the full exception and backtrace should be raised which will allow you to debug further.

Hello Nick,

Hmm i am getting this:
/home/rof/cache/bundler/ruby/2.2.0/gems/suo-0.3.2/lib/suo/client/base.rb:153:in `rescue in retry_with_timeout'

/home/rof/cache/bundler/ruby/2.2.0/gems/suo-0.3.2/lib/suo/client/base.rb:140:in `retry_with_timeout'

/home/rof/cache/bundler/ruby/2.2.0/gems/suo-0.3.2/lib/suo/client/base.rb:101:in `acquire_lock'

/home/rof/cache/bundler/ruby/2.2.0/gems/suo-0.3.2/lib/suo/client/base.rb:30:in `lock'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/job.rb:47:in `run'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/scheduler.rb:142:in `run_job'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/scheduler.rb:82:in `block (2 levels) in start'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/scheduler.rb:80:in `each'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/scheduler.rb:80:in `block in start'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/scheduler.rb:74:in `loop'

/var/app/current/vendor/cache/zhong-57d733f31787/lib/zhong/scheduler.rb:74:in `start'

/var/app/current/vendor/cache/zhong-57d733f31787/bin/zhong:14:in `<top (required)>'

/home/rof/cache/bundler/ruby/2.2.0/bin/zhong:23:in `load'

/home/rof/cache/bundler/ruby/2.2.0/bin/zhong:23:in `

'

I probably need to debug deeply, but its not really clear what could be the problem

@alexpil gah, looks like the exception is actually masked there.

for debugging, you could open a console on your staging instance, and try to connect to your cache store manually and do an operation to ensure that's working (using redis or memcached). i'll look into surfacing these errors much more gracefully soon...

Calling directly Suo client from console seems to works just fine. I could do a simple lock. But still the same when using zhong

Could you try in the console by doing something like:

Suo::Client::Redis.new("some_text_here", client: Zhong.redis).lock

?

Yes this works
Suo::Client::Redis.new("some_text_here", client: Zhong.redis).lock

I have the same issue :(

Any news on a fix/workaround?

@alexpil @nickelser Right after a little debugging I have a fix for this at #10

sorry @alexpil for the delay in getting to this :(

but many thanks to @madwire for tackling this -- I've released v0.2.1 which should solve that problem. let me know!

Thank you very much for your help @nickelser @madwire, I can confirm that its working.