I use Cloudflare with Ezoic. In my server, I have allowlisted Cloudflare and Ezoic IPs (IPv4 and IPv6). When I enabled "Cloudflare proxy from the Ezoic, I receive “Cloudflare 522 connection time out.”
I use the up-to-date IP list which is listed here.
Initially, I thought this is my server issue, therefore yesterday I have moved one of my sites to a new VPS, but the problem was not fixed.
I face this issue when I use Sri Lankan ISP. If I switch to another country using a VPN, then this issue has gone away. I believe it happened when the visitor is connecting to the Cloudflare Colombo data center.
If I disabled Cloudflare and Ezoic and access to my sites, there is no error. Also if I edit Windows 10 host file and directly pointed to the site again no issue. Web pages are loading normally. When I visit the browser console there is no error. If I visit Cloudflare’s error log analysis, it doesn’t show much information.
For your reference, I have attached the Cloudflare Connection timeout error with RAY ID.
Cloudflare Ray ID: 673b68025a984cb5 • Your IP: 2402:4000:2280:7016:4cce:420b:d7a9:139b Date and time: 2021-07-24 07:24:03 UTC.
Yeah, these are the correct addresses, but how did you allowlist them?
It won’t be directly related to it but indirectly. Somewhere on your server (or its network) the IP address range of the Sri Lankan datacenter will be blocked. I am afraid that’s really something you can only clarify with your host as they know where such a block could be configured.
Just to elaborate, a 522 means Cloudflare could not establish a TCP connection, so that’s most likely not even something on the web server, but a restriction somewhere on the network level.
I started using Ezoic in March 2021 (I use Cloudflare since 2013). However, I’m experiencing this issue since July second week of 2021. Is there any way to check the Cloudflare error logs? Because in my server log, I cannot find any error log.
Yesterday I have set up a new VPS (only for testing purposes and later deleted it) without any firewall (basic setup) and tested it, again I face the same Cloudflare 522 error.
I have a Ubuntu VPS. On this server I installed CSF. In the CSF, I added Cloudflare and Ezoic IPs to csf.allow file. Then I added the same IPs in Nginx nginx.conf file http{ block.
Below is my nginx Cloudflare IP list file format. Since Ezoic has over 2,000 IP’s in here I did not paste everything. Just added few Ezoic IP’s for get an idea.
What would you like to check there? Cloudflare does not provide these logs and they’d also not say much more than what the 522 does. Somewhere on your network the TCP connection is blocked.
As I said earlier, that’s unlikely your web server. You’d rather need to check anything network related.
Is that on the same network as the original setup?
In that case - and assuming your new VPS did not have any default firewall settings (double check that) - that will be most likely either a network firewall (talk to your host about that) or some issue on their network where they possibly rate limit (and block) requests if they always come from the same network.
I am afraid that’s really something you can only clarify with your host.
You are accessing this forum via the CMB PoP as well and are not experiencing any issues, right?
At this point you could only open a support ticket and have Cloudflare look into it, but I somewhat doubt they will be able to tell more as the connection simply times out - and this is typically an issue on your server side, unless there is some obscure connection issue between your server and Cloudflare, but I can’t tell if support would have any more insight here, but you can try.
My guess is still there is a network issue on your provider side.
Well, in 99% of the cases this is server related. If you double checked everything and are absolutely sure there is nothing whatsoever blocking on your side, you really can only contact support I am afraid.
When I check the Chrome developer tools HAR file, I can see that 522 error as below. Is it normal or that error generate as a result of another issue (eg: large cookies etc)?
I am afraid you really need to rule out that this is an issue on your server side (which it will be in my opinion) and, if you can do so, then contact Cloudflare’s support.
As for now I’d almost bet money that this will be a traditional case of blocked Cloudflare addresses on your server side. For example, sitemeer.com/#https://carsreborn.com loads “fine”, although with a 500 as you’ll be probably blocking user agents.
One question, do you have any IPv6/AAAA records configured? If so, try removing them temporarily and check if that might fix it. Admittedly, I am rather guessing here, but your initial screenshot showed an IPv6 address and I wonder whether there could be an IPv6 connectivity issue.