immich-app / immich

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

cannot open ./start-server.sh: No such file #10649

Closed jihefge closed 1 month ago

jihefge commented 1 month ago

The bug

The latest version of the container doesn't start. After an immich upgrade, i'm unable to access to the login page. After checking, the immich container restarts regularly.

sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4c8acf851143 ghcr.io/immich-app/immich-server:release "/bin/sh ./start-ser…" 3 minutes ago Restarting (2) 14 seconds ago immich_server 1c50f6668c65 redis:6.2-alpine "docker-entrypoint.s…" 3 minutes ago Up 3 minutes (healthy) 6379/tcp immich_redis a6b8b95e08fb ghcr.io/immich-app/immich-machine-learning:release "tini -- ./start.sh" 3 minutes ago Up 3 minutes (healthy) immich_machine_learning 1a832c1e4611 tensorchord/pgvecto-rs:pg14-v0.2.0 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 5432/tcp immich_postgres sudo docker logs immich_server /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file /bin/sh: 0: cannot open ./start-server.sh: No such file

The OS that Immich Server is running on

Debian

Version of Immich Server

latest

Version of Immich Mobile App

latest

Platform with the issue

Your docker-compose.yml content

services:
  immich-server:
    logging:
      driver: "journald"
      options:
        tag: "immich-server"
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    entrypoint: ["/bin/sh", "./start-server.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    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: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgresusername
DB_PASSWORD=postgrespassword
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

UPLOAD_LOCATION=/mnt/Photos/immich
DB_DATA_LOCATION=./postgres
IMMICH_VERSION=release

Reproduction steps

Stop existing containers, delete containers and images.
docker compose up -d
[+] Running 62/46
 ✔ immich-server 24 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                          114.9s
 ✔ immich-machine-learning 11 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                              73.9s
 ✔ redis 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                     17.0s
 ✔ database 16 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                        84.2s
sudo docker ps
CONTAINER ID   IMAGE                                                COMMAND                  CREATED         STATUS                          PORTS      NAMES
4c8acf851143   ghcr.io/immich-app/immich-server:release             "/bin/sh ./start-ser…"   3 minutes ago   Restarting (2) 14 seconds ago              immich_server
1c50f6668c65   redis:6.2-alpine                                     "docker-entrypoint.s…"   3 minutes ago   Up 3 minutes (healthy)          6379/tcp   immich_redis
a6b8b95e08fb   ghcr.io/immich-app/immich-machine-learning:release   "tini -- ./start.sh"     3 minutes ago   Up 3 minutes (healthy)                     immich_machine_learning
1a832c1e4611   tensorchord/pgvecto-rs:pg14-v0.2.0                   "docker-entrypoint.s…"   3 minutes ago   Up 3 minutes                    5432/tcp   immich_postgres

Relevant log output

sudo docker logs immich_server
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file
/bin/sh: 0: cannot open ./start-server.sh: No such file

Additional information

No response

bo0tzz commented 1 month ago
entrypoint: ["/bin/sh", "./start-server.sh"]

You need to remove this line, as mentioned in the release notes.