Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Cloudflare tunnel) Cannot connect to the socket server #1586

Closed
2 tasks done
freitasm opened this issue Apr 29, 2022 · 11 comments
Closed
2 tasks done

(Cloudflare tunnel) Cannot connect to the socket server #1586

freitasm opened this issue Apr 29, 2022 · 11 comments

Comments

@freitasm
Copy link

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Hi folks

Installed the image, running ok on [LAN IP]:3001. Continued to create a Cloudflare tunnel and all good, with the tunnel up.

Using Entry Page set to Dashboard the [subdomain].[domain].[tld] brings up an error "Cannot connect to the socket server. [Error: websocket error] Reconnecting..."

If I change Entry Page to "Status Page" then the status page loads fine.

Any ideas?

🐻 Uptime-Kuma Version

1.15.0

💻 Operating System and Arch

Synology docker

🌐 Browser

Microsoft Edge 100, Google Chrome 101

🐋 Docker Version

20.10.3-1305

🟩 NodeJS Version

No response

@freitasm freitasm added the help label Apr 29, 2022
@louislam
Copy link
Owner

Not sure whether it is related, but worth to try.

image

@freitasm
Copy link
Author

freitasm commented Apr 29, 2022

Thanks, but likely not related. I already had this enabled for a year now as I use https://www.myrtille.io/ and it relies on sockets.

@AlisaAkiron
Copy link

Cloudflare Tunnel does not support WebSocket :/
But maybe you can try this: https://community.cloudflare.com/t/tunnel-with-websockets/318111

@freitasm
Copy link
Author

Thanks. That's interesting, seeing cloudflared/tunnel is explicitly supported and recommended in the documentation.

I will check post and work on the configuration.

Cheers

@louislam
Copy link
Owner

Cloudflare Tunnel does not support WebSocket :/ But maybe you can try this: https://community.cloudflare.com/t/tunnel-with-websockets/318111

As I am currently using Cloudflare tunnel, I can confirm it is working with WebSocket.

@freitasm
Copy link
Author

freitasm commented Apr 29, 2022

Interesting. I can see the requests coming through Cloudflare firewall and being allowed. so there must be something else.

image

@AlisaAkiron
Copy link

OK, I have got it to work.
It seems like my WAF rules (Managed Challenge to any HTTP/1.x requests) have sent a Managed Challenge to the WebSocket request which it could not complete.

Just set up a WAF rule to let this request pass and you're ready to go.

image

@freitasm
Copy link
Author

Still doesn't work for me. I have created a rule at the very top. It allows traffic through but still getting the error:

image

image

@louislam
Copy link
Owner

May need to check the response with Chrome DevTools

image

@github-actions
Copy link

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 22, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 2 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants