httpclient icon indicating copy to clipboard operation
httpclient copied to clipboard

HTTPClient::KeepAliveDisconnected

Open tommybernaciak opened this issue 7 years ago • 5 comments

Hi, I am getting this error, I think this is gem issue.

HTTPClient::KeepAliveDisconnected: HTTPClient::KeepAliveDisconnected: Connection reset by peer

stacktrace:

/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient/session.rb:900:in `rescue in block in parse_header'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient/session.rb:891:in `block in parse_header'
/opt/rubies/2.1.5/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
/opt/rubies/2.1.5/lib/ruby/2.1.0/timeout.rb:101:in `call'
/opt/rubies/2.1.5/lib/ruby/2.1.0/timeout.rb:101:in `timeout'
/opt/rubies/2.1.5/lib/ruby/2.1.0/timeout.rb:127:in `timeout'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient/session.rb:888:in `parse_header'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient/session.rb:871:in `read_header'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient/session.rb:678:in `get_header'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:1215:in `do_get_header'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:1164:in `do_get_block'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:962:in `block in do_request'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:1064:in `rescue in protect_keep_alive_disconnected'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:1058:in `protect_keep_alive_disconnected'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:961:in `do_request'
/vendor/bundle/ruby/2.1.0/gems/httpclient-2.5.3.3/lib/httpclient.rb:823:in `request'

Please could you take a look or tell me how to fix this?

tommybernaciak avatar May 29 '18 13:05 tommybernaciak

Try updating httpclient to version 2.8.3 and see if you still get these errors.

shivanshgaur avatar Jul 22 '18 07:07 shivanshgaur

I have that and still see errors too

1
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb" line 808 in block in parse_header
2
File "/usr/lib/ruby/2.4.0/timeout.rb" line 93 in block in timeout
3
File "/usr/lib/ruby/2.4.0/timeout.rb" line 103 in timeout
4
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb" line 801 in parse_header
5
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb" line 784 in read_header
6
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb" line 561 in get_header
7
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 1299 in do_get_header
8
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 1245 in do_get_block
9
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 1019 in block in do_request
10
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 1138 in rescue in protect_keep_alive_disconnected
11
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 1131 in protect_keep_alive_disconnected
12
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 1014 in do_request
13
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 856 in request
14
File "/opt/outreach/shared/bundle/ruby/2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb" line 765 in post

epinault avatar Nov 16 '18 18:11 epinault

is there a way to turn it off?

epinault avatar Nov 16 '18 18:11 epinault

Did anyone fix this issue? I'm facing the same issue on version 2.8.3

Rack app error handling request { PATCH .......}
#<HTTPClient::KeepAliveDisconnected: HTTPClient::KeepAliveDisconnected: >
/usr/local/bundle/gems/httpclient-2.8.3/lib/httpclient/session.rb:808:in `block in parse_header'
/usr/local/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
/usr/local/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
/usr/local/bundle/gems/httpclient-2.8.3/lib/httpclient/session.rb:801:in `parse_header'
/usr/local/bundle/gems/httpclient-2.8.3/lib/httpclient/session.rb:784:in `read_header'

ibtehajnasar avatar Sep 20 '22 13:09 ibtehajnasar

@ibtehaj-dnt are you using httpclient in a background job of some kind?

jpriollaud avatar Jul 24 '23 13:07 jpriollaud