[BUG] Unable to open welcome page <Error code 500> #266

Closed
opened 2026-02-04 19:12:28 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @Sungray on GitHub (Sep 8, 2022).

Describe the bug
Unable to log into the UI. The welcome page gives me this:

Error code 500
Request failed with status code 404
Verbose

Request failed with status code 404,AxiosError,ERR_BAD_REQUEST,[object Object],[object XMLHttpRequest],[object Object]

I suppose this is a configuration issue, but I am unable to find the solution.

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. Open :2285 (mapped container 3000 to host 2285 in docker-compose)
  2. Profit

Expected behavior
Welcome page

Screenshots
image
image
image

System

  • Server Version: unRAID with docker-compose

Additional context
.env

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich
DB_DATA_LOCATION=/mnt/user/appdata/immich/db





###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis





###################################################################################
# NGINX
###################################################################################

NGINX_CONF_LOCATION=/mnt/user/appdata/immich/nginx





###################################################################################
# Upload File Config
###################################################################################

UPLOAD_LOCATION=/mnt/user/photo/immich




###################################################################################
# JWT SECRET
###################################################################################

JWT_SECRET=******




###################################################################################
# MAPBOX
####################################################################################

# ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY
ENABLE_MAPBOX=true
MAPBOX_KEY=******




###################################################################################
# WEB
###################################################################################

# This is the URL of your vm/server where you host Immich, so that the web frontend
# know where can it make the request to.
# For example: If your server IP address is 10.1.11.50, the environment variable will
# be VITE_SERVER_ENDPOINT=http://10.1.11.50:2283
# !CAUTION! THERE IS NO FORWARD SLASH AT THE END

VITE_SERVER_ENDPOINT=http://<ip>:2283

docker-compose

version: "3.8"
services:
  immich-server:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    expose:
      - "3000"
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    networks:
      - immich_network
    restart: always

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    networks:
      - immich_network
    restart: always

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    expose:
      - "3001"
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - database
    networks:
      - immich_network
    restart: always

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    env_file:
      - .env
    ports:
      - 2285:3000
    networks:
      - immich_network
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2
    networks:
      - immich_network
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    ports:
      - 5432:5432
    networks:
      - immich_network
    restart: always

  nginx:
    container_name: proxy_nginx
    image: nginx:latest
    volumes:
      - ${NGINX_CONF_LOCATION}:/etc/nginx/conf.d
    ports:
      - 2283:80
      - 2284:443
    logging:
      driver: none
    networks:
      - immich_network
    depends_on:
      - immich-server
    restart: always

networks:
  immich_network:
Originally created by @Sungray on GitHub (Sep 8, 2022). **Describe the bug** Unable to log into the UI. The welcome page gives me this: ``` Error code 500 Request failed with status code 404 Verbose Request failed with status code 404,AxiosError,ERR_BAD_REQUEST,[object Object],[object XMLHttpRequest],[object Object] ``` I suppose this is a configuration issue, but I am unable to find the solution. **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. - [x] 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. Open <ip>:2285 (mapped container 3000 to host 2285 in docker-compose) 2. Profit **Expected behavior** Welcome page **Screenshots** ![image](https://user-images.githubusercontent.com/3531871/189058867-faea994a-ca80-4047-9479-72554a588172.png) ![image](https://user-images.githubusercontent.com/3531871/189060549-bfaf4614-1cc3-4533-b588-7baa2ce3a59e.png) ![image](https://user-images.githubusercontent.com/3531871/189060611-9b254b61-c073-468c-b514-d93d83630d50.png) **System** - Server Version: unRAID with docker-compose **Additional context** .env ``` ################################################################################### # Database ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich DB_DATA_LOCATION=/mnt/user/appdata/immich/db ################################################################################### # Redis ################################################################################### REDIS_HOSTNAME=immich_redis ################################################################################### # NGINX ################################################################################### NGINX_CONF_LOCATION=/mnt/user/appdata/immich/nginx ################################################################################### # Upload File Config ################################################################################### UPLOAD_LOCATION=/mnt/user/photo/immich ################################################################################### # JWT SECRET ################################################################################### JWT_SECRET=****** ################################################################################### # MAPBOX #################################################################################### # ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY ENABLE_MAPBOX=true MAPBOX_KEY=****** ################################################################################### # WEB ################################################################################### # This is the URL of your vm/server where you host Immich, so that the web frontend # know where can it make the request to. # For example: If your server IP address is 10.1.11.50, the environment variable will # be VITE_SERVER_ENDPOINT=http://10.1.11.50:2283 # !CAUTION! THERE IS NO FORWARD SLASH AT THE END VITE_SERVER_ENDPOINT=http://<ip>:2283 ``` docker-compose ``` version: "3.8" services: immich-server: image: altran1502/immich-server:release entrypoint: ["/bin/sh", "./start-server.sh"] expose: - "3000" volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database networks: - immich_network restart: always immich-microservices: image: altran1502/immich-server:release entrypoint: ["/bin/sh", "./start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database networks: - immich_network restart: always immich-machine-learning: image: altran1502/immich-machine-learning:release entrypoint: ["/bin/sh", "./entrypoint.sh"] expose: - "3001" volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - database networks: - immich_network restart: always immich-web: image: altran1502/immich-web:release entrypoint: ["/bin/sh", "./entrypoint.sh"] env_file: - .env ports: - 2285:3000 networks: - immich_network restart: always redis: container_name: immich_redis image: redis:6.2 networks: - immich_network restart: always database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data ports: - 5432:5432 networks: - immich_network restart: always nginx: container_name: proxy_nginx image: nginx:latest volumes: - ${NGINX_CONF_LOCATION}:/etc/nginx/conf.d ports: - 2283:80 - 2284:443 logging: driver: none networks: - immich_network depends_on: - immich-server restart: always networks: immich_network: ```
Author
Owner

@panoti commented on GitHub (Sep 8, 2022):

@Sungray I found that your container name was changed by appending -1 at the end. It causes the web app cannot connect to your api service (name as immich-server).

@panoti commented on GitHub (Sep 8, 2022): @Sungray I found that your container name was changed by appending `-1` at the end. It causes the web app cannot connect to your api service (name as immich-server).
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

@Sungray I found that your container name was changed by appending -1 at the end. It causes the web app cannot connect to your api service (name as immich-server).

Thanks. Any idea what might cause this?

@Sungray commented on GitHub (Sep 8, 2022): > @Sungray I found that your container name was changed by appending `-1` at the end. It causes the web app cannot connect to your api service (name as immich-server). Thanks. Any idea what might cause this?
Author
Owner

@panoti commented on GitHub (Sep 8, 2022):

Thanks. Any idea what might cause this?

I'm not familiar with Unraid. There are also some users has the same error like you. You can try using container_name statement to name each container correctly. For example:

immich-server:
    image: altran1502/immich-server:release
    container_name: immich-server
    entrypoint: ["/bin/sh", "./start-server.sh"]
    expose:
      - "3000"
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    networks:
      - immich_network
    restart: always
@panoti commented on GitHub (Sep 8, 2022): > Thanks. Any idea what might cause this? I'm not familiar with Unraid. There are also some users has the same error like you. You can try using `container_name` statement to name each container correctly. For example: ``` immich-server: image: altran1502/immich-server:release container_name: immich-server entrypoint: ["/bin/sh", "./start-server.sh"] expose: - "3000" volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database networks: - immich_network restart: always ```
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

Thanks. It still looks the same.

version: "3.8"
services:
  immich-server:
    container_name: immich-server
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    expose:
      - "3000"
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    networks:
      - immich_network
    restart: always

  immich-microservices:
    container_name: immich-microservices
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    networks:
      - immich_network
    restart: always

  immich-machine-learning:
    container_name: immich-machine-learning
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    expose:
      - "3001"
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - database
    networks:
      - immich_network
    restart: always

  immich-web:
    container_name: immich-web
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    env_file:
      - .env
    ports:
      - 2285:3000
    networks:
      - immich_network
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2
    networks:
      - immich_network
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    ports:
      - 5432:5432
    networks:
      - immich_network
    restart: always

  nginx:
    container_name: proxy_nginx
    image: nginx:latest
    volumes:
      - ${NGINX_CONF_LOCATION}:/etc/nginx/conf.d
    ports:
      - 2283:80
      - 2284:443
    logging:
      driver: none
    networks:
      - immich_network
    depends_on:
      - immich-server
    restart: always

networks:
    immich_network:
      name: immich_network

image
image

@Sungray commented on GitHub (Sep 8, 2022): > Thanks. It still looks the same. ``` version: "3.8" services: immich-server: container_name: immich-server image: altran1502/immich-server:release entrypoint: ["/bin/sh", "./start-server.sh"] expose: - "3000" volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database networks: - immich_network restart: always immich-microservices: container_name: immich-microservices image: altran1502/immich-server:release entrypoint: ["/bin/sh", "./start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database networks: - immich_network restart: always immich-machine-learning: container_name: immich-machine-learning image: altran1502/immich-machine-learning:release entrypoint: ["/bin/sh", "./entrypoint.sh"] expose: - "3001" volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - database networks: - immich_network restart: always immich-web: container_name: immich-web image: altran1502/immich-web:release entrypoint: ["/bin/sh", "./entrypoint.sh"] env_file: - .env ports: - 2285:3000 networks: - immich_network restart: always redis: container_name: immich_redis image: redis:6.2 networks: - immich_network restart: always database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data ports: - 5432:5432 networks: - immich_network restart: always nginx: container_name: proxy_nginx image: nginx:latest volumes: - ${NGINX_CONF_LOCATION}:/etc/nginx/conf.d ports: - 2283:80 - 2284:443 logging: driver: none networks: - immich_network depends_on: - immich-server restart: always networks: immich_network: name: immich_network ``` ![image](https://user-images.githubusercontent.com/3531871/189072532-276c60d1-d1ff-4740-b390-eaacbaf6a5f9.png) ![image](https://user-images.githubusercontent.com/3531871/189072562-843ae006-51f3-4548-b756-0d6826bd2d69.png)
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

The DB instance seems to be unable to start.
image

@Sungray commented on GitHub (Sep 8, 2022): The DB instance seems to be unable to start. ![image](https://user-images.githubusercontent.com/3531871/189073407-b7375680-cb5a-4112-b824-f5c08f899146.png)
Author
Owner

@panoti commented on GitHub (Sep 8, 2022):

@Sungray can you send me some postgres logs? or can you make sure your postgres container are available?

@panoti commented on GitHub (Sep 8, 2022): @Sungray can you send me some postgres logs? or can you make sure your postgres container are available?
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

Postgres
image
Microservices
image
Server
image

All eems good now but still
image
image

@Sungray commented on GitHub (Sep 8, 2022): Postgres ![image](https://user-images.githubusercontent.com/3531871/189075469-40305549-c84b-4337-bb34-e88979532cc1.png) Microservices ![image](https://user-images.githubusercontent.com/3531871/189075186-72ba73b7-eef8-4fa3-937e-f50c30a09740.png) Server ![image](https://user-images.githubusercontent.com/3531871/189075552-24113ae5-e39a-4fc6-9615-99c9bfcd5852.png) All eems good now but still ![image](https://user-images.githubusercontent.com/3531871/189075323-da094752-db01-4481-b77e-aca2e45507c7.png) ![image](https://user-images.githubusercontent.com/3531871/189075375-6bc039f2-1a19-426d-9980-df7fe9fbfeee.png)
Author
Owner

@panoti commented on GitHub (Sep 8, 2022):

Have you re-written /api to / in nginx config? I found you're using a custom nginx configs.

rewrite /api/(.*) /$1 break;
@panoti commented on GitHub (Sep 8, 2022): Have you re-written `/api` to `/` in nginx config? I found you're using a custom nginx configs. ``` rewrite /api/(.*) /$1 break; ```
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

Have you re-written /api to / in nginx config? I found you're using a custom nginx configs.

rewrite /api/(.*) /$1 break;

I didn't change anything but was using an old version of the docker-compose with image: nginx:latest and a network specified.
I changed the docker-compose with this

  immich-proxy:
    container_name: immich_proxy
    image: altran1502/immich-proxy:release
    ports:
      - 2283:80
    logging:
      driver: none
    depends_on:
      - immich-server
    restart: always

Unfortunately still the same problem.

image
image

@Sungray commented on GitHub (Sep 8, 2022): > Have you re-written `/api` to `/` in nginx config? I found you're using a custom nginx configs. > > ``` > rewrite /api/(.*) /$1 break; > ``` I didn't change anything but was using an old version of the docker-compose with image: nginx:latest and a network specified. I changed the docker-compose with this ``` immich-proxy: container_name: immich_proxy image: altran1502/immich-proxy:release ports: - 2283:80 logging: driver: none depends_on: - immich-server restart: always ``` Unfortunately still the same problem. ![image](https://user-images.githubusercontent.com/3531871/189088208-f3ac8bfb-e179-475b-b010-5cc02cd4740b.png) ![image](https://user-images.githubusercontent.com/3531871/189088228-d81824f6-2f01-41fc-a9f4-8abc8228883e.png)
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

Oh - now I can access the web gui using :2283.

@Sungray commented on GitHub (Sep 8, 2022): Oh - now I can access the web gui using :2283.
Author
Owner

@Sungray commented on GitHub (Sep 8, 2022):

Thanks!

@Sungray commented on GitHub (Sep 8, 2022): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#266