• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 ReCAPTCHA (No CAPTCHA) connection error

vbuser

Active member
#1
This error is occurring more often but not always.

Code:
Erro Info
Zend_Http_Client_Adapter_Exception: ReCAPTCHA (No CAPTCHA) connection error: Unable to Connect to ssl://www.google.com:443. Error #101: Network is unreachable - library/Zend/Http/Client/Adapter/Socket.php:235
Generated By: Unknown Account, Today at 1:24 AM

Stack Trace
#0 /home/*********/public_html/forum/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('www.google.com', 443, true)
#1 /home/*********/public_html/forum/library/XenForo/Captcha/NoCaptcha.php(76): Zend_Http_Client->request()
#2 /home/*********/public_html/forum/library/XenForo/Captcha/Abstract.php(129): XenForo_Captcha_NoCaptcha->isValid(Array)
#3 /home/*********/public_html/forum/library/XenForo/ControllerPublic/Register.php(355): XenForo_Captcha_Abstract::validateDefault(Object(XenForo_Input))
#4 /home/*********/public_html/forum/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Register->actionRegister()
#5 /home/*********/public_html/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/*********/public_html/forum/index.php(13): XenForo_FrontController->run()
#7 {main}

Request State
array(3) {
  ["url"] => string(60) "http://*****.com/forum/index.php?register/register"
  ["_GET"] => array(1) {
  ["register/register"] => string(0) ""
  }
  ["_POST"] => array(17) {
  ["username"] => string(7) "RomanKl"
  ["9b87d0b29a1599d61ef3b8c8b6e1693d"] => string(7) "RomanKl"
  ["6f3aa8f86c35f7472d87adfcea25c716"] => string(18) "williamfek@mail.ru"
  ["password"] => string(8) "********"
  ["7a4b67c63dc0164a89acaeaf932b7df4"] => string(0) ""
  ["dob_month"] => string(2) "10"
  ["dob_day"] => string(2) "10"
  ["dob_year"] => string(4) "1986"
  ["location"] => string(45) "интернет ставки на спорт"
  ["*********"] => string(16) "Asia/Novosibirsk"
  ["g-recaptcha-response"] => string(17) "sbrill temptation"
  ["agree"] => string(1) "1"
  ["submit"] => string(7) "Sign up"
  ["_xfToken"] => string(8) "********"
  ["reg_key"] => string(32) "*******("
  ["recaptcha_challenge_field"] => string(228) "********"
  ["recaptcha_response_field"] => string(17) "sbrill temptation"
  }
}
 

Mike

XenForo developer
Staff member
#2
That would be an issue with your network stack and outgoing connections. If it's happening with any regularity, you may want to contact your host regarding it.
 

vbuser

Active member
#3
I've contacted my host provider and they replied with this:
Then again, based on the information I do have, it almost appears that this is intended. The (re)Captcha Google deploys these days uses a click-based mechanism to identify human users, only falling back to text input as a last resort. It may be possible that you are seeing this logged attempts simply because the spam bots are indeed failing to validate the captcha.
 

Chris D

XenForo developer
Staff member
#4
I would disagree with their understanding of how this works here.

The point in which this is erroring is way after the captcha itself has been completed by the user. Once the captcha is completed by the user, a response is sent back to the client; this part doesn't touch your own server. It's only when the form (e.g. the registration form) is submitted that the response is verified. It's this verification that is failing as described by Mike. The error suggests the request to verify the captcha isn't even reaching Google.
 

vbuser

Active member
#5
My provider said the could not replicate the error. Neither could I.
Where exactly are these errors being logged, and are they actually preventing legitimate users from signing up? Is there a way to replicate the problem, or does it happen sporadically and only with spambots?

I am able to hit google.com over 443 (HTTPS) via both PHP streams and cURL requests:
Code:
php -r "if(stream_socket_client('ssl://www.google.com:443')) echo 'SSL OK';" SSL OK >> curl -I https://google.com:443 HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Sun, 06 Dec 2015 01:17:29 GMT Expires: Tue, 05 Jan 2016 01:17:29 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alternate-Protocol: 443:quic,p=0 Alt-Svc: clear
As I cannot replicate the issue from the server-level, I would have to imagine the problem lies somewhere within the application, or at the very least, an unexpected response from the Google server.
 

Chris D

XenForo developer
Staff member
#6
If the issue is no longer happening, and can no longer be replicated, then it confirms our suspicion that it was a temporary or at least an intermittent issue. Ideally your hosts would need to be attempting to debug the issue when it is actually erroring.