Rank 4: Virtual Machine
So the intended routing is traefik -> realtime, and not traefik -> appwrite_appwrite -> realtime?
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 4: Virtual Machine
So the intended routing is traefik -> realtime, and not traefik -> appwrite_appwrite -> realtime?
Rank 4: Virtual Machine
@Steven Thanks for your help -- not sure how to fix this yet but that helped me narrow things down a lot 🚀
Rank 4: Virtual Machine
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.
Rank 4: Virtual Machine
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).
Rank 4: Virtual Machine
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.
Rank 4: Virtual Machine
The realtime service is already attached to the appwrite_appwrite network already, but not showing up in the inspect output.
Admin
Weird...
Rank 4: Virtual Machine
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
Rank 4: Virtual Machine
When I inspect the container on the server realtime is running on, the container has the network with an ip address.
Rank 4: Virtual Machine
ah, when I inspect the appwrite_appwrite network on that server it has the realtime container in the network
Rank 4: Virtual Machine
Ya, so docker network inspect appwrite_appwrite will only have the containers on that server.
Rank 4: Virtual Machine
Which realtime and traefik are on different servers
Rank 4: Virtual Machine
The appwrite_appwrite network is setup as an overlay network on the swarm, so it should be able to communicate between nodes
Admin
Are you having problems after upgrading to 1.4?
Rank 4: Virtual Machine
No, this is still 1.3.8
Admin
It might be something with the swarm network or something
Rank 4: Virtual Machine
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.
Rank 4: Virtual Machine
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.
Admin
ya..im not sure how the networks work especially with swarm
Rank 4: Virtual Machine
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.
Rank 4: Virtual Machine
Figured it out! Via this reddit thread and the traefik docker docs:
Rank 4: Virtual Machine
Rank 4: Virtual Machine
Rank 4: Virtual Machine
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.
Rank 4: Virtual Machine
[SOLVED] Realtime Can't Establish a Connection