immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
45.19k stars 2.19k forks source link

[BUG] EAI_AGAIN getaddrinfo EAI_AGAIN typesense #5550

Closed Genry777Morgan closed 9 months ago

Genry777Morgan commented 9 months ago

The bug

After updating the server it starts with an error Request #1702018343205: Request to node 0 failed due to "EAI_AGAIN getaddrinfo EAI_AGAIN typesense" Request #1702018343205: sleep for 4 seconds and then repeat the request...

There were no problems when updating to version 1.90.0, but the error returned to version 1.90.1

The OS that Immich Server is running on

Ubuntu 22

Version of Immich Server

v.1.90.1

Version of Immich Mobile App

v.1.90.1

Platform with the issue

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-latest}
    command: ["start.sh", "immich"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database

    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: ["start.sh", "microservices"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database

    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

GNU nano 6.2                                    .env
# You can find documentation for all the supported env variables at https://immich.app/docs/install>

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY="key***"
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Yesterday I updated to 1.90.0 without problems
2. Today write docker compose pull && docker compose up -d
3. Error
...

Additional information

No response

Genry777Morgan commented 9 months ago

/usr/src/app/node_modules/@nestjs/config/dist/config.module.js:78 throw new Error(Config validation error: ${error.message}); ^

Error: Config validation error: "TYPESENSE_API_KEY" is required at ConfigModule.forRoot (/usr/src/app/node_modules/@nestjs/config/dist/config.module.js:78:23) at Object. (/usr/src/app/dist/infra/infra.module.js:50:27) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object. (/usr/src/app/dist/infra/index.js:19:14) at Module._compile (node:internal/modules/cjs/loader:1376:14)

Node.js v20.10.0 /usr/src/app/node_modules/@nestjs/config/dist/config.module.js:78 throw new Error(Config validation error: ${error.message}); ^

Genry777Morgan commented 9 months ago

He needs a type sense key, which we removed from the docker composition

Genry777Morgan commented 9 months ago

Perhaps this is because I deleted the unused Typesense container after using the new dockercompose.yml file, now I used docker compose again for version 1.89(with typesense), and the server started up. Then I again deleted all the lines associated with typesense from the docker composition file, and everything worked, perhaps you can’t delete the typesense container (docker rm -f immich_typesense)

Genry777Morgan commented 9 months ago

In console [Nest] 7 - 12/08/2023, 7:34:01 AM ERROR [ErrorInterceptor] Failed to serve file [Nest] 7 - 12/08/2023, 7:34:01 AM ERROR [ErrorInterceptor] Error: Request aborted [Nest] 7 - 12/08/2023, 7:34:01 AM WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses [Nest] 7 - 12/08/2023, 7:34:49 AM LOG [CommunicationRepository] Websocket Connect: fHcWyBf1sgp2L-4SAAAJ [Nest] 7 - 12/08/2023, 7:34:52 AM LOG [CommunicationRepository] Websocket Disconnect: fHcWyBf1sgp2L-4SAAAJ [Nest] 7 - 12/08/2023, 7:35:10 AM LOG [CommunicationRepository] Websocket Connect: aDltlxcsNhmwhjBlAAAL [Nest] 7 - 12/08/2023, 7:35:40 AM LOG [CommunicationRepository] Websocket Disconnect: aDltlxcsNhmwhjBlAAAL [Nest] 7 - 12/08/2023, 7:35:50 AM LOG [CommunicationRepository] Websocket Connect: nI80A1xYaeYAc7JGAAAN [Nest] 7 - 12/08/2023, 7:36:34 AM LOG [CommunicationRepository] Websocket Disconnect: nI80A1xYaeYAc7JGAAAN [Nest] 7 - 12/08/2023, 7:36:50 AM LOG [CommunicationRepository] Websocket Disconnect: g4BIE7ce1HWWuT81AAAH [Nest] 7 - 12/08/2023, 7:36:51 AM LOG [CommunicationRepository] Websocket Connect: ANloyBtGfNaxZLsBAAAP [Nest] 7 - 12/08/2023, 7:36:59 AM ERROR [ErrorInterceptor] Failed to serve file [Nest] 7 - 12/08/2023, 7:36:59 AM ERROR [ErrorInterceptor] Error: Request aborted [Nest] 7 - 12/08/2023, 7:36:59 AM ERROR [ErrorInterceptor] Failed to serve file [Nest] 7 - 12/08/2023, 7:36:59 AM ERROR [ErrorInterceptor] Error: Request aborted [Nest] 7 - 12/08/2023, 7:37:01 AM ERROR [ErrorInterceptor] Failed to serve file [Nest] 7 - 12/08/2023, 7:37:01 AM ERROR [ErrorInterceptor] Error: Request aborted [Nest] 7 - 12/08/2023, 7:37:01 AM ERROR [ErrorInterceptor] Failed to serve file [Nest] 7 - 12/08/2023, 7:37:01 AM ERROR [ErrorInterceptor] Error: Request aborted