Back

[SOLVED] Failed to create connection: php_network_getaddresses: getaddrinfo failed

  • 0
  • Self Hosted
  • General
Andrew121410
31 Aug, 2023, 23:30

what container do you need logs of?

TL;DR
Issue: Failed to create connection: php_network_getaddresses: getaddrinfo failed; Solution: Upgrade to the latest patch version (1.4.1). Restart everything with `docker compose down` and `docker compose up -d`. Remove `_APP_CONNECTIONS_MAX=20` from `.env` file. If the issue persists, check the logs of the relevant containers.
Andrew121410
31 Aug, 2023, 23:32
Andrew121410
31 Aug, 2023, 23:35

I did get The _APP_CONNECTIONS_MAX variable is not set. Defaulting to a blank string when I run the command the first try.

Drake
31 Aug, 2023, 23:47

how did you upgrade?

Andrew121410
31 Aug, 2023, 23:51

I upgraded to 1.4.0 using this command docker run -it --rm --volume /var/run/docker.sock:/var/run/docker.sock --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw --entrypoint="install" appwrite/appwrite:1.4.0 then I cd into appwrite directory, to run the migration command it failed. So I noticed that 1.4.1 was released so I backed out of appwrite directory and I ran docker run -it --rm --volume /var/run/docker.sock:/var/run/docker.sock --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw --entrypoint="install" appwrite/appwrite:1.4.1 then I cd back into the appwrite directory to run the migration command, for it to fail also

Drake
31 Aug, 2023, 23:53

what's in your appwrite folder right now? and what's the output of pwd?

Andrew121410
31 Aug, 2023, 23:54
Drake
31 Aug, 2023, 23:59

what's the output of docker compose logs redis?

Andrew121410
1 Sep, 2023, 00:03
Andrew121410
1 Sep, 2023, 00:04

Do you need more before that It looks normal before that.

Drake
1 Sep, 2023, 00:21

seems like it's online... but the logs from the other containers are still saying they can't connect?

Andrew121410
1 Sep, 2023, 00:21

Yeah, so strange

Andrew121410
1 Sep, 2023, 00:22

Didn't have this issue before 1.4.0 though

Andrew121410
1 Sep, 2023, 00:22

Should I try to go back?

Drake
1 Sep, 2023, 00:23

no. try to restart everything with docker compose down && docker compose up -d

Andrew121410
1 Sep, 2023, 00:26

Lol everything is working now? Should I try running the migration command again?

Andrew121410
1 Sep, 2023, 00:27

Also added _APP_CONNECTIONS_MAX=20 to .env before restarting everything. (said in the GitHub page)

Andrew121410
1 Sep, 2023, 00:29

Ok running the migration command everything is working.

Andrew121410
1 Sep, 2023, 00:33

So either the fix is

TypeScript
A. 1. Add `_APP_CONNECTIONS_MAX=20` to `.env` file.
     2. then run `docker compose down && docker compose up -d`
     3. then run the migration command as usual.

(Maybe?)
B.  1. run `docker compose down && docker compose up -d`
    2. then run the migration command as usual.```
Drake
1 Sep, 2023, 00:35

you shouldn't need that anymore

Andrew121410
1 Sep, 2023, 00:40

Ok for testing I removed _APP_CONNECTIONS_MAX=20 from .env and I ran docker compose down && docker compose up -d and still everything works lol. So yeah I guess just restarting everything fixes it.

Andrew121410
1 Sep, 2023, 00:42

Idk anyways, thank you!

Drake
1 Sep, 2023, 00:51

[SOLVED] Failed to create connection: php_network_getaddresses: getaddrinfo failed

Al
1 Sep, 2023, 08:14

I want to just mention that I had the same issue today after 1.4.0 upgrade - the "fix" above works, but maybe a PSA could be added if it's the same for everyone upgrading.

Drake
1 Sep, 2023, 14:55

you should be upgrading to the latest patch version (1.4.1 right now) which doesn't have the problem

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