Error 1033 Cloudflare
from cutebc24@piefed.social to selfhosted@lemmy.world on 07 Jul 10:55
https://piefed.social/post/1015458
from cutebc24@piefed.social to selfhosted@lemmy.world on 07 Jul 10:55
https://piefed.social/post/1015458
I don’t know what to do, I’m experimenting with creating a Lemmy instance. it’s listening on port 8536 but cloudflare won’t respond and connect and while i connected the tunnel to the instance, i can’t figure out the error or how to make it connect to the server.
“Failed to connect to localhost port 8536 after 0 ms: Couldn’t connect to server”
threaded - newest
Hey bro. I’m just a FNG here, but I’ve found that the more detail you can give, the better the results (answers) will be. However, two sentences about a Cloudfare error is probably not going to garner much interest. People here I’ve found, are willing to help, but they can’t guess what it is you’re talking about.
Kind Regards
Can you access it without Cloudflare?
Does
curl http://localhost:8536/
work?You are using cloudflared right? Because normal (non-cloudflared) Cloudflare doesn’t support port 8536.
Cloudflared, yes. "curl: (7) Failed to connect to localhost port 8536 after 0 ms: Couldn't connect to server"
What’s the URL you using to access it without Cloudflare?
Edit: Also that curl tells me it’s not listening on that IP/port.
Odd, thanks! akaris.space
How are you accessing it without Cloudflare? How do you know that Lemmy is actually listening?
To add: (I’m just going down the checklist here developers.cloudflare.com/…/connect-networks/)
Here’s the troubleshooting page
…cloudflare.com/…/troubleshoot-tunnels/
Have you gotten to the authentication step?
What do the logs say?
developers.cloudflare.com/…/diag-logs/
Wait, failure to connect to local host? That’s your own computer, whatever endpoint isn’t going through cloud flare. Most apps respond to ports 80/443. You need to either route those to your computer, or in docker route whatever port you want it on to your app. If you have just one app/website, you can do 80/443 universally to the app. If you have more than one, route them to a reverse proxy that can take a domain or sub-domain name and route them to the ports your apps are on.
But yeah, you really need to provide more info.
What’s your environment? What’s your config, setup, etc?
I used Cloudflare tunnels and YunoHost. It won’t connect and it won’t listen to any port
Yeah, YunoHost explains why
http://localhost:8536/
wouldn’t be working. If cloudflared and Lemmy are in separate containers you have to put an actual IP in, since localhost points to the container itself.You’re running these commands on the same machine as yunohost, right, not from another computer?
Correct, same computer
Cloudflare and yunohost user here. Need to install the cloudflared service and make sure it runs and the tunnel connects in the zero trust dashboard. Will say healthy when it does. Try a lower port number, something in the 2000-3000 range is good to test. Then in the correct tunnel once it is showing healthy you need to add a public hostname (for ease of use). Say lemmy.mydomain.com, use https then localhost:portnumber/ Then in additional settings you have to turn on notlsverify else it won’t work. That should get it working. To be honest I’ve not bothered setting up various ports other than the defaults so you shouldn’t need to set up the port so just try https and localhost and that should do the trick - this could be where you are going wrong as yunohost doesn’t explicity need the port setting in most common configurations. Then in the yunohost admin area you can go into applications and open the app and it should work. Any probs give us a shout
Cloudflare won’t connect to a port number that high. Drop it down to say 2536 and you will be fine
Failure to connect, still. Odd.
I presume they mean pointing their cloudflare tunnel to direct lemmy.example.com to localhost/:[port], and I don’t think there’s any special rules about that port from cloudflares site.
I use tunnels and ports in about that range for all my sites, and don’t have any problems.
It depends… the OP is also using yunohost which can and does have some issues with higher port numbers, plus you also have to factor in if he is self hosting as I suspect, some routers also won’t properly forward higher port numbers either. Difficult to say but lowering the port number is one thing to try. Too many variables to really drill down and say what is happening
Yeah, I feel like we’re missing some info here.
I have to admit that I have no experience with yuno. Always seemed interesting, but not like something that fits into my work flow.
If they’re self-hosting at home (which I’m also doing for some services), I’d presume they’re probably running their stuff on a single machine, so I’m not sure where their router would come Into it. The data the cloudflare tunnel process receives should look the same to the router no matter the port it is ultimately sent to, and when it is sent to an address internal to the machine, shouldn’t pass through the router again.
It should, and yes I used to think that. I’m in the UK and some routers just fail to work properly with higher port numbers, especially cheap routers from cheaper providers. Once you start getting above 8000 the traffic is limited thus me saying try a lower port number. Plus yunohost doesn’t really ask for a port number as you should add a domain first, then install the application (it uses docker btw) on that domain, then cloudflare to the domain. So the port number isn’t required. I’m guessing, but can’t be sure, that this is the real issue. yunohost adds a self signed cert and configures the firewall etc. so if you don’t do it right using a cloudflare tunnel it just doesn’t work. I’m guessing the OP hasn’t done it like this, and then it will never work - believe me I’ve tried. yunohost also adds fail2ban, firewall inside yunohost and various other ways to protect what is served
I’m gonna try just making it a local instance
Are you pointing cloudflare directly to Lemmy? I have mine going from cloudflare to Nginx Proxy Manager configured to serve Lemmy.
There is some additional configuration necessary for a reverse proxy in front of Lemmy, which is potentially where things are getting messed up for you?
Cloudflare tunnels support higher port numbers. I’ve done it in the past with Portainer. Also Proxmox which listens on 8006. Portainer on 9443.
I don’t doubt that, I’m saying this more because there are additional routes that i had to configure in NPM to get lemmy working properly. This may be where OP is having issues, you can probably set them up in CF too but I have no idea.
It does, but there are issues especially with proxy content. Way easier to listen on lower port numbers especially to debug
and… with yunohost in most setups there is no need to use port numbers, for various reasons