Back

appwrite.exception.AppwriteException: HTTPConnectionPool(host='localhost', port=88): Max retries exc

  • 0
  • Self Hosted
Christy Jacob
24 May, 2023, 18:57

is your appwrite server running on port 88 ?

TL;DR
The user encountered an error with the AppwriteException in their code. They received a suggestion to add their Django container to the same network as the Traefik container in their Docker Compose file. If they are in different compose files, they need to declare an external network in the Django app and add the container to that network. They also need to ensure that they are using the correct port for their appwrite server (in this case, port 88). Restarting the Docker Compose setup was recommended as a potential solution. The user is advised not to create duplicate posts and is asked to provide more information about their setup, including
Dev Back-end
24 May, 2023, 18:59

appwrite in the port 88.

Dev Back-end
24 May, 2023, 19:00

I want to say that my django rest framework project is in docker and that I also install appwrite

Christy Jacob
24 May, 2023, 19:00

can you run a docker ps on your machine and share the output ?

Dev Back-end
24 May, 2023, 19:04
Christy Jacob
24 May, 2023, 19:05

can you share the commands you used inside your docker compose for the traefik container ?

I think theres some mishap with the ports..

Dev Back-end
24 May, 2023, 19:08

but, it's funny because I'm consuming the appwrite service from an angular front-end and it works perfect

Dev Back-end
24 May, 2023, 19:10
Christy Jacob
24 May, 2023, 19:12

okay so appwrite_port is 88 and appwrite_address is 443 ?

Can you also share the labels in the appwrite container?

Dev Back-end
24 May, 2023, 19:17

what do you mean by tags?

Christy Jacob
24 May, 2023, 19:17

labels of the appwrite container

Christy Jacob
24 May, 2023, 19:18

it has some traefik specific config too

Dev Back-end
24 May, 2023, 19:20
Christy Jacob
24 May, 2023, 19:21

okay and last question. When you were installing appwrite, what port did you provide in the CLI prompts?

Christy Jacob
24 May, 2023, 19:23
Christy Jacob
24 May, 2023, 19:23

to be clear - these steps

Dev Back-end
24 May, 2023, 19:24

I understand but I have the ports and other credentials in my .env file, and that's how I work.

Drake
24 May, 2023, 19:26
Christy Jacob
24 May, 2023, 19:27

Looking at your screenshot, traefik exposes ports 443 and 88

Whereas in your env you have 447 and 88

To me it seems like you need to restart your docker compose setup

Dev Back-end
24 May, 2023, 19:29

Sorry, I corrected it yesterday but it's still the same:

Drake
24 May, 2023, 19:32

As I mentioned in your original thread, you can't connect to localhost port 80 from inside your DRF container because it will try to connect to itself rather than Appwrite. You may need to use your LAN IP or put appwrite's traefik container and DRF on the same network and then use traefik's hostname as the hostname rather than localhost

Christy Jacob
24 May, 2023, 19:34

Are you using the same docker compose to declare both the appwrite stack and your Django app ?

Dev Back-end
24 May, 2023, 19:36

but it is not port 80, but 88

Christy Jacob
24 May, 2023, 19:38

If both containers are part of the same docker compose file, then you need to add your django container to the same network as the traefik container.

if they are in different compose files you need to first declare an external network in the django app like so

TypeScript
services:
  # ...
networks:
  network1:
    name: traefik_network_name
    external: true

Then add your django container to the network network1

Dev Back-end
24 May, 2023, 19:41

ok, i'll try it. Thanks

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more