[BUG] Connection to was not upgraded to websocket #1691

Closed
opened 2026-02-05 03:09:33 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @maffinca69 on GitHub (Nov 26, 2023).

The bug

When synchronizing a specific photo (maybe it's not just about 1 specific photo) the synchronization fails if you upload manually. When uploading automatically, it just hangs in place
I have shared albums and icloud photos disabled in principle. All photos and videos are stored on the device
The bug is only reproduced when connecting via https and public address. With local address and http there is no problem - the same photo is synchronized without problems
iOS 16.7.2
2023-11-26 10 49 39

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.88.2

Version of Immich Mobile App

v1.88.0

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
    depends_on:
      - redis
      - database
      - typesense
    ports:
      - 2283:3001
    restart: always

  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
      - typesense
    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

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:3995fe6ea6a619313e31046bd3c8643f9e70f8f2b294ff82659d409b47d06abb
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:874f566dd512d79cf74f59754833e869ae76ece96716d153b0fa3e64aec88d92
    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

volumes:
  pgdata:
  model-cache:
  tsdata:

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=/media/hdd/immich

# 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=TqBdDjHTcjL8LGMB7gKWtxYKCZ
DB_PASSWORD=postgres

# 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

1. Download photo from Internet (or any mobile app) 
2. Click upload file in view
3. See logs (also showed notification with error uploading)

Additional information

For https i use Nginx Unix (proxy subdmain to 2283 port)

{
        "match": {
          "host": "immich.***.com"
        },
        "action": {
          "proxy": "http://192.168.1.110:2283"
        }
      }
Originally created by @maffinca69 on GitHub (Nov 26, 2023). ### The bug When synchronizing a specific photo (maybe it's not just about 1 specific photo) the synchronization fails if you upload manually. When uploading automatically, it just hangs in place I have shared albums and icloud photos disabled in principle. All photos and videos are stored on the device The bug is only reproduced when connecting via https and public address. With local address and http there is no problem - the same photo is synchronized without problems iOS 16.7.2 ![2023-11-26 10 49 39](https://github.com/immich-app/immich/assets/35261681/ca9b80d6-97c2-4d02-9fb5-59eddb1b84af) ### The OS that Immich Server is running on Debian 12 ### Version of Immich Server v1.88.2 ### Version of Immich Mobile App v1.88.0 ### Platform with the issue - [X] Server - [ ] Web - [X] 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 depends_on: - redis - database - typesense ports: - 2283:3001 restart: always 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 - typesense 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 typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:3995fe6ea6a619313e31046bd3c8643f9e70f8f2b294ff82659d409b47d06abb restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:874f566dd512d79cf74f59754833e869ae76ece96716d153b0fa3e64aec88d92 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 volumes: pgdata: model-cache: tsdata: ``` ### 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=/media/hdd/immich # 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=TqBdDjHTcjL8LGMB7gKWtxYKCZ DB_PASSWORD=postgres # 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 1. Download photo from Internet (or any mobile app) 2. Click upload file in view 3. See logs (also showed notification with error uploading) ``` ### Additional information For https i use Nginx Unix (proxy subdmain to 2283 port) ``` { "match": { "host": "immich.***.com" }, "action": { "proxy": "http://192.168.1.110:2283" } } ```
Author
Owner

@jrasm91 commented on GitHub (Nov 26, 2023):

This sounds like a problem with your http server (proxy). Make sure it allows for connection upgrades for websockets.

@jrasm91 commented on GitHub (Nov 26, 2023): This sounds like a problem with your http server (proxy). Make sure it allows for connection upgrades for websockets.
Author
Owner

@maffinca69 commented on GitHub (Nov 27, 2023):

But issue only with one image. Other media is normally uploaded

@maffinca69 commented on GitHub (Nov 27, 2023): But issue only with one image. Other media is normally uploaded
Author
Owner

@jrasm91 commented on GitHub (Nov 27, 2023):

Sounds like an issue with trying to send a file that is bigger than your proxy allows.

@jrasm91 commented on GitHub (Nov 27, 2023): Sounds like an issue with trying to send a file that is bigger than your proxy allows.
Author
Owner

@maffinca69 commented on GitHub (Nov 28, 2023):

I'm up limits to 10GB. Everything seems fine now, thanks

@maffinca69 commented on GitHub (Nov 28, 2023): I'm up limits to 10GB. Everything seems fine now, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1691