Cloudflare load balancer 521 error but my server is ok

Hi everyone,
i have set up a load balancer in order to have a failover solution, the health monitor that checks the servers returns that they are running fine, but there is an issues when i try to access it through the url.
when i type the url that i have configured in the load balancer it is presenting the 521 error.
i have searched online for a solution and i have tried to allow all the Cloudflare ip’s in the NGINX.
and it still doesn’t work
any ideas?

by the way, it worked for me on aws route 53, that it why it is wierd

Most common reason ist that Cloudflare IPs are blocked or HTTPS is not alowed / configured.

Did you walk through this tips?

1 Like

Hey ,
I have walked through the steps, I allowed everything in the configuration of my application so that there won’t be any doubt.

Do I have to enable HTTPS ? Or it can be with HTTP also ?

I can send you the configuration that I am using.

No, HTTPS is not necessary. But you should use it.

Any firewall in place? Hardware, or software like iptables or Windows Firewall? Double you use Railgun?

there is no firewall, i use NGINX as a reverse proxy and everything is allowed through it.
any ideas?

I am also having the same issue after going through walkthrough and tips

i managed to fix it, if you want i can try to help you

Well then: Please let us know. :slight_smile:
This would also help others

1 Like

so, i have looked again at the http and https point that you have pointed out.
i have found out that when i use the balancer is routing traffic through Cloudflare then it uses HTTPS, but my server is not with ssl enabled for now.
what i have done is i disabled the traffic through Cloudflare and it magically worked. (because it is not longer https).

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