Back

[SOLVED] "Failed to create connection: php_network_getaddresses: getaddrinfo failed" on 1.4.1

  • 0
  • Self Hosted
Drake
5 Sep, 2023, 22:45

Update to 1.4.1 failed

TL;DR
Summary: The user encountered the error message "Failed to create connection: php_network_getaddresses: getaddrinfo failed" on version 1.4.1. They were advised to run the migrate command, which resolved the issue. However, they later encountered another error related to the appwrite network not being found. The user was instructed to try restarting the stack and provided with the necessary commands. They also checked the database and redis environment variables but did not make any changes. The user shared logs showing that the mariadb container was not ready. They tried restarting all containers except mariadb and redis. The mariadb logs were not available
Drake
5 Sep, 2023, 22:45

"Failed to create connection: php_network_getaddresses: getaddrinfo failed" on 1.4.1

AlimFreight🇺🇦 🇨🇦
5 Sep, 2023, 23:10

Containers continuously restarting

Drake
5 Sep, 2023, 23:15

appwrite container seems to be okay now?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 14:06

Not at all unfortunately. Here is the log of appwrite container

TypeScript
Worker 2 started successfully
Worker 3 started successfully
Worker 4 started successfully
Worker 5 started successfully
Worker 7 started successfully
Worker 6 started successfully
Worker 9 started successfully
Worker 11 started successfully
Worker 10 started successfully
Worker 13 started successfully
Worker 14 started successfully
Worker 15 started successfully
Worker 16 started successfully
Worker 17 started successfully
Worker 18 started successfully
Worker 12 started successfully
Worker 20 started successfully
Worker 19 started successfully
Worker 21 started successfully
Worker 22 started successfully
Worker 8 started successfully
Worker 23 started successfully
Worker 24 started successfully
Database not ready. Retrying connection (1)...
Database not ready. Retrying connection (2)...
Database not ready. Retrying connection (3)...
Database not ready. Retrying connection (4)...
Database not ready. Retrying connection (5)...
Database not ready. Retrying connection (6)...
Drake
6 Sep, 2023, 14:07

What about the mariadb logs?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 14:07

I did restart all containers exept mariadb nad redis though

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 14:10
TypeScript
2023-09-06 14:08:31 0 [Note] mysqld (server 10.7.4-MariaDB-1:10.7.4+maria~focal) starting as process 1 ...
2023-09-06 14:08:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-09-06 14:08:32 0 [Note] InnoDB: Number of transaction pools: 1
2023-09-06 14:08:32 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
2023-09-06 14:08:32 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-09-06 14:08:32 0 [Note] InnoDB: Using Linux native AIO
2023-09-06 14:08:32 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-09-06 14:08:32 0 [Note] InnoDB: Completed initialization of buffer pool
2023-09-06 14:08:32 0 [Note] InnoDB: 128 rollback segments are active.
2023-09-06 14:08:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-09-06 14:08:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-09-06 14:08:32 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-09-06 14:08:32 0 [Note] InnoDB: 10.7.4 started; log sequence number 379768774841; transaction id 1214319136
2023-09-06 14:08:32 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-09-06 14:08:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-09-06 14:08:32 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
2023-09-06 14:08:32 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-09-06 14:08:32 0 [Note] Server socket created on IP: '::'.
2023-09-06 14:08:32 0 [Note] mysqld: ready for connections.
Version: '10.7.4-MariaDB-1:10.7.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2023-09-06 14:08:32 0 [Note] InnoDB: Buffer pool(s) load completed at 230906 14:08:32```
Drake
6 Sep, 2023, 14:11

Doesn't seem like it's even connecting. Did you change the database environment variables from the default install?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 14:12

No I didn't change anything

Drake
6 Sep, 2023, 14:13

What about redis environment variables?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 14:14

Didn't change as well

Drake
6 Sep, 2023, 14:14

Would you be able to dm me the docker compose and .env files?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 14:15

yes of cause

Drake
6 Sep, 2023, 15:57

thanks, the files look fine and i was able to run them fine...

maybe there's a network conflict...have you tried recreating stack with:

TypeScript
docker compose down
docker compose up -d
AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 16:00

I got this reponce as I did docker compose up -d command Error response from daemon: Could not attach to network appwrite: rpc error: code = NotFound desc = network appwrite not found

Drake
6 Sep, 2023, 16:05

docker compose down was fine? try docker compose up -d --remove-orphans

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 16:14

Same error

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 17:03
Drake
6 Sep, 2023, 17:45

let's see if there's anything running

TypeScript
docker compose down
docker ps -a

also, do you have a docker-compose.override.yml file?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 17:45

I've deleted networks and was able to start appwrite but noe I get this error :

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 17:46

Yes I have docker-compose.override.yml

Drake
6 Sep, 2023, 17:47

did you run the migrate command successfully?

AlimFreight🇺🇦 🇨🇦
6 Sep, 2023, 17:51

did you run the migrate command I just was doing right that, and finally everything is on fly again:) Thank you very much for your support.

Drake
6 Sep, 2023, 18:04

[SOLVED] "Failed to create connection: php_network_getaddresses: getaddrinfo failed" on 1.4.1

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