#5 new
Eric Musgrove

reCaptcha returning 'Host Is Down'

Reported by Eric Musgrove | August 8th, 2008 @ 02:16 PM

As described above, when using the reCaptcha plugin on Site A, I get an error returned:

Ambethia::ReCaptcha::ReCaptchaError (Host is down - connect(2)):

However, on Site B (both running locally) reCaptcha works. A bit more experiementing with Site A and I got it to work, by doing something rather....odd.

      system("ping -c 1 #{RECAPTCHA_VERIFY_SERVER}")
      recaptcha = Net::HTTP.post_form URI.parse("http://#{RECAPTCHA_VERIFY_SERVER}/verify"), {
        :privatekey => ENV['RECAPTCHA_PRIVATE_KEY'],
        :remoteip   => request.remote_ip,
        :challenge  => params[:recaptcha_challenge_field],
        :response   => params[:recaptcha_response_field]
      }

Yes, I put a single ping to the server before I posted the form. It was originally just a logger statement to see if my app could ping the server, however after it worked, I left it implemented.

Looking to see if perhaps we can figure out what's causing this oddity, and why the ping allows it to work.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A rails plugin that adds helpers for the ReCAPTCHA API.

People watching this ticket

Pages