Unable to upload video through domain name, but internal IP works.
Thanks for taking the time and review my case. So I tried to upload a 300mb video file through the web browser, but it just stopped at 0%. The message would go away after I refresh the screen. I tried uploading an image and it came out okay. I upload the video file again through internal IP, and it worked.
I use nginx proxy manager and learned that I should put max-client-body-size to zero to no avail.
I checked cloudflare and made sure no tunnel was set.
So I am all out of ideas. I'm not all that techy when it comes to containers. Please help me troubleshoot it. Thanks.
12 Replies
Check the logs of the containers (including your proxy), they'll say why it failed
From the server container:
[Nest] 1 - 05/14/2023, 1:52:19 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP.<anonymous> (node:net:709:12)
That's a known error that isn't a problem, what about the other containers
Any specific ones? I cannot retrieve log from typesense and proxy through portainer. The others seem fine. Let me post them here.
immich_web:
Listening on 0.0.0.0:3000
immich_postgres:
PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-05-14 13:29:11.018 UTC [1] LOG: starting PostgreSQL 14.8 (Debian 14.8-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-05-14 13:29:11.045 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-05-14 13:29:11.045 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-05-14 13:29:11.058 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-05-14 13:29:11.074 UTC [28] LOG: database system was shut down at 2023-05-14 13:28:58 UTC
2023-05-14 13:29:11.087 UTC [1] LOG: database system is ready to accept connections
immich_machine_learning:
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:3003 (Press CTRL+C to quit)
immich_microservices:
[Nest] 1 - 05/14/2023, 1:29:13 PM LOG [ImmichMicroservice] Running Immich Microservices in PRODUCTION environment - version 1.55.1 - Listening on port: 3002
[Nest] 1 - 05/14/2023, 1:29:22 PM LOG [MetadataExtractionProcessor] Reverse Geocoding Initialized
And your own reverse proxy?
uh... I don't know how to get to that. Let me try and find out.
okay. I got it. There's an error log with whole bunch of the same stuff. I'll just post the recent ones.
2023/05/14 13:52:19 [warn] 900#900: *24714 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/6/97/0000000976 while reading upstream, client: 162.158.118.191, server: photo.domain.com, request: "GET /api/asset/file/c1c915a3-e9fb-4911-a5fc-6e7db8c6d441?isThumb=false&isWeb=true HTTP/2.0", upstream: "http://192.168.1.10:2283/api/asset/file/c1c915a3-e9fb-4911-a5fc-6e7db8c6d441?isThumb=false&isWeb=true", host: "photo.domain.com", referrer: "https://photo.domain.com/photos"
2023/05/14 14:09:58 [warn] 900#900: *26183 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/9/97/0000000979 while reading upstream, client: 162.158.118.190, server: photo.domain.com, request: "GET /api/user/profile-image/e4174d3f-35b9-49b2-b14e-624e3f50f546 HTTP/2.0", upstream: "http://192.168.1.10:2283/api/user/profile-image/e4174d3f-35b9-49b2-b14e-624e3f50f546", host: "photo.domain.com", referrer: "https://photo.domain.com/photos"
2023/05/14 13:34:11 [warn] 900#900: *24418 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/4/97/0000000974 while reading upstream, client: 162.158.118.238, server: photo.domain.com, request: "GET /api/user/profile-image/e4174d3f-35b9-49b2-b14e-624e3f50f546 HTTP/2.0", upstream: "http://192.168.1.10:2283/api/user/profile-image/e4174d3f-35b9-49b2-b14e-624e3f50f546", host: "photo.domain.com", referrer: "https://photo.domain.com/photos"
Those aren't related/meaningful errors
Then the access log, also the last few lines:
[14/May/2023:14:10:09 +0000] - 201 201 - POST https photo.domain.com "/api/asset/time-bucket" [Client 162.158.118.191] [Length 40255] [Gzip -] [Sent-to 192.168.1.10] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42" "https://photo.domain.com/photos"
[14/May/2023:14:10:10 +0000] - 201 201 - POST https photo.domain.com "/api/asset/time-bucket" [Client 162.158.118.190] [Length 1685] [Gzip -] [Sent-to 192.168.1.10] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42" "https://photo.domain.com/photos"
[14/May/2023:14:10:20 +0000] - 304 304 - GET https photo.domain.com "/api/server-info/ping" [Client 162.158.118.191] [Length 0] [Gzip -] [Sent-to 192.168.1.10] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42" "https://photo.domain.com/photos"
[14/May/2023:14:10:20 +0000] - 200 200 - GET https photo.domain.com "/api/server-info" [Client 162.158.118.190] [Length 187] [Gzip -] [Sent-to 192.168.1.10] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42" "https://photo.domain.com/photos"
I guess these are not that helpful, either.
Unable to upload large files means a web server somewhere probably needs the upload limit increased.
I'm out of ideas:-(
Can you upload through your Nginx reverse proxy on local area network?
Through NginxProxyManager on lan? I don't get it. To be clear, I'm uploading video files from Lan. When I access immich through ip, it works, and when I do it through domain name, it doesn't respond.