XF 1.3 Unable to Connect to tcp://www.gravatar.com:80. Error #0: php_network_getaddresses: getaddrinfo fail

NeoCHI

Active member
I'm getting tons of these server errors! About 1-3 a minute...

Error Info:
Code:
Zend_Http_Client_Adapter_Exception: Unable to Connect to tcp://www.gravatar.com:80. Error #0: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution - library/Zend/Http/Client/Adapter/Socket.php:235

Stack Trace:
Code:
#0 /home/neochi/public_html/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('www.gravatar.co...', 80, false)
#1 /home/neochi/public_html/library/XenForo/Model/Avatar.php(457): Zend_Http_Client->request('HEAD')
#2 /home/neochi/public_html/library/XenForo/ControllerPublic/Register.php(219): XenForo_Model_Avatar::gravatarExists('juna_kyuubi@yah...')
#3 /home/neochi/public_html/library/Tac/FoolBotHoneyPot/ControllerPublic/Register.php(751): XenForo_ControllerPublic_Register->actionRegister()
#4 /home/neochi/public_html/library/XenForo/FrontController.php(347): Tac_FoolBotHoneyPot_ControllerPublic_Register->actionRegister()
#5 /home/neochi/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/neochi/public_html/index.php(13): XenForo_FrontController->run()
#7 {main}

Request State:
Code:
array(3) {
["url"] => string(40) "http://mydomain.com/register/register"
["_GET"] => array(0) {
}
["_POST"] => array(39) {
["username"] => string(6) "junavy"
["b96a853f739ae602e5"] => string(6) "junavy"
["1bee853f739ae60d01"] => string(0) ""
["15abd53f739ae602b0"] => string(0) ""
["e013053f739ae60bb6"] => string(0) ""
["675bc53f739ae6099d"] => string(0) ""
["67dba53f739ae60d6d"] => string(0) ""
["daa5053f739ae60aaa"] => string(0) ""
["email"] => string(23) "juna_kyuubi@yahoo.co.id"
["589ef53f739ae6074e"] => string(23) "juna_kyuubi@yahoo.co.id"
["e1dd353f739ae60060"] => string(0) ""
["d00a453f739ae60932"] => string(0) ""
["669bc53f739ae60968"] => string(9) "chibi1981"
["1548353f739ae60a74"] => string(9) "chibi1981"
["bc07753f739ae6085b"] => string(0) ""
["99bde53f739ae60b15"] => string(0) ""
["password"] => string(8) "********"
["password_confirm"] => string(8) "********"
["cdbb053f739ae60dd8"] => string(0) ""
["1f2fc53f739ae60c8e"] => string(0) ""
["dob_month"] => int(6)
["dob_day"] => int(1)
["dob_year"] => int(1981)
["6b4ae53f739ae60642"] => string(0) ""
["1c82253f739ae5ff89"] => string(0) ""
["880d753f739ae60c57"] => string(4) "male"
["55eaa53f739ae60ae0"] => string(0) ""
["gender"] => string(4) "male"
["custom_fields"] => array(1) {
[1] => string(0) ""
}
["custom_fields_shown"] => array(1) {
[0] => string(1) "1"
}
["4cea053f739ae6031b"] => string(12) "Asia/Bangkok"
["timezone"] => string(12) "Asia/Bangkok"
["463f153f739ae60891"] => string(14) "Pacific/Midway"
["4b0f653f739ae60bec"] => string(14) "Pacific/Midway"
["84e1553f739ae60386"] => string(14) "Pacific/Midway"
["hash"] => string(161) "4a254aea821be3244d7179d5c23e5a31|b5d44d462d7f1445ff1636fe84d3d940|http://back10.keycaptcha.com/swfs/ckc/ca2e8549973d7cb260f0fa5b654dda7a-|53f739ae755ee-.2.1.25|1"
["agree"] => string(1) "1"
["_xfToken"] => string(8) "********"
["reg_key"] => string(32) "8a7bf1f1b6663d720bb56733c99d72b9"
}
}

Delete...Close

It looks like my Tac_FoolBotHoneyPot addon is causing this issue, but why all of a sudden? It wasn't doing this before.
 
This could just indicate a temporary issue with Gravatar and your server's connection to it. If it's on their end, you don't need to do anything. Alternatively, it could indicate that there's a firewall blocking outgoing connections and you would need to resolve that on your end (or disable it).
 
This could just indicate a temporary issue with Gravatar and your server's connection to it. If it's on their end, you don't need to do anything. Alternatively, it could indicate that there's a firewall blocking outgoing connections and you would need to resolve that on your end (or disable it).

I'm asking my hosting service to investigate but they want to know where the server error logs are coming from since they can't access my xenforo's admincp.
 
Well, looking at the error in more detail, it looks like a DNS issue ("Temporary failure in name resolution"). They can probably reproduce it with something like ping or cURL.
 
Well, looking at the error in more detail, it looks like a DNS issue ("Temporary failure in name resolution"). They can probably reproduce it with something like ping or cURL.

My hosting company replied with:

I am able to establish a connection to 'gravatar.com' over port 80 from your VPS:

--
# telnet gravatar.com 80
Trying 192.0.80.242...
Connected to gravatar.com.
Escape character is '^]'.
^]
telnet> close
Connection closed.
--

It doesn't appear that the firewall is causing any connectivity issues to the remote host.

I've checked the lfd log and there hasn't been any recent blocks to this remote domain/ip.

I've changed /etc/resolv.conf to google DNS:

--
# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
--

If your server was have temporary issues resolving the remote host, this should correct that problem.

It seems like my server can connect to gravatar:80 but then what else can be causing this issue?
 
It seems like my server can connect to gravatar:80 but then what else can be causing this issue?
When you are getting that error during the registration is when it needs to checked from SSH to see if the DNS is resolving properly. If it is an intermittent problem then just logging in and checking it wont' do that much good if it's not having a problem at that time.

That's why it shows a TEMPORARY failure in name resolution. It's not typically something that is wrong with XenForo but something that is wrong with the network backbone of your hosting provider not being able to resolve the address.

This is one of the reasons I've started turning Gravatar off on my sites.
 
When you are getting that error during the registration is when it needs to checked from SSH to see if the DNS is resolving properly. If it is an intermittent problem then just logging in and checking it wont' do that much good if it's not having a problem at that time.

That's why it shows a TEMPORARY failure in name resolution. It's not typically something that is wrong with XenForo but something that is wrong with the network backbone of your hosting provider not being able to resolve the address.

This is one of the reasons I've started turning Gravatar off on my sites.

Huh...totally forgot I can just disable Gravatar....done.
 
Top Bottom