Got error: ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your

Hi

I want to use ruby webrick but in my application I got following error:

[2011-09-27 19:29:31] ERROR Errno::ECONNABORTED: An established
connection was a
borted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:327:in write' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:327:in<<’
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:327:in
_write_data' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:296:insend_body_string’
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:187:in
send_body' C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:104:insend_response’

    C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:86:in `run'
    C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in

start_thread’

I do google but cant get any solution. Please give me solution of this
problem.

Regards,
Mohit Bansal
[email protected]

On Tue, Sep 27, 2011 at 9:05 AM, mohit b. [email protected]
wrote:

Hi

I want to use ruby webrick but in my application I got following error:

[2011-09-27 19:29:31] ERROR Errno::ECONNABORTED: An established
connection was a
borted by the software in your host machine.

This almost sounds like a firewall issue.
Do you have a firewall running and if so, what do the logs say?

Andrew McElroy.

On Tue, Sep 27, 2011 at 9:11 AM, andrew mcelroy [email protected]
wrote:

Do you have a firewall running and if so, what do the logs say?
Were you doing something with action mailer when this occurred?
Here is another thread that has that same error.
Sudden Strange Webrick Error: Errno::ECONNABORTED - Rails - Ruby-Forum

It turned out to be action mailer.

Andrew McElroy

Hi,

I am new to Ruby. I am trying to ssh remote server using the following
code:
require ‘net/ssh’
require ‘logger’

Net::SSH.start(
‘host’, ‘user’,
:keys => [ “Path of key .pem file” ],

) do |session|
# $result=session.exec!(“hostname -i”)
# puts $result
puts session

end

when I try printing session as output, I am able to get the session id.
But, when I try passing a command,
“An established connection was aborted by the software in your host
machine. - recvfrom” error is thrown.
Can someone help me to solve this issue.

mohit b. wrote in post #1023953:

Hi

I want to use ruby webrick but in my application I got following error:

[2011-09-27 19:29:31] ERROR Errno::ECONNABORTED: An established
connection was a
borted by the software in your host machine.
C:/Ruby192/lib/ruby/1.9.1/webrick/httpresponse.rb:327:in `write’

After doing traitment for generate a response, your server detect that
your client connection is close :

  • response is too slow, client has go away (timeout or user action)
  • the net route is break when sending data on the socket :
    firewall issue, router rules, nat issues …