Forum: Ruby on Rails Sudden Strange Webrick Error: Errno::ECONNABORTED

Posted by Josh Charles (Guest)
on 2006-02-10 03:14
(Received via mailing list)
Hello,

I've been developing an application (on Windows), and everything was
going pretty well, but I suddenly began getting this weird error back
from Webrick after submitting something through ajax, and only through
ajax.  I'm submitting a form through ajax, and it is being process
properly - with all the interaction with the database happening
without problem.  The response though, is this error:

Errno::ECONNABORTED
An established connection was aborted by the software in your host
machine. - connect(2)

Here is the controller method:

  def save_review
    review = Review.new(params[:review])
    @chapter = Chapter.find(params[:chapterid])
    @chapter.reviews << review
    review.story_id = @chapter.story_id
    if review.save
      ReviewAlerts.deliver_alert_author(@chapter.story.user,
@chapter.story, review)
      flash[:Ajax] = "Review Successfully Submited"
      render :partial => 'options'
    else
      flash[:Ajax] = "There was a problem with your review"
      render :partial => 'options'
    end
  end

Ajax methods that do not require database access execute just fine.
I'm using MySQL for the database server, but everything seems to be
working.  Forms not submitted through Ajax seem to work without a
problem, and every page has data from the database pulled from it.
They work as well.

A google search for "Errno::ECONNABORTED" did not turn up with
anything userful, which makes me wonder if someone spelled something
wrong in the somewhere, but I can't be sure.

Any help would be greatly appreciated.

Thanks,
Josh
Posted by Josh Charles (Guest)
on 2006-02-10 03:20
(Received via mailing list)
Please Disregard.  This was happening because I was not supressing
Action Mailer errors.

On 2/9/06, Josh Charles <josh.charles@gmail.com> wrote:
> Errno::ECONNABORTED
> An established connection was aborted by the software in your host
> machine. - connect(2)

<snip>
Posted by Liya Zhang (liya)
on 2007-11-06 07:07
Attachment: bug_in_IDTWeb.txt (2,45 KB)
Josh Charles wrote:
> Please Disregard.  This was happening because I was not supressing
> Action Mailer errors.
> 
> On 2/9/06, Josh Charles <josh.charles@gmail.com> wrote:
>> Errno::ECONNABORTED
>> An established connection was aborted by the software in your host
>> machine. - connect(2)
> 
> <snip>

Hello,

I also found the same error, and don't know why. I delete one file, but 
the error occurs, and then the deletion of the file will fail.
Here is the log:
http://localhost:3000/idt_web/delete_test_vector/I... 
-> /idt_web/set_test_vector
[2007-11-06 13:32:08] ERROR Errno::ECONNABORTED: An established 
connection was aborted by the software in your host machine.
        C:/Program 
Files/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `write'
        C:/Program 
Files/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `<<'
        C:/Program 
Files/ruby/lib/ruby/1.8/webrick/httpresponse.rb:324:in `_write_data'
        C:/Program 
Files/ruby/lib/ruby/1.8/webrick/httpresponse.rb:296:in 
`send_body_string'
        C:/Program 
Files/ruby/lib/ruby/1.8/webrick/httpresponse.rb:187:in `send_body'
        C:/Program 
Files/ruby/lib/ruby/1.8/webrick/httpresponse.rb:104:in `send_response'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/httpserver.rb:79:in 
`run'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:173:in 
`start_thread'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:162:in 
`start'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:162:in 
`start_thread'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:95:in 
`start'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:92:in 
`each'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:92:in 
`start'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:23:in 
`start'
        C:/Program Files/ruby/lib/ruby/1.8/webrick/server.rb:82:in 
`start'
        C:/Program 
Files/ruby/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:67:in 
`dispatch'
        C:/Program 
Files/ruby/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/servers/webrick.rb:59
        C:/Program 
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
`gem_original_require'
        C:/Program 
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
`require'
        C:/Program 
Files/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in 
`require'
        C:/Program 
Files/ruby/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/server.rb:30
        C:/Program 
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
`gem_original_require'
        C:/Program 
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
`require'
        C:/Program 
Files/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in 
`require'
        script/server:3
I don't know what is the wrong. Any reply will be greatly appreciated.
Thank you in advance!

Liya
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.