Nothing is listening — this is a server or startup problem, not your install
Connection refused means nothing is bound to that port; HTTP 522 is Cloudflare reporting that the origin server did not answer. Either way the failure is on the far side. Reinstalling the client, switching networks or disabling your firewall cannot fix a service that is down or never finished starting.
For a public service, check its status page before touching anything locally. For your own process, it started but its service layer never came up — read the startup log from the beginning and find the first failure, not the last line.