[Error] immich-web error #73

Closed
opened 2026-02-04 17:19:53 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @Antonet99 on GitHub (May 23, 2022).

Describe the bug

I was looking to test the app, so I deployed it on a VM running Ubuntu Server 22.04 with the docker-compose.yml and the .env files. I obv adjusted them to my settings (code attached).

When I try to open the web app at http://IP:2285 to register the first user, I have two problem:

FetchError: request to http://192.168.1.65:2283/user/count failed, reason: socket hang up
docker-immich-web-1            |     at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11)
docker-immich-web-1            |     at ClientRequest.emit (node:events:527:28)
docker-immich-web-1            |     at Socket.socketOnEnd (node:_http_client:478:9)
docker-immich-web-1            |     at Socket.emit (node:events:539:35)
docker-immich-web-1            |     at endReadableNT (node:internal/streams/readable:1345:12)
docker-immich-web-1            |     at processTicksAndRejections (node:internal/process/task_queues:83:21)


FetchError: request to http://192.168.1.65:2283/user/count failed, reason: read ECONNRESET
docker-immich-web-1            |     at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11)
docker-immich-web-1            |     at ClientRequest.emit (node:events:527:28)
docker-immich-web-1            |     at Socket.socketErrorListener (node:_http_client:454:9)
docker-immich-web-1            |     at Socket.emit (node:events:527:28)
docker-immich-web-1            |     at emitErrorNT (node:internal/streams/destroy:157:8)
docker-immich-web-1            |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
docker-immich-web-1            |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
screen

Am I missing something? I can't find a solution!

docker-compose.yml

version: "3.8"

services:
  immich-server:
    image: altran1502/immich-server:latest
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    expose:
      - "3000"
    volumes:
      - /home/user1/prova/immich:/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-microservices:latest
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    expose:
      - "3001"
    volumes:
      - /home/user1/prova/immich:/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:latest
    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: mypassword
      POSTGRES_USER: user
      POSTGRES_DB: immich
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - pgdata:/var/lib/postgresql/data
    ports:
      - 5432:5432
    networks:
      - immich-network

  nginx:
    container_name: proxy_nginx
    image: nginx:latest
    volumes:
      - /home/user1/prova/nginx/settings/nginx-conf:/etc/nginx/conf.d
    ports:
      - 2283:80
      - 2284:443
         logging:
      driver: none
    networks:
      - immich-network
    depends_on:
      - immich-server
    restart: always

networks:
  immich-network:
volumes:
  pgdata:
Originally created by @Antonet99 on GitHub (May 23, 2022). **Describe the bug** I was looking to test the app, so I deployed it on a VM running Ubuntu Server 22.04 with the docker-compose.yml and the .env files. I obv adjusted them to my settings (code attached). When I try to open the web app at http://IP:2285 to register the first user, I have two problem: ``` FetchError: request to http://192.168.1.65:2283/user/count failed, reason: socket hang up docker-immich-web-1 | at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11) docker-immich-web-1 | at ClientRequest.emit (node:events:527:28) docker-immich-web-1 | at Socket.socketOnEnd (node:_http_client:478:9) docker-immich-web-1 | at Socket.emit (node:events:539:35) docker-immich-web-1 | at endReadableNT (node:internal/streams/readable:1345:12) docker-immich-web-1 | at processTicksAndRejections (node:internal/process/task_queues:83:21) FetchError: request to http://192.168.1.65:2283/user/count failed, reason: read ECONNRESET docker-immich-web-1 | at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11) docker-immich-web-1 | at ClientRequest.emit (node:events:527:28) docker-immich-web-1 | at Socket.socketErrorListener (node:_http_client:454:9) docker-immich-web-1 | at Socket.emit (node:events:527:28) docker-immich-web-1 | at emitErrorNT (node:internal/streams/destroy:157:8) docker-immich-web-1 | at emitErrorCloseNT (node:internal/streams/destroy:122:3) docker-immich-web-1 | at processTicksAndRejections (node:internal/process/task_queues:83:21) ``` <img width="1440" alt="screen" src="https://user-images.githubusercontent.com/50658637/169841377-2296b52f-1a92-4b40-b6b1-f51095591a2f.png"> Am I missing something? I can't find a solution! docker-compose.yml ``` version: "3.8" services: immich-server: image: altran1502/immich-server:latest entrypoint: ["/bin/sh", "./entrypoint.sh"] expose: - "3000" volumes: - /home/user1/prova/immich:/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-microservices:latest entrypoint: ["/bin/sh", "./entrypoint.sh"] expose: - "3001" volumes: - /home/user1/prova/immich:/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:latest 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: mypassword POSTGRES_USER: user POSTGRES_DB: immich PG_DATA: /var/lib/postgresql/data volumes: - pgdata:/var/lib/postgresql/data ports: - 5432:5432 networks: - immich-network nginx: container_name: proxy_nginx image: nginx:latest volumes: - /home/user1/prova/nginx/settings/nginx-conf:/etc/nginx/conf.d ports: - 2283:80 - 2284:443 logging: driver: none networks: - immich-network depends_on: - immich-server restart: always networks: immich-network: volumes: pgdata: ```
Author
Owner

@alextran1502 commented on GitHub (May 23, 2022):

Hello, can you navigate to http://ip:2283/server-info/ping and let me know what you see there?

@alextran1502 commented on GitHub (May 23, 2022): Hello, can you navigate to `http://ip:2283/server-info/ping` and let me know what you see there?
Author
Owner

@alextran1502 commented on GitHub (May 23, 2022):

Can you try to run the app first with the default setting from the repo? I would like to isolate the possibility that there might be some bugs going on with the server. After that, we can try your setting and fix the bug.

@alextran1502 commented on GitHub (May 23, 2022): Can you try to run the app first with the default setting from the repo? I would like to isolate the possibility that there might be some bugs going on with the server. After that, we can try your setting and fix the bug.
Author
Owner

@alextran1502 commented on GitHub (May 23, 2022):

Can you also share your redacted .env file and your nginx setting?

@alextran1502 commented on GitHub (May 23, 2022): Can you also share your redacted .env file and your nginx setting?
Author
Owner

@Antonet99 commented on GitHub (May 23, 2022):

Hello, can you navigate to http://ip:2283/server-info/ping and let me know what you see there?

It doesn't load the page...and that's very strange because I have the "Server Status OK" on the web app page...

Can you try to run the app first with the default setting from the repo? I would like to isolate the possibility that there might be some bugs going on with the server. After that, we can try your setting and fix the bug.

With "default setting" what do you mean? I cloned the repo in a dir and only modified the compose file to chang directories path and and Postgres user/password, then I modified the IP address in the env file and deployed. Maybe I'm doing something wrong...

Can you also share your redacted .env file and your nginx setting?

I apologize if I'm doing something stupid/wrong!

###################################################################################
# Database
###################################################################################
DB_USERNAME=user
DB_PASSWORD=mypassword
DB_DATABASE_NAME=immich
###################################################################################
# Upload File Config
###################################################################################
UPLOAD_LOCATION=/home/user1/test/upload
###################################################################################
# JWT SECRET
################################################################################## 
JWT_SECRET=randomstringthatissolongandpowerfulthatnoonecanguess _(I didn't change this one, I was only testing the app)_
###################################################################################
# MAPBOX
####################################################################################
# ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY
ENABLE_MAPBOX=false
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
VITE_SERVER_ENDPOINT=http://192.168.1.65:2283
@Antonet99 commented on GitHub (May 23, 2022): > Hello, can you navigate to `http://ip:2283/server-info/ping` and let me know what you see there? It doesn't load the page...and that's very strange because I have the "Server Status OK" on the web app page... > Can you try to run the app first with the default setting from the repo? I would like to isolate the possibility that there might be some bugs going on with the server. After that, we can try your setting and fix the bug. With "default setting" what do you mean? I cloned the repo in a dir and only modified the compose file to chang directories path and and Postgres user/password, then I modified the IP address in the env file and deployed. Maybe I'm doing something wrong... > Can you also share your redacted .env file and your nginx setting? I apologize if I'm doing something stupid/wrong! ``` ################################################################################### # Database ################################################################################### DB_USERNAME=user DB_PASSWORD=mypassword DB_DATABASE_NAME=immich ################################################################################### # Upload File Config ################################################################################### UPLOAD_LOCATION=/home/user1/test/upload ################################################################################### # JWT SECRET ################################################################################## JWT_SECRET=randomstringthatissolongandpowerfulthatnoonecanguess _(I didn't change this one, I was only testing the app)_ ################################################################################### # MAPBOX #################################################################################### # ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY ENABLE_MAPBOX=false 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 VITE_SERVER_ENDPOINT=http://192.168.1.65:2283 ```
Author
Owner

@alextran1502 commented on GitHub (May 23, 2022):

No problem here, I think the problem might be the Nginx setting. Can you use the same Nginx setting from the repo?

I saw that you also replace these lines in your docker-compose

volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload

If you replace that value, the server won't be able to upload the file correctly, because you have two different values in your docker-compose /home/user1/prova/immich compares to the UPLOAD_LOCATION=/home/user1/test/upload in the .env file. You can keep the ${UPLOAD_LOCATION}:/usr/src/app/upload in the docker-compose as is and specify the location you want to photos/videos to be uploaded to in the .env

@alextran1502 commented on GitHub (May 23, 2022): No problem here, I think the problem might be the Nginx setting. Can you use the same Nginx setting from the repo? I saw that you also replace these lines in your docker-compose ``` volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload ``` If you replace that value, the server won't be able to upload the file correctly, because you have two different values in your docker-compose `/home/user1/prova/immich` compares to the `UPLOAD_LOCATION=/home/user1/test/upload` in the `.env` file. You can keep the `${UPLOAD_LOCATION}:/usr/src/app/upload` in the docker-compose as is and specify the location you want to photos/videos to be uploaded to in the `.env`
Author
Owner

@Antonet99 commented on GitHub (May 23, 2022):

Ok I edited back the upload location and now it seems ok...however about the Nginx server, I copied the nginx.conf (same as in the repo) file in the /home/user1/prova/nginx/settings/nginx-conf directory.

@Antonet99 commented on GitHub (May 23, 2022): Ok I edited back the upload location and now it seems ok...however about the Nginx server, I copied the nginx.conf (same as in the repo) file in the **/home/user1/prova/nginx/settings/nginx-conf** directory.
Author
Owner

@Antonet99 commented on GitHub (May 23, 2022):

Ok problem solved, maybe it was the nginx conf file, now it's working and I'm able to navigate the web app. Thank you for your help and your patience. Good luck with the development!

@Antonet99 commented on GitHub (May 23, 2022): Ok problem solved, maybe it was the nginx conf file, now it's working and I'm able to navigate the web app. Thank you for your help and your patience. Good luck with the development!
Author
Owner

@alextran1502 commented on GitHub (May 23, 2022):

No problem, you can leave the Nginx setting from the server as is, it doesn't interfere with your Nginx setting. It is there for load balancing purposes, port 80 and 443 are mapped to 2283 and 2284 which shouldn't be in conflict with anything else.

Give it a test on the mobile app and let me know if you have any additional questions. I am closing this issue now

@alextran1502 commented on GitHub (May 23, 2022): No problem, you can leave the Nginx setting from the server as is, it doesn't interfere with your Nginx setting. It is there for load balancing purposes, port 80 and 443 are mapped to 2283 and 2284 which shouldn't be in conflict with anything else. Give it a test on the mobile app and let me know if you have any additional questions. I am closing this issue now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#73