So the intended routing is traefik -> realtime
, and not traefik -> appwrite_appwrite -> realtime
?
@Steven Thanks for your help -- not sure how to fix this yet but that helped me narrow things down a lot ๐
I am noticing that the realtime isn't in any of the docker networks when I inspect them. I would think it should be in the Containers when inspecting the appwrite_appwrite
network. The realtime service does have the appwrite network in the docker-compose.yml.
So my theory right now is that traefik is forwarding the requests to the appwrite service instead of the realtime service because it doesn't have the realtime service in it's networks, dispite the docker_compose.yml having the traefik prefix /v1/realtime
setup (so it defaults back to the appwrite traefik prefix /
because that does still match).
Now to see if I can figure out why realtime isn't in the appwrite network even though I've specified it should be in the docker_compose.yml.
The realtime service is already attached to the appwrite_appwrite network already, but not showing up in the inspect output.
Weird...
Ya when I try to manually add realtime to the network using docker service update --network-add appwrite_appwrite appwrite_appwrite-realtime
it says service is already attached to network appwrite_appwrite
When I inspect the container on the server realtime is running on, the container has the network with an ip address.
ah, when I inspect the appwrite_appwrite network on that server it has the realtime container in the network
Ya, so docker network inspect appwrite_appwrite
will only have the containers on that server.
Which realtime and traefik are on different servers
The appwrite_appwrite network is setup as an overlay network on the swarm, so it should be able to communicate between nodes
Are you having problems after upgrading to 1.4?
No, this is still 1.3.8
It might be something with the swarm network or something
From what I can tell, an overlay network is the type to use which is what the network is. However services/containers on other nodes donโt show in docker when inspecting the network. When I inspect the realtime container on the node it does say it is attached to the network and inspecting the network on that node does show the container. Right now, Iโm having to figure out how docker networks work really well so I know how to debug this. Also trying to compare a working non-swarm Appwrite instance.
I think my theory that traefik couldnโt find the service might be wrong, or at least the reason I was thinking that might be inaccurate.
ya..im not sure how the networks work especially with swarm
If I put realtime on the same docker node as traefik + appwrite, it works. So it must be a discoverability/network type of issue between nodes.
Figured it out! Via this reddit thread and the traefik docker docs:
I needed to move the labels to the deploy section for the appwrite and realtime services, and I needed to add - --providers.docker.swarmMode=true
to the traefik command section.
[SOLVED] Realtime Can't Establish a Connection
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...