Curl Error in Cloudflare plugin

Hi,

We have install cloudflare plugin few month back. Today I tried opening cloudflare setting in wp-admin. Getting an error

curl error 6: could not resolve host api.cloudflare.com

I tried disabling and enabling plugin but no success.

Cloudflare plugin working perfectly fine on other subdomain.

[24-Feb-2021 16:58:52 UTC] [Cloudflare] ERROR: [CLIENT API] Array
(
    [type] => request
    [path] => https://api.cloudflare.com/client/v4/zones/?name=www.example.com
    [timeout] => 30
    [method] => GET
    [headers] => Array
        (
            [Content-Type] => application/json
            [X-Auth-Email] => <my user id>
            [X-Auth-Key] => <my api key>
        )

)
 
[24-Feb-2021 16:58:52 UTC] [Cloudflare] ERROR: [CLIENT API] Array
(
    [type] => response
    [reason] => cURL error 6: Could not resolve host: api.cloudflare.com
    [code] => http_request_failed
    [body] => cURL error 6: Could not resolve host: api.cloudflare.com
)
 
[24-Feb-2021 16:58:52 UTC] [Cloudflare] ERROR: cURL error 6: Could not resolve host: api.cloudflare.com

from server

$ ping api.cloudflare.com

PING api.cloudflare.com (104.19.192.29) 56(84) bytes of data.

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=1 ttl=54 time=16.3 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=2 ttl=54 time=16.4 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=3 ttl=54 time=16.4 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=4 ttl=54 time=16.4 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=5 ttl=54 time=16.3 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=6 ttl=54 time=16.0 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=7 ttl=54 time=16.4 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=8 ttl=54 time=16.4 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=9 ttl=54 time=16.4 ms

64 bytes from 104.19.192.29 (104.19.192.29): icmp_seq=10 ttl=54 time=16.4 ms

When CURL fails, why do you try to PING?
Please run on the same server the CURL command to api.cloudflare.com otherways this test is useless.
Also as CloudFlare is up and running (checked just right now) this problem must be on your side, not on CloudFlares.

Reffering to:

&

&

2 Likes

disabling ipv6 solved the issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.