[BUG] Microservices geocoder throws error #567

Closed
opened 2026-02-04 21:22:34 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @EnochPrime on GitHub (Jan 10, 2023).

Describe the bug
Microservers container is throwing an error and restarting.

immich_microservices.1.1ntrmyfq99xp@node-hp    | /usr/src/app/node_modules/local-reverse-geocoder/index.js:746
immich_microservices.1.1ntrmyfq99xp@node-hp    |             throw err;
immich_microservices.1.1ntrmyfq99xp@node-hp    |             ^
immich_microservices.1.1ntrmyfq99xp@node-hp    | Error downloading GeoNames admin 2 codes data: Error: aborted
immich_microservices.1.1ntrmyfq99xp@node-hp    | (Use `node --trace-uncaught ...` to show where the exception was thrown)

Task List

Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.

  • I have read thoroughly the README setup and installation instructions.
  • I have included my docker-compose file.
  • I have included my redacted .env file.
  • I have included information on my machine, and environment.

To Reproduce
Steps to reproduce the behavior:

  1. Run microservers
  2. Wait

Expected behavior
No errors?

Screenshots
If applicable, add screenshots to help explain your problem.

System

  • Phone OS [iOS, Android]: N/A
  • Server Version: v1.41.0_64-dev
  • Mobile App Version: N/A

Additional context

Compose

version: "3.9"

# swarm deployment extension
x-deploy-swarm: &deploy_swarm
  mode: replicated
  replicas: 1
  update_config:
    parallelism: 1
    delay: 10s
    order: start-first

# immich environment
x-immich-env: &immich_environment
  NODE_ENV: production
  JWT_SECRET_FILE: /run/secrets/IMMICH_TOKEN
  ENABLE_MAPBOX: "false"
  DB_HOSTNAME: db
  DB_DATABASE_NAME: immich
  DB_USERNAME: immich
  DB_PASSWORD_FILE: /run/secrets/MYSQL_IMMICH_PASSWORD

services:
  app:
    image: ghcr.io/immich-app/immich-web:v1.41.0_64-dev
    entrypoint: /bin/sh ./entrypoint.sh
    environment:
      PUBLIC_IMMICH_SERVER_URL: http://server:3001
    networks:
      - frontend
      - server
    deploy:
      <<: *deploy_swarm
      resources:
        limits:
          cpus: '0.3'
          memory: 128M

  server:
    image: ghcr.io/immich-app/immich-server:v1.41.0_64-dev
    entrypoint: /secret-wrapper.sh /bin/sh ./start-server.sh
    environment:
      <<: *immich_environment
    secrets:
      - IMMICH_TOKEN
      - MYSQL_IMMICH_PASSWORD
    configs:
      - source: secret-wrapper-immich.sh
        target: /secret-wrapper.sh
        mode: 0555
    volumes:
      - /mnt/swarm/immich/upload:/usr/src/app/upload
    networks:
      - frontend
      - server
      - database
      - redis
    deploy:
      <<: *deploy_swarm
      resources:
        limits:
          cpus: '1.0'
          memory: 128M
      restart_policy:
        delay: 120s
        max_attempts: 3

  microservices:
    image: ghcr.io/immich-app/immich-server:v1.41.0_64-dev
    entrypoint: /secret-wrapper.sh /bin/sh ./start-microservices.sh
    environment:
      <<: *immich_environment
      IMMICH_MACHINE_LEARNING_URL: http://machine_learning:3003
    secrets:
      - IMMICH_TOKEN
      - MYSQL_IMMICH_PASSWORD
    configs:
      - source: secret-wrapper-immich.sh
        target: /secret-wrapper.sh
        mode: 0555
    volumes:
      - /mnt/swarm/immich/upload:/usr/src/app/upload
    networks:
      - server
      - database
      - redis
    deploy:
      <<: *deploy_swarm
      resources:
        limits:
          cpus: '1.0'
          memory: 1.0G
      restart_policy:
        delay: 120s
        max_attempts: 3

  machine_learning:
    image: ghcr.io/immich-app/immich-machine-learning:v1.41.0_64-dev
    entrypoint: /bin/sh ./entrypoint.sh
    volumes:
      - /mnt/swarm/immich/upload:/usr/src/app/upload
    networks:
      - server
    deploy:
      <<: *deploy_swarm
      placement:
        constraints:
          - node.platform.arch == x86_64
          - node.hostname == node-hp
      resources:
        limits:
          cpus: '1.0'
          memory: 512M

  db:
    image: postgres:14.6
    secrets:
      - MYSQL_IMMICH_PASSWORD
    environment:
      POSTGRES_DB: immich
      POSTGRES_USER: immich
      POSTGRES_PASSWORD_FILE: /run/secrets/MYSQL_IMMICH_PASSWORD
    volumes:
      - /mnt/swarm/immich/db:/var/lib/postgresql/data
    networks:
      - database
    deploy:
      <<: *deploy_swarm
      resources:
        limits:
          cpus: '0.3'
          memory: 128M

  redis:
    image: redis:7.0
    networks:
      - redis
    deploy:
      <<: *deploy_swarm
      resources:
        limits:
          cpus: '0.1'
          memory: 32M

networks:
  frontend:
    external: true
    name: core_frontend
  database:
    driver: overlay
  redis:
    driver: overlay
  server:
    driver: overlay

configs:
  secret-wrapper-immich.sh:
    file: files/secret-wrapper-immich.sh

secrets:
  IMMICH_TOKEN:
    external: true
  MYSQL_IMMICH_PASSWORD:
    external: true

Originally created by @EnochPrime on GitHub (Jan 10, 2023). <!-- Note: Please search to see if an issue already exists for the bug you encountered. --> **Describe the bug** Microservers container is throwing an error and restarting. ``` bash immich_microservices.1.1ntrmyfq99xp@node-hp | /usr/src/app/node_modules/local-reverse-geocoder/index.js:746 immich_microservices.1.1ntrmyfq99xp@node-hp | throw err; immich_microservices.1.1ntrmyfq99xp@node-hp | ^ immich_microservices.1.1ntrmyfq99xp@node-hp | Error downloading GeoNames admin 2 codes data: Error: aborted immich_microservices.1.1ntrmyfq99xp@node-hp | (Use `node --trace-uncaught ...` to show where the exception was thrown) ``` **Task List** *Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.* - [x] I have read thoroughly the README setup and installation instructions. - [x] I have included my `docker-compose` file. - [ ] I have included my redacted `.env` file. - [x] I have included information on my machine, and environment. **To Reproduce** Steps to reproduce the behavior: 1. Run microservers 2. Wait **Expected behavior** No errors? **Screenshots** If applicable, add screenshots to help explain your problem. **System** - Phone OS [iOS, Android]: `N/A` - Server Version: `v1.41.0_64-dev` - Mobile App Version: `N/A` **Additional context** <details><summary>Compose</summary> <p> ``` yaml version: "3.9" # swarm deployment extension x-deploy-swarm: &deploy_swarm mode: replicated replicas: 1 update_config: parallelism: 1 delay: 10s order: start-first # immich environment x-immich-env: &immich_environment NODE_ENV: production JWT_SECRET_FILE: /run/secrets/IMMICH_TOKEN ENABLE_MAPBOX: "false" DB_HOSTNAME: db DB_DATABASE_NAME: immich DB_USERNAME: immich DB_PASSWORD_FILE: /run/secrets/MYSQL_IMMICH_PASSWORD services: app: image: ghcr.io/immich-app/immich-web:v1.41.0_64-dev entrypoint: /bin/sh ./entrypoint.sh environment: PUBLIC_IMMICH_SERVER_URL: http://server:3001 networks: - frontend - server deploy: <<: *deploy_swarm resources: limits: cpus: '0.3' memory: 128M server: image: ghcr.io/immich-app/immich-server:v1.41.0_64-dev entrypoint: /secret-wrapper.sh /bin/sh ./start-server.sh environment: <<: *immich_environment secrets: - IMMICH_TOKEN - MYSQL_IMMICH_PASSWORD configs: - source: secret-wrapper-immich.sh target: /secret-wrapper.sh mode: 0555 volumes: - /mnt/swarm/immich/upload:/usr/src/app/upload networks: - frontend - server - database - redis deploy: <<: *deploy_swarm resources: limits: cpus: '1.0' memory: 128M restart_policy: delay: 120s max_attempts: 3 microservices: image: ghcr.io/immich-app/immich-server:v1.41.0_64-dev entrypoint: /secret-wrapper.sh /bin/sh ./start-microservices.sh environment: <<: *immich_environment IMMICH_MACHINE_LEARNING_URL: http://machine_learning:3003 secrets: - IMMICH_TOKEN - MYSQL_IMMICH_PASSWORD configs: - source: secret-wrapper-immich.sh target: /secret-wrapper.sh mode: 0555 volumes: - /mnt/swarm/immich/upload:/usr/src/app/upload networks: - server - database - redis deploy: <<: *deploy_swarm resources: limits: cpus: '1.0' memory: 1.0G restart_policy: delay: 120s max_attempts: 3 machine_learning: image: ghcr.io/immich-app/immich-machine-learning:v1.41.0_64-dev entrypoint: /bin/sh ./entrypoint.sh volumes: - /mnt/swarm/immich/upload:/usr/src/app/upload networks: - server deploy: <<: *deploy_swarm placement: constraints: - node.platform.arch == x86_64 - node.hostname == node-hp resources: limits: cpus: '1.0' memory: 512M db: image: postgres:14.6 secrets: - MYSQL_IMMICH_PASSWORD environment: POSTGRES_DB: immich POSTGRES_USER: immich POSTGRES_PASSWORD_FILE: /run/secrets/MYSQL_IMMICH_PASSWORD volumes: - /mnt/swarm/immich/db:/var/lib/postgresql/data networks: - database deploy: <<: *deploy_swarm resources: limits: cpus: '0.3' memory: 128M redis: image: redis:7.0 networks: - redis deploy: <<: *deploy_swarm resources: limits: cpus: '0.1' memory: 32M networks: frontend: external: true name: core_frontend database: driver: overlay redis: driver: overlay server: driver: overlay configs: secret-wrapper-immich.sh: file: files/secret-wrapper-immich.sh secrets: IMMICH_TOKEN: external: true MYSQL_IMMICH_PASSWORD: external: true ``` </p> </details>
Author
Owner

@alextran1502 commented on GitHub (Jan 10, 2023):

I am not familiar with swarm, can you try this PR? https://github.com/immich-app/immich/pull/1234

@alextran1502 commented on GitHub (Jan 10, 2023): I am not familiar with swarm, can you try this PR? https://github.com/immich-app/immich/pull/1234
Author
Owner

@bo0tzz commented on GitHub (Jan 10, 2023):

Make sure networking & dns inside the container are working properly and it can reach https://download.geonames.org/

@bo0tzz commented on GitHub (Jan 10, 2023): Make sure networking & dns inside the container are working properly and it can reach `https://download.geonames.org/`
Author
Owner

@EnochPrime commented on GitHub (Jan 10, 2023):

Make sure networking & dns inside the container are working properly and it can reach https://download.geonames.org/

I'll double check, it was working with v1.40.1_63-dev. Also looks very similar to #1104. I'll read up on that thread too.

@EnochPrime commented on GitHub (Jan 10, 2023): > Make sure networking & dns inside the container are working properly and it can reach `https://download.geonames.org/` I'll double check, it was working with v1.40.1_63-dev. Also looks very similar to #1104. I'll read up on that thread too.
Author
Owner

@EnochPrime commented on GitHub (Jan 10, 2023):

I was able to run the wget command suggested in the other issue as well as ping the url from within the microservices containers. While I was successfully pinging the url microservices still threw the error and restarted. I have rolled back to v1.40.1_63-dev and it has been stable for 22m and counting.

@EnochPrime commented on GitHub (Jan 10, 2023): I was able to run the wget command suggested in the other issue as well as ping the url from within the microservices containers. While I was successfully pinging the url microservices still threw the error and restarted. I have rolled back to v1.40.1_63-dev and it has been stable for 22m and counting.
Author
Owner

@bo0tzz commented on GitHub (Jan 10, 2023):

Before you rolled back, did you try recreating the container entirely? As far as I know, no changes were made to the geocoding system in this release, so more likely is that you just picked up some faulty state and recreating the container during the rollback cleared it.

@bo0tzz commented on GitHub (Jan 10, 2023): Before you rolled back, did you try recreating the container entirely? As far as I know, no changes were made to the geocoding system in this release, so more likely is that you just picked up some faulty state and recreating the container during the rollback cleared it.
Author
Owner

@EnochPrime commented on GitHub (Jan 10, 2023):

I re-updated, had to restart the webserver container because it was having a connection issue to the server container. Now everything has been running for about an hour. The error hasn't returned. Probably just call this an artifact of my configuration.

@EnochPrime commented on GitHub (Jan 10, 2023): I re-updated, had to restart the webserver container because it was having a connection issue to the server container. Now everything has been running for about an hour. The error hasn't returned. Probably just call this an artifact of my configuration.
Author
Owner

@yodatak commented on GitHub (Sep 7, 2023):

I got the same problem too #4013

@yodatak commented on GitHub (Sep 7, 2023): I got the same problem too #4013
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#567