importer fails with different error codes #2473

Closed
opened 2026-02-05 06:06:47 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @molind on GitHub (Mar 9, 2024).

The bug

I'm trying to upload google takeout. Updated images timestamps with a simple python app. Now it's time to add them into the library. Without luck unfortunately. It's uploaded 2Gb out of 54Gb and now stops almost instantly.

The OS that Immich Server is running on

Ubuntu 22.04.3 LTS

Version of Immich Server

1.98.1

Version of Immich Mobile App

1.98.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
#    ports:
#      - 2285:3001
    depends_on:
      - redis
      - database
    restart: always
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.immich.rule=Host(`host.com`)"
      - "traefik.http.routers.immich.entrypoints=websecure"
      - "traefik.http.routers.immich.tls.certresolver=resolver"

  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: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always
    
  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    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

  reverse-proxy:
    image: traefik:latest
    command:
      - "--accesslog=true"
      - "--api.insecure=true"
      - "--providers.docker"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.web.address=:80"
      - "--entryPoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesResolvers.resolver.acme.httpchallenge=true"
      - "--certificatesResolvers.resolver.acme.httpchallenge.entrypoint=web"
      - "--certificatesResolvers.resolver.acme.email=evgen@getyourmap.com"
      - "--certificatesResolvers.resolver.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
      - "127.0.0.1:8080:8080"
    volumes:
      - ./letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro
    
volumes:
  pgdata:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# 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=<cut>
DB_PASSWORD=<cut>

# 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

immich upload -ar Google \Takeout

And in random places it fails with 400 or 502 error from server.


░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 4h60m | 3.7 MB/54.3 GB: /mypool/evgen/takeout/Takeout/Google Photos/Archive/IMG_6722.PNG
file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:9775
    throw new ResponseError(response, "Response returned an error code");
          ^

ResponseError: Response returned an error code
    at AssetApi.request (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:9775:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AssetApi.uploadFileRaw (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:13469:22)
    at async AssetApi.uploadFile (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:13481:22)
    at async UploadCommand.run (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:22389:30)
    at async Command.<anonymous> (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:22454:3) {
  response: Response {
    [Symbol(realm)]: null,
    [Symbol(state)]: {
      aborted: false,
      rangeRequested: false,
      timingAllowPassed: true,
      requestIncludesCredentials: true,
      type: 'default',
      status: 400,
      timingInfo: {
        startTime: 4650.157367,
        redirectStartTime: 0,
        redirectEndTime: 0,
        postRedirectStartTime: 4650.157367,
        finalServiceWorkerStartTime: 0,
        finalNetworkResponseStartTime: 0,
        finalNetworkRequestStartTime: 0,
        endTime: 0,
        encodedBodySize: 88,
        decodedBodySize: 88,
        finalConnectionTimingInfo: null
      },
      cacheState: '',
      statusText: 'Bad Request',
      headersList: HeadersList {
        cookies: null,
        [Symbol(headers map)]: Map(5) {
          'content-length' => { name: 'Content-Length', value: '88' },
          'content-type' => {
            name: 'Content-Type',
            value: 'application/json; charset=utf-8'
          },
          'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 14:05:36 GMT' },
          'etag' => { name: 'Etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
          'x-powered-by' => { name: 'X-Powered-By', value: 'Express' }
        },
        [Symbol(headers map sorted)]: null
      },
      urlList: [ URL {} ],
      body: {
        stream: ReadableStream {
          [Symbol(kType)]: 'ReadableStream',
          [Symbol(kState)]: {
            disturbed: false,
            reader: undefined,
            state: 'readable',
            storedError: undefined,
            stream: undefined,
            transfer: [Object],
            controller: [ReadableStreamDefaultController]
          },
          [Symbol(nodejs.webstream.isClosedPromise)]: {
            promise: [Promise],
            resolve: [Function (anonymous)],
            reject: [Function (anonymous)]
          },
          [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error]
        }
      }
    },
    [Symbol(headers)]: Headers {
      [Symbol(headers list)]: HeadersList {
        cookies: null,
        [Symbol(headers map)]: Map(5) {
          'content-length' => { name: 'Content-Length', value: '88' },
          'content-type' => {
            name: 'Content-Type',
            value: 'application/json; charset=utf-8'
          },
          'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 14:05:36 GMT' },
          'etag' => { name: 'Etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
          'x-powered-by' => { name: 'X-Powered-By', value: 'Express' }
        },
        [Symbol(headers map sorted)]: null
      },
      [Symbol(guard)]: 'immutable',
      [Symbol(realm)]: null
    }
  }
}

Node.js v21.4.0


### Additional information

Log from docker

`reverse-proxy-1          | 172.22.0.1 - - [09/Mar/2024:14:05:36 +0000] "POST /api/asset/upload HTTP/1.1" 400 88 "-" "-" 8907 "immich@docker" "http://172.22.0.6:3001" 10ms`
Originally created by @molind on GitHub (Mar 9, 2024). ### The bug I'm trying to upload google takeout. Updated images timestamps with a simple python app. Now it's time to add them into the library. Without luck unfortunately. It's uploaded 2Gb out of 54Gb and now stops almost instantly. ### The OS that Immich Server is running on Ubuntu 22.04.3 LTS ### Version of Immich Server 1.98.1 ### Version of Immich Mobile App 1.98.1 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env # ports: # - 2285:3001 depends_on: - redis - database restart: always labels: - "traefik.enable=true" - "traefik.http.routers.immich.rule=Host(`host.com`)" - "traefik.http.routers.immich.entrypoints=websecure" - "traefik.http.routers.immich.tls.certresolver=resolver" 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: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 restart: always database: container_name: immich_postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 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 reverse-proxy: image: traefik:latest command: - "--accesslog=true" - "--api.insecure=true" - "--providers.docker" - "--providers.docker.exposedbydefault=false" - "--entryPoints.web.address=:80" - "--entryPoints.websecure.address=:443" - "--entrypoints.web.http.redirections.entrypoint.to=websecure" - "--entrypoints.web.http.redirections.entrypoint.scheme=https" - "--certificatesResolvers.resolver.acme.httpchallenge=true" - "--certificatesResolvers.resolver.acme.httpchallenge.entrypoint=web" - "--certificatesResolvers.resolver.acme.email=evgen@getyourmap.com" - "--certificatesResolvers.resolver.acme.storage=/letsencrypt/acme.json" ports: - "80:80" - "443:443" - "127.0.0.1:8080:8080" volumes: - ./letsencrypt:/letsencrypt - /var/run/docker.sock:/var/run/docker.sock:ro volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # 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=<cut> DB_PASSWORD=<cut> # 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 ```bash immich upload -ar Google \Takeout And in random places it fails with 400 or 502 error from server. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 4h60m | 3.7 MB/54.3 GB: /mypool/evgen/takeout/Takeout/Google Photos/Archive/IMG_6722.PNG file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^ ResponseError: Response returned an error code at AssetApi.request (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:13469:22) at async AssetApi.uploadFile (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:13481:22) at async UploadCommand.run (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:22389:30) at async Command.<anonymous> (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:22454:3) { response: Response { [Symbol(realm)]: null, [Symbol(state)]: { aborted: false, rangeRequested: false, timingAllowPassed: true, requestIncludesCredentials: true, type: 'default', status: 400, timingInfo: { startTime: 4650.157367, redirectStartTime: 0, redirectEndTime: 0, postRedirectStartTime: 4650.157367, finalServiceWorkerStartTime: 0, finalNetworkResponseStartTime: 0, finalNetworkRequestStartTime: 0, endTime: 0, encodedBodySize: 88, decodedBodySize: 88, finalConnectionTimingInfo: null }, cacheState: '', statusText: 'Bad Request', headersList: HeadersList { cookies: null, [Symbol(headers map)]: Map(5) { 'content-length' => { name: 'Content-Length', value: '88' }, 'content-type' => { name: 'Content-Type', value: 'application/json; charset=utf-8' }, 'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 14:05:36 GMT' }, 'etag' => { name: 'Etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' }, 'x-powered-by' => { name: 'X-Powered-By', value: 'Express' } }, [Symbol(headers map sorted)]: null }, urlList: [ URL {} ], body: { stream: ReadableStream { [Symbol(kType)]: 'ReadableStream', [Symbol(kState)]: { disturbed: false, reader: undefined, state: 'readable', storedError: undefined, stream: undefined, transfer: [Object], controller: [ReadableStreamDefaultController] }, [Symbol(nodejs.webstream.isClosedPromise)]: { promise: [Promise], resolve: [Function (anonymous)], reject: [Function (anonymous)] }, [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error] } } }, [Symbol(headers)]: Headers { [Symbol(headers list)]: HeadersList { cookies: null, [Symbol(headers map)]: Map(5) { 'content-length' => { name: 'Content-Length', value: '88' }, 'content-type' => { name: 'Content-Type', value: 'application/json; charset=utf-8' }, 'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 14:05:36 GMT' }, 'etag' => { name: 'Etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' }, 'x-powered-by' => { name: 'X-Powered-By', value: 'Express' } }, [Symbol(headers map sorted)]: null }, [Symbol(guard)]: 'immutable', [Symbol(realm)]: null } } } Node.js v21.4.0 ``` ``` ### Additional information Log from docker `reverse-proxy-1 | 172.22.0.1 - - [09/Mar/2024:14:05:36 +0000] "POST /api/asset/upload HTTP/1.1" 400 88 "-" "-" 8907 "immich@docker" "http://172.22.0.6:3001" 10ms`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2473