request to http://Ipserver:2283/user/count failed #80

Closed
opened 2026-02-19 23:04:48 -05:00 by deekerman · 13 comments
Owner

Originally created by @GulyFMG on GitHub (May 26, 2022).

Describe the bug
I have tried to deploy this on a raspberry pi 4 with no success.

When i access IP:2285 i get the following error:

`500

request to http://192.168.69.10:2283/user/count failed, reason: read ECONNRESET
FetchError: request to http://192.168.69.10:2283/user/count failed, reason: read ECONNRESET`

This is my docker-compose file.
`version: "3.8"

services:
immich-server:
image: altran1502/immich-server:latest
entrypoint: ["/bin/sh", "./entrypoint.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-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: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
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:
- ./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:`

Im also attaching the logs for each of the containers, alas the Nginx server is the only one i cannot see the logs but its running and has published ports.

_immich_postgres_logs.txt
_immich-immich-web-1_logs.txt
_immich-immich-server-1_logs.txt
_immich_redis_logs.txt

Originally created by @GulyFMG on GitHub (May 26, 2022). **Describe the bug** I have tried to deploy this on a raspberry pi 4 with no success. When i access IP:2285 i get the following error: `500 request to http://192.168.69.10:2283/user/count failed, reason: read ECONNRESET FetchError: request to http://192.168.69.10:2283/user/count failed, reason: read ECONNRESET` This is my docker-compose file. `version: "3.8" services: immich-server: image: altran1502/immich-server:latest entrypoint: ["/bin/sh", "./entrypoint.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-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: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} 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: - ./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:` Im also attaching the logs for each of the containers, alas the Nginx server is the only one i cannot see the logs but its running and has published ports. [_immich_postgres_logs.txt](https://github.com/alextran1502/immich/files/8780370/_immich_postgres_logs.txt) [_immich-immich-web-1_logs.txt](https://github.com/alextran1502/immich/files/8780371/_immich-immich-web-1_logs.txt) [_immich-immich-server-1_logs.txt](https://github.com/alextran1502/immich/files/8780372/_immich-immich-server-1_logs.txt) [_immich_redis_logs.txt](https://github.com/alextran1502/immich/files/8780373/_immich_redis_logs.txt)
Author
Owner

@millie75 commented on GitHub (May 26, 2022):

I have the same issue - can't access either http://ip:2283 or http://ip:2285

immich-web_1_cdc0a1a55d3b | FetchError: request to http://192.168.123.244:2283/user/count failed, reason: socket hang up
immich-web_1_cdc0a1a55d3b | at ClientRequest. (file:///usr/src/app/build/shims-eb608bdd.js:6246:11)
immich-web_1_cdc0a1a55d3b | at ClientRequest.emit (node:events:527:28)
immich-web_1_cdc0a1a55d3b | at Socket.socketOnEnd (node:_http_client:478:9)
immich-web_1_cdc0a1a55d3b | at Socket.emit (node:events:539:35)
immich-web_1_cdc0a1a55d3b | at endReadableNT (node:internal/streams/readable:1345:12)
immich-web_1_cdc0a1a55d3b | at processTicksAndRejections (node:internal/process/task_queues:83:21)
immich-web_1_cdc0a1a55d3b | FetchError: request to http://192.168.123.244:2283/user/count failed, reason: read ECONNRESET
immich-web_1_cdc0a1a55d3b | at ClientRequest. (file:///usr/src/app/build/shims-eb608bdd.js:6246:11)
immich-web_1_cdc0a1a55d3b | at ClientRequest.emit (node:events:527:28)
immich-web_1_cdc0a1a55d3b | at Socket.socketErrorListener (node:_http_client:454:9)
immich-web_1_cdc0a1a55d3b | at Socket.emit (node:events:527:28)
immich-web_1_cdc0a1a55d3b | at emitErrorNT (node:internal/streams/destroy:157:8)
immich-web_1_cdc0a1a55d3b | at emitErrorCloseNT (node:internal/streams/destroy:122:3)
immich-web_1_cdc0a1a55d3b | at processTicksAndRejections (node:internal/process/task_queues:83:21)
immich-web_1_cdc0a1a55d3b | FetchError: request to http://192.168.123.244:2283/user/count failed, reason: socket hang up
immich-web_1_cdc0a1a55d3b | at ClientRequest. (file:///usr/src/app/build/shims-eb608bdd.js:6246:11)
immich-web_1_cdc0a1a55d3b | at ClientRequest.emit (node:events:527:28)
immich-web_1_cdc0a1a55d3b | at Socket.socketOnEnd (node:_http_client:478:9)
immich-web_1_cdc0a1a55d3b | at Socket.emit (node:events:539:35)
immich-web_1_cdc0a1a55d3b | at endReadableNT (node:internal/streams/readable:1345:12)
immich-web_1_cdc0a1a55d3b | at processTicksAndRejections (node:internal/process/task_queues:83:21)

@millie75 commented on GitHub (May 26, 2022): I have the same issue - can't access either http://ip:2283 or http://ip:2285 immich-web_1_cdc0a1a55d3b | FetchError: request to http://192.168.123.244:2283/user/count failed, reason: socket hang up immich-web_1_cdc0a1a55d3b | at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11) immich-web_1_cdc0a1a55d3b | at ClientRequest.emit (node:events:527:28) immich-web_1_cdc0a1a55d3b | at Socket.socketOnEnd (node:_http_client:478:9) immich-web_1_cdc0a1a55d3b | at Socket.emit (node:events:539:35) immich-web_1_cdc0a1a55d3b | at endReadableNT (node:internal/streams/readable:1345:12) immich-web_1_cdc0a1a55d3b | at processTicksAndRejections (node:internal/process/task_queues:83:21) immich-web_1_cdc0a1a55d3b | FetchError: request to http://192.168.123.244:2283/user/count failed, reason: read ECONNRESET immich-web_1_cdc0a1a55d3b | at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11) immich-web_1_cdc0a1a55d3b | at ClientRequest.emit (node:events:527:28) immich-web_1_cdc0a1a55d3b | at Socket.socketErrorListener (node:_http_client:454:9) immich-web_1_cdc0a1a55d3b | at Socket.emit (node:events:527:28) immich-web_1_cdc0a1a55d3b | at emitErrorNT (node:internal/streams/destroy:157:8) immich-web_1_cdc0a1a55d3b | at emitErrorCloseNT (node:internal/streams/destroy:122:3) immich-web_1_cdc0a1a55d3b | at processTicksAndRejections (node:internal/process/task_queues:83:21) immich-web_1_cdc0a1a55d3b | FetchError: request to http://192.168.123.244:2283/user/count failed, reason: socket hang up immich-web_1_cdc0a1a55d3b | at ClientRequest.<anonymous> (file:///usr/src/app/build/shims-eb608bdd.js:6246:11) immich-web_1_cdc0a1a55d3b | at ClientRequest.emit (node:events:527:28) immich-web_1_cdc0a1a55d3b | at Socket.socketOnEnd (node:_http_client:478:9) immich-web_1_cdc0a1a55d3b | at Socket.emit (node:events:539:35) immich-web_1_cdc0a1a55d3b | at endReadableNT (node:internal/streams/readable:1345:12) immich-web_1_cdc0a1a55d3b | at processTicksAndRejections (node:internal/process/task_queues:83:21)
Author
Owner

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

@millie75 @GulyFMG What do you guy put in for VITE_SERVER_ENDPOINT in the .env file?

@alextran1502 commented on GitHub (May 26, 2022): @millie75 @GulyFMG What do you guy put in for `VITE_SERVER_ENDPOINT` in the .env file?
Author
Owner

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

Also what is the reponse when you put http://ip:2283/user/count to the web browser?

@alextran1502 commented on GitHub (May 26, 2022): Also what is the reponse when you put `http://ip:2283/user/count` to the web browser?
Author
Owner

@GulyFMG commented on GitHub (May 26, 2022):

@alextran1502

image

as requested http://ip:2283/user/count i have unable to connect.

@GulyFMG commented on GitHub (May 26, 2022): @alextran1502 ![image](https://user-images.githubusercontent.com/41542940/170540652-e620b025-f09e-4a34-b71c-eddfc98e531b.png) as requested http://ip:2283/user/count i have unable to connect.
Author
Owner

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

@GulyFMG Hmm, this mean it is the server's problem, did you change anything in the Nginx configuration file?

Can you commented out the lines below

logging:
driver: none

in the Docker-compose file for the Nginx container and restart everything to see if it output something suspiciously on the Nginx side? The log of the server looks fine

@alextran1502 commented on GitHub (May 26, 2022): @GulyFMG Hmm, this mean it is the server's problem, did you change anything in the Nginx configuration file? Can you commented out the lines below ``` logging: driver: none ``` in the Docker-compose file for the Nginx container and restart everything to see if it output something suspiciously on the Nginx side? The log of the server looks fine
Author
Owner

@millie75 commented on GitHub (May 26, 2022):

image

as requested http://ip:2283/user/count i have unable to connect.

@millie75 commented on GitHub (May 26, 2022): ![image](https://user-images.githubusercontent.com/51971269/170543457-f1611400-1121-4fda-abc4-aa3e3c8f1ea3.png) as requested http://ip:2283/user/count i have unable to connect.
Author
Owner

@millie75 commented on GitHub (May 26, 2022):

Also get this
immich-server_2_c4fb27b63572 | [Nest] 50 - 05/26/2022, 4:25:24 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
immich-server_2_c4fb27b63572 | QueryFailedError: relation "migrations" already exists
immich-server_2_c4fb27b63572 | at QueryFailedError.TypeORMError [as constructor] (/usr/src/app/node_modules/typeorm/error/TypeORMError.js:9:28)
immich-server_2_c4fb27b63572 | at new QueryFailedError (/usr/src/app/node_modules/typeorm/error/QueryFailedError.js:13:28)
immich-server_2_c4fb27b63572 | at PostgresQueryRunner. (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:250:31)
immich-server_2_c4fb27b63572 | at step (/usr/src/app/node_modules/tslib/tslib.js:143:27)
immich-server_2_c4fb27b63572 | at Object.throw (/usr/src/app/node_modules/tslib/tslib.js:124:57)
immich-server_2_c4fb27b63572 | at rejected (/usr/src/app/node_modules/tslib/tslib.js:115:69)
immich-server_2_c4fb27b63572 | at processTicksAndRejections (node:internal/process/task_queues:96:5)

@millie75 commented on GitHub (May 26, 2022): Also get this immich-server_2_c4fb27b63572 | [Nest] 50 - 05/26/2022, 4:25:24 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)... immich-server_2_c4fb27b63572 | QueryFailedError: relation "migrations" already exists immich-server_2_c4fb27b63572 | at QueryFailedError.TypeORMError [as constructor] (/usr/src/app/node_modules/typeorm/error/TypeORMError.js:9:28) immich-server_2_c4fb27b63572 | at new QueryFailedError (/usr/src/app/node_modules/typeorm/error/QueryFailedError.js:13:28) immich-server_2_c4fb27b63572 | at PostgresQueryRunner.<anonymous> (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:250:31) immich-server_2_c4fb27b63572 | at step (/usr/src/app/node_modules/tslib/tslib.js:143:27) immich-server_2_c4fb27b63572 | at Object.throw (/usr/src/app/node_modules/tslib/tslib.js:124:57) immich-server_2_c4fb27b63572 | at rejected (/usr/src/app/node_modules/tslib/tslib.js:115:69) immich-server_2_c4fb27b63572 | at processTicksAndRejections (node:internal/process/task_queues:96:5)
Author
Owner

@millie75 commented on GitHub (May 26, 2022):

proxy_nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
proxy_nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
proxy_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
proxy_nginx | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
proxy_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
proxy_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
proxy_nginx | /docker-entrypoint.sh: Configuration complete; ready for start up
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: using the "epoll" event method
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: nginx/1.21.3
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: built by gcc 8.3.0 (Debian 8.3.0-6)
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: OS: Linux 5.10.0-9-amd64
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker processes
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 21
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 22
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 23
proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 24
immich-web_1_e1d3a3f4a730 | ✓ 687 modules transformed.

@millie75 commented on GitHub (May 26, 2022): proxy_nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration proxy_nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ proxy_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh proxy_nginx | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist proxy_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh proxy_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh proxy_nginx | /docker-entrypoint.sh: Configuration complete; ready for start up proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: using the "epoll" event method proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: nginx/1.21.3 proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: built by gcc 8.3.0 (Debian 8.3.0-6) proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: OS: Linux 5.10.0-9-amd64 proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker processes proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 21 proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 22 proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 23 proxy_nginx | 2022/05/26 17:40:28 [notice] 1#1: start worker process 24 immich-web_1_e1d3a3f4a730 | ✓ 687 modules transformed.
Author
Owner

@GulyFMG commented on GitHub (May 26, 2022):

@alextran1502
as requested i have commented out the logging, im starting to think this is a permission issue / missing file on the folder /immich/settings/nginx-conf on my machine its empty. And the user that is running docker is dietpi with GUID 1000 and UID also 1000.
image

Edit:
i have troubleshoot it a little more and I have changed the permissions on the folder to 777 and copied your config file from https://github.com/alextran1502/immich/tree/main/docker/settings/nginx-conf

i am now able to access the web front

image

@GulyFMG commented on GitHub (May 26, 2022): @alextran1502 as requested i have commented out the logging, im starting to think this is a permission issue / missing file on the folder /immich/settings/nginx-conf on my machine its empty. And the user that is running docker is dietpi with GUID 1000 and UID also 1000. ![image](https://user-images.githubusercontent.com/41542940/170545136-70448a2b-2d7c-4239-991f-18bc17761c7e.png) Edit: i have troubleshoot it a little more and I have changed the permissions on the folder to 777 and copied your config file from https://github.com/alextran1502/immich/tree/main/docker/settings/nginx-conf i am now able to access the web front ![image](https://user-images.githubusercontent.com/41542940/170546515-c0d12eae-5955-4d4b-941b-e9521459a780.png)
Author
Owner

@GulyFMG commented on GitHub (May 26, 2022):

@alextran1502
So i nuked my install and started anew, the problem is that on creation the file nginx.conf is not created on the folder /immich/settings/nginx-conf i have download the nginx.conf and restarted the Nginx portion and all is well now.

image

@GulyFMG commented on GitHub (May 26, 2022): @alextran1502 So i nuked my install and started anew, the problem is that on creation the file nginx.conf is not created on the folder /immich/settings/nginx-conf i have download the nginx.conf and restarted the Nginx portion and all is well now. ![image](https://user-images.githubusercontent.com/41542940/170549287-075da2f3-dcee-4fab-a7d6-ab0597da4012.png)
Author
Owner

@millie75 commented on GitHub (May 26, 2022):

be nice to have a docker-compose that worked

@millie75 commented on GitHub (May 26, 2022): be nice to have a docker-compose that worked
Author
Owner

@millie75 commented on GitHub (May 26, 2022):

@alextran1502 So i nuked my install and started anew, the problem is that on creation the file nginx.conf is not created on the folder /immich/settings/nginx-conf i have download the nginx.conf and restarted the Nginx portion and all is well now.

image

what is the contents of your nginx.conf file

@millie75 commented on GitHub (May 26, 2022): > @alextran1502 So i nuked my install and started anew, the problem is that on creation the file nginx.conf is not created on the folder /immich/settings/nginx-conf i have download the nginx.conf and restarted the Nginx portion and all is well now. > > ![image](https://user-images.githubusercontent.com/41542940/170549287-075da2f3-dcee-4fab-a7d6-ab0597da4012.png) what is the contents of your nginx.conf file
Author
Owner

@GulyFMG commented on GitHub (May 26, 2022):

@millie75 its on @alextran1502 github just copy this - https://raw.githubusercontent.com/alextran1502/immich/main/docker/settings/nginx-conf/nginx.conf

@GulyFMG commented on GitHub (May 26, 2022): @millie75 its on @alextran1502 github just copy this - https://raw.githubusercontent.com/alextran1502/immich/main/docker/settings/nginx-conf/nginx.conf
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#80
No description provided.