Back

Failed to create connection: php_network_getaddresses: getaddrinfo failed: Try again

  • 0
  • Self Hosted
Issadmin
14 Mar, 2024, 18:34

IM migrating to appwrite:1.4.14

TL;DR
Developers are facing connection issues and errors during an upgrade from Appwrite `1.4.13` to `1.4.14`. There is a problem with establishing the database connection, resulting in a `php_network_getaddresses: getaddrinfo failed` error. The suggested solution is to run `docker compose down && docker compose up -d` after upgrading the MariaDB using `docker exec appwrite-mariadb mysql_upgrade -u root -pPASSWORD`. This should resolve the connection problem.
Issadmin
14 Mar, 2024, 18:36

from appwrite:1.4.13

Issadmin
14 Mar, 2024, 18:38

please help

Binyamin
14 Mar, 2024, 18:40

Why you've needed to upgrade it?

Issadmin
14 Mar, 2024, 18:40

I need to make the appwrite to latest version

Issadmin
14 Mar, 2024, 18:41

and now Im stuck in upgradation

Binyamin
14 Mar, 2024, 18:41

I see What are the results of

TypeScript
docker network inspect appwrite
Issadmin
14 Mar, 2024, 18:42
Binyamin
14 Mar, 2024, 18:42

It seems like the database is connected

Binyamin
14 Mar, 2024, 18:43

What are the results of

TypeScript
docker logs appwrite

and

TypeScript
docker logs appwrite-mariadb
Issadmin
14 Mar, 2024, 18:44

2024-03-14 18:21:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2024-03-14 18:21:30 0 [Note] InnoDB: Number of transaction pools: 1 2024-03-14 18:21:30 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2024-03-14 18:21:30 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2024-03-14 18:21:30 0 [Note] InnoDB: Using Linux native AIO 2024-03-14 18:21:30 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2024-03-14 18:21:30 0 [Note] InnoDB: Completed initialization of buffer pool 2024-03-14 18:21:31 0 [Note] InnoDB: 128 rollback segments are active. 2024-03-14 18:21:31 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2024-03-14 18:21:31 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2024-03-14 18:21:31 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2024-03-14 18:21:31 0 [Note] InnoDB: 10.7.8 started; log sequence number 2750291301; transaction id 8672561 2024-03-14 18:21:31 0 [Note] Plugin 'FEEDBACK' is disabled. 2024-03-14 18:21:31 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2024-03-14 18:21:31 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work. 2024-03-14 18:21:31 0 [Note] Server socket created on IP: '0.0.0.0'. 2024-03-14 18:21:31 0 [Note] Server socket created on IP: '::'. 2024-03-14 18:21:32 0 [Note] mysqld: ready for connections. Version: '10.7.8-MariaDB-1:10.7.8+maria~ubu2004' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution 2024-03-14 18:21:40 0 [Note] InnoDB: Buffer pool(s) load completed at 240314 18:21:40

Binyamin
14 Mar, 2024, 18:45

The database is fine

Issadmin
14 Mar, 2024, 18:45

14.5s [root@Appwrite appwrite]# docker compose exec appwrite migrate Failed to create connection: php_network_getaddresses: getaddrinfo failed: Try again

Binyamin
14 Mar, 2024, 18:46

What is the output

TypeScript
docker compose down
docker ps -a
Issadmin
14 Mar, 2024, 18:47
Binyamin
14 Mar, 2024, 18:50

Okay Now try once more after starting it and let us know

Issadmin
14 Mar, 2024, 18:51

do I need to run docker compose up -d before docker compose exec appwrite migrate

Binyamin
14 Mar, 2024, 18:51

Yes

Issadmin
14 Mar, 2024, 18:52
Binyamin
14 Mar, 2024, 18:52

And what is the output of docker ps now?

Issadmin
14 Mar, 2024, 18:54
Issadmin
14 Mar, 2024, 18:54

on front end IM getting below error

{"message":"Error: Server Error","code":500,"version":"1.4.14"}

Binyamin
14 Mar, 2024, 18:55

I'm not sure about version 1.4.14

Binyamin
14 Mar, 2024, 18:55

For now I'll try to go back to 13

Issadmin
14 Mar, 2024, 18:56

Can i able to downgrade with out any issues, is this the command to doengrade?

docker run -it --rm --volume /var/run/docker.sock:/var/run/docker.sock --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw --entrypoint="upgrade" appwrite/appwrite:1.4.13

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