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

Realtime Not Working #94

Open
ConProgramming opened this issue May 5, 2024 · 12 comments
Open

Realtime Not Working #94

ConProgramming opened this issue May 5, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@ConProgramming
Copy link

The default realtime deployment isn't working. All other services are working fine, except realtime where I'm getting errors like the following:

Screenshot 2024-05-05 at 2 27 06 PM

Do I have to do any extra configuration for realtime? Would love to have a fix here asap.

@ConProgramming ConProgramming added the bug Something isn't working label May 5, 2024
@ConProgramming
Copy link
Author

It seems it's trying but failing to connect to itself? The unable to connect to is its own IP.

@ethanstan
Copy link

Also having issues with this

@ConProgramming
Copy link
Author

Screenshot 2024-05-05 at 3 17 03 PM

My database doesn't have a _realtime schema, only a realtime schema, and it has this. Nowhere in my database is tables for broadcasts / channels / presences / subscription, like how supabase.com has.

@dubscode
Copy link

dubscode commented May 6, 2024

I am dealing with this too. In the tenants table I found that my tenant was called realtime-dev-tenant, and the code was looking for realtime-dev

I updated this code in supabase-stack
image

And now I am getting a signature error in the logs, so maybe a step in the right direction:
image

Still debugging but thought I'd share in case it helps someone sort this out. Thanks

@ConProgramming
Copy link
Author

I am dealing with this too. In the tenants table I found that my tenant was called realtime-dev-tenant, and the code was looking for realtime-dev

I updated this code in supabase-stack image

And now I am getting a signature error in the logs, so maybe a step in the right direction: image

Still debugging but thought I'd share in case it helps someone sort this out. Thanks

If you clear out the requirements schema, then update the version of realtime in the stack to the latest image: ecs.ContainerImage.fromRegistry('public.ecr.aws/supabase/realtime:v2.28.34'), and redeploy, it'll correctly insert as realtime-dev instead of realtime-dev-tenant

@ConProgramming
Copy link
Author

Hey @mats16 would love some help here 🙏❤️

@ConProgramming
Copy link
Author

Update: The self host docker seems to have the same problem by default. Weirdly, the cli docker works fine. Looking into this.

@ConProgramming
Copy link
Author

Now, the websocket for realtime fails with a 426 response. For example, using websocat

websocat "ws://MYPUBLICIP/realtime/v1/websocket?apikey=XYZ&vsn=1.0.0" 
websocat: WebSocketError: WebSocketError: Received unexpected status code (426 Upgrade Required)
websocat: error running

And kong logs at the same time

"GET /realtime/v1/websocket?apikey=XYZ&vsn=1.0.0 HTTP/1.0" 426 0 "-" "-" kong_request_id: "XYZ"

Using websocat on a project on supabase.com, it connects correctly.

@ConProgramming
Copy link
Author

Screenshot 2024-05-08 at 9 37 50 AM Am also now getting these logs in my realtime

@dubscode How goes over there? Did healthcheck improve your issue?

@dubscode
Copy link

dubscode commented May 8, 2024

Hi @ConProgramming I paused trying to troubleshoot on this repo and started to take a stab at setting this up using SST. I use SST a lot and have setup RDS quite a few times using it and CDK, but have not utilized the Service construct before for container images, so learning as I go, but pretty confident it can work out. I have an extremely "Work in Progress" shell setup here if you wanted: https://github.com/dubscode/supabase-sst Feel free to use it if you want. I'll contribute on it as I can

@ConProgramming
Copy link
Author

Now, the websocket for realtime fails with a 426 response. For example, using websocat

websocat "ws://MYPUBLICIP/realtime/v1/websocket?apikey=XYZ&vsn=1.0.0" 
websocat: WebSocketError: WebSocketError: Received unexpected status code (426 Upgrade Required)
websocat: error running

And kong logs at the same time

"GET /realtime/v1/websocket?apikey=XYZ&vsn=1.0.0 HTTP/1.0" 426 0 "-" "-" kong_request_id: "XYZ"

Using websocat on a project on supabase.com, it connects correctly.

This 426 was from a Nginx bastion in front of Kong blocking websocket headers. Wish realtime would've had better logs for this, but after I fixed Nginx this is up and running. Now it's just a matter of merging #95

@deadki0001
Copy link

@ConProgramming Hope you doing well mate, was there any official resolution to this? I tried to follow the JSON for the health check on another issue you posed in but it seems like the issue still persists? been battling it for a full day now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants