Sporadic cURL error 6
-
We have started to get a lot of send errors (we’ll get several and then nothing for a day or two and then several again). The errors are:
Error executing wp_remote_post: cURL error 6: Could not resolve: http://www.googleapis.com (Could not contact DNS servers)
We were having the issue with old Postman SMTP and upgraded to this but we’re continuing to have the issue. The session transcript only says:
https:oauth2://www.googleapis.com:443
Any idea on how we can resolve this?
-
Are you hosted on a VPS?
I don’t think so, we’re using GoDaddy’s shared hosting.
I searched for godaddy wiki, mybe it will say something about your issue and I found this:
https://www.godaddy.com/community/Managing-Web-Hosting/SMTP-Connect-issue-on-server-open-port-465-to-be-connectivity-on/td-p/52859Godaddy is blocking custom smtp configurations.
Thanks! I had a long chat with GoDaddy. I’m not on managed hosting, I’m on cPanel hosting and they say they aren’t blocking the port on that. We’ve installed a script to track e-mail for a bit to see if we can see what is causing the failure. I’ll give it a little bit to start failing again and then let you know.
Okay, I found the error log on the server and pulled a bunch of the latest errors from it. Does this help at all?
[31-Oct-2017 21:46:25 UTC] ERROR PostmanUtils: cURL error 6: Could not resolve: http://www.googleapis.com (Could not contact DNS servers)
[31-Oct-2017 21:46:25 UTC] ERROR PostmanWpMail: Exception code=0 message=Error executing wp_remote_post: cURL error 6: Could not resolve: http://www.googleapis.com (Could not contact DNS servers)
[31-Oct-2017 21:46:26 UTC] ERROR PostmanUtils: cURL error 6: Could not resolve: http://www.googleapis.com (Could not contact DNS servers)
[31-Oct-2017 21:46:26 UTC] ERROR PostmanWpMail: Exception code=0 message=Error executing wp_remote_post: cURL error 6: Could not resolve: http://www.googleapis.com (Could not contact DNS servers)
[01-Nov-2017 19:45:27 UTC] ERROR PostmanWpMail: Exception code=0 message=Could not resolve: accounts.google.com (Could not contact DNS servers)Save this code as a php file in your website root, run it and
paste the result here:<?php $_h = curl_init(); curl_setopt($_h, CURLOPT_HEADER, 1); curl_setopt($_h, CURLOPT_RETURNTRANSFER, 1); curl_setopt($_h, CURLOPT_HTTPGET, 1); curl_setopt($_h, CURLOPT_URL, 'http://www.googleapis.com/' ); curl_setopt($_h, CURLOPT_DNS_USE_GLOBAL_CACHE, false ); curl_setopt($_h, CURLOPT_DNS_CACHE_TIMEOUT, 2 ); var_dump(curl_exec($_h)); var_dump(curl_getinfo($_h)); var_dump(curl_error($_h));Sure thing!
string(436) “HTTP/1.1 404 Not Found Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Expires: Mon, 01 Jan 1990 00:00:00 GMT Date: Thu, 02 Nov 2017 16:49:15 GMT Vary: X-Origin Content-Type: text/html; charset=UTF-8 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Accept-Ranges: none Vary: Origin,Accept-Encoding Transfer-Encoding: chunked Not Found” array(26) { [“url”]=> string(26) “http://www.googleapis.com/” [“content_type”]=> string(24) “text/html; charset=UTF-8” [“http_code”]=> int(404) [“header_size”]=> int(427) [“request_size”]=> int(57) [“filetime”]=> int(-1) [“ssl_verify_result”]=> int(0) [“redirect_count”]=> int(0) [“total_time”]=> float(0.046082) [“namelookup_time”]=> float(0.000526) [“connect_time”]=> float(0.009714) [“pretransfer_time”]=> float(0.009796) [“size_upload”]=> float(0) [“size_download”]=> float(9) [“speed_download”]=> float(195) [“speed_upload”]=> float(0) [“download_content_length”]=> float(-1) [“upload_content_length”]=> float(-1) [“starttransfer_time”]=> float(0.046032) [“redirect_time”]=> float(0) [“redirect_url”]=> string(0) “” [“primary_ip”]=> string(13) “172.217.5.202” [“certinfo”]=> array(0) { } [“primary_port”]=> int(80) [“local_ip”]=> string(14) “184.168.200.27” [“local_port”]=> int(51289) } string(0) “”
just notice I didn’t ask the Diagnostic Test.
You can find it Post SMTP main page under Troubleshootingthank you for your patience
Here you go:
OS: Linux p3plcpnl026.prod.phx3.secureserver.net 2.6.32-673.26.1.lve1.4.30.el6.x86_64 #1 SMP Wed Jun 21 19:37:37 EDT 2017 x86_64
PHP: Linux 5.5.38 C
PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=No, allow_url_fopen=Yes, mcrypt=Yes, zlib_encode=Yes
WordPress: 4.8.3 en_US UTF-8
WordPress Theme: Respo Theme
WordPress Plugins: Gravity Forms, Akismet Anti-Spam, Authorize.net for WordPress, Gravity Forms Authorize.Net Add-On, Post SMTP, URL Params, Yoast SEO, WP Native Articles
WordPress wp_mail Filter(s): wp_staticize_emoji_for_email
Postman: 1.7.7
Postman Sender Domain (Envelope|Message): momsclub.org | momsclub.org
Postman Prevent Message Sender Override (Email|Name): No | No
Postman Active Transport: Gmail API (https:oauth2://www.googleapis.com:443)
Postman Active Transport Status (Ready|Connected): Yes | Yes
Postman Deliveries (Success|Fail): 32016 | 563
Postman Email Log (Enabled|Limit|Transcript Size): Yes | 500 | 128Godday hosting making my support twice harder,
so many problems there 🙂Last thing,
can you screenshot the output here:
Post SMTP main page under Troubleshooting –> Connectivity Test.Ugh… I know. It is so annoying that it’s so sporadic!!
But, I managed to catch it in a failed state. I ran the connectivity test twice – within a minute of each other.
First one:
https://www.dropbox.com/s/rhj8yr82lcbgv6d/Failed.jpg?dl=0Second one:
https://www.dropbox.com/s/opvfkh7mzpdikti/Success.jpg?dl=0I didn’t change anything between the tests, same WP instance, I literally just hit ‘Begin Test’ a second time.
Very sorry for the trouble.
Just curious: are you the owner of the site?
I will ask for unusual step, could try the installing this plugin:
https://ww.wp.xz.cn/plugins/wp-mail-bank/and tell me did it work with the same configuration you had with postman?
The topic ‘Sporadic cURL error 6’ is closed to new replies.