Closed
Description
Hitting this error...
2014-03-08T01:01:34.567573+00:00 app[worker2.2]: 2014-03-08T01:01:34Z 2 TID-orymt1k2g WARN: can't add a new key into hash during iteration
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: 2014-03-08T01:01:34Z 2 TID-orymt1k2g WARN: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:285:in `[]='
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:285:in `challenge'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:136:in `block (2 levels) in filter_response'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:133:in `each'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:133:in `block in filter_response'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:132:in `each'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient/auth.rb:132:in `filter_response'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:1100:in `block in do_get_block'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:1099:in `collect'
2014-03-08T01:01:34.567652+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:1099:in `do_get_block'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.2.195/lib/new_relic/agent/instrumentation/httpclient.rb:34:in `block in do_get_block_with_newrelic'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.2.195/lib/new_relic/agent/cross_app_tracing.rb:41:in `trace_http_request'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.2.195/lib/new_relic/agent/instrumentation/httpclient.rb:33:in `do_get_block_with_newrelic'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:887:in `block in do_request'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:981:in `protect_keep_alive_disconnected'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:886:in `do_request'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:774:in `request'
2014-03-08T01:01:34.567911+00:00 app[worker2.2]: /app/vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/lib/httpclient.rb:694:in `delete'
Activity
michaeldbarry commentedon Mar 17, 2014
I too get this error when accessing a basic auth http site numerous times
and for whatever reason the site requires reauth
jruby 1.7.9 (1.9.3p392) 2013-12-06 87b108a on OpenJDK 64-Bit Server VM 1.6.0_24-b24 [linux-amd64]
michaeldbarry commentedon Mar 17, 2014
So would the fix for this be changing
to
kwent commentedon Mar 18, 2014
Is this fix working ? Can we hope a pull request and a merge in master ?
nahi commentedon May 21, 2014
Sorry for late response. I want to fix this issue for the next release.
Is this like threading issue? @challengeable is the object that causes the exception and here's the only location iterating @challengeable: https://github.com/nahi/httpclient/blob/master/lib/httpclient/auth.rb#L274
By another thread, I'm guessing...
Remove debugging stuff.
Make authentication drivers Thread-safe
Remove debugging stuff.
Update ruby-httpclient to 2.6.0.1