I
Immich•2y ago
miknzau

Unable to access web UI proxy errors in startup logs. [error] 41#41: *1 connect() failed (111

I know I have had a lot of support questions lately, but I am still very new to immich and I have just CLI imported a library of 160k files. i apologise if my questions are too frequent. I was getting issues with the ML services failing but I managed to get into the UI enough to get to the settings page and turn off the ML features until I sort out the cliploader amazon thing. BUT now, even with ML services off, I cant use the web UI and it appears to be related to the proxy server. I have docker compose down and back up and also restarted docker engine. Attached is the full set of logs on startup and you can see the proxy errors at the bottom.
117 Replies
Alex Tran
Alex Tran•2y ago
for clip loading amazon thing, please refer to this comment https://github.com/immich-app/immich/issues/4117#issuecomment-1772790612 try docker-compose down then docker-compose up again, it should work
miknzau
miknzauOP•2y ago
I saw this but as I am running Docker on windows, I don't believe I can get inside the vm volume to put the files in /var/lib/docker/volumes/ ... or can I?
Alex Tran
Alex Tran•2y ago
yes you can hmm actually you might need to do some research 🙂
miknzau
miknzauOP•2y ago
Way cool - have made some discoveries Ok - thanks Alex - that was a success things are running much more smoothly now thank you
miknzau
miknzauOP•2y ago
My web UI is now getting stalled loading a websocket call. the page loads but wont scroll. I believe I have caught the culprit in the attached screen shot. This also appears in the proxy logs.
2023-10-21 02:59:08 2023/10/20 19:59:08 [error] 42#42: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjEgusE HTTP/1.1", upstream: "http://172.20.0.8:3001/socket.io/?EIO=4&transport=polling&t=OjEgusE", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/map"
2023-10-21 02:59:14 2023/10/20 19:59:14 [error] 42#42: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjEgwK4 HTTP/1.1", upstream: "http://172.20.0.8:3001/socket.io/?EIO=4&transport=polling&t=OjEgwK4", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/photos"
2023-10-21 02:59:14 2023/10/20 19:59:14 [error] 42#42: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjEgwK4 HTTP/1.1", upstream: "http://172.20.0.8:3001/socket.io/?EIO=4&transport=polling&t=OjEgwK4", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/map"
2023-10-21 02:59:08 2023/10/20 19:59:08 [error] 42#42: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjEgusE HTTP/1.1", upstream: "http://172.20.0.8:3001/socket.io/?EIO=4&transport=polling&t=OjEgusE", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/map"
2023-10-21 02:59:14 2023/10/20 19:59:14 [error] 42#42: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjEgwK4 HTTP/1.1", upstream: "http://172.20.0.8:3001/socket.io/?EIO=4&transport=polling&t=OjEgwK4", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/photos"
2023-10-21 02:59:14 2023/10/20 19:59:14 [error] 42#42: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjEgwK4 HTTP/1.1", upstream: "http://172.20.0.8:3001/socket.io/?EIO=4&transport=polling&t=OjEgwK4", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/map"
`
No description
miknzau
miknzauOP•2y ago
`PS I:\> docker container inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}},{{end}}{{.Name}},{{.Config.ExposedPorts}}' $(docker ps --all --quiet)
172.20.0.9,/immich_proxy,map[8080/tcp:{}]
172.20.0.8,/immich_server,map[3001/tcp:{}]
172.20.0.7,/immich_microservices,map[3001/tcp:{}]
172.20.0.4,/immich_postgres,map[5432/tcp:{}]
172.20.0.3,/immich_web,map[3000/tcp:{}]
172.20.0.6,/immich_machine_learning,map[]
172.20.0.5,/immich_redis,map[6379/tcp:{}]
172.20.0.2,/immich_typesense,map[8108/tcp:{}]
`PS I:\> docker container inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}},{{end}}{{.Name}},{{.Config.ExposedPorts}}' $(docker ps --all --quiet)
172.20.0.9,/immich_proxy,map[8080/tcp:{}]
172.20.0.8,/immich_server,map[3001/tcp:{}]
172.20.0.7,/immich_microservices,map[3001/tcp:{}]
172.20.0.4,/immich_postgres,map[5432/tcp:{}]
172.20.0.3,/immich_web,map[3000/tcp:{}]
172.20.0.6,/immich_machine_learning,map[]
172.20.0.5,/immich_redis,map[6379/tcp:{}]
172.20.0.2,/immich_typesense,map[8108/tcp:{}]
immich_server has no complaints in its log:
miknzau
miknzauOP•2y ago
Should this not say
http://172.20.0.8:3001
http://172.20.0.8:3001
?
No description
Alex Tran
Alex Tran•2y ago
No, that is fine, I believe it is the denote of the localhost I have a feeling the proxy container has issue docker on Windows always behave like that, with lots of issues :/
miknzau
miknzauOP•2y ago
hmm this only started today though.. i have made no system changes today prior to changing the ML files as per your advice (which solved that issue)
Alex Tran
Alex Tran•2y ago
yeah I am not sure why it is running fine and then having issue is there anything still running in the background to process upload?
miknzau
miknzauOP•2y ago
i.e is the upload folder empty? or are there any active jobs?
Alex Tran
Alex Tran•2y ago
is there any active jobs?
miknzau
miknzauOP•2y ago
Nope. all clear
No description
Alex Tran
Alex Tran•2y ago
go back to the timeline is the issue still persist?
miknzau
miknzauOP•2y ago
yep it works fine until i scroll a bit
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
then when it freezes I see that socket connection stalled in teh console
Alex Tran
Alex Tran•2y ago
Do you see any red error in the console tab?
miknzau
miknzauOP•2y ago
nope
Alex Tran
Alex Tran•2y ago
if you refresh the page and don't scroll wait a bit then scroll does it work just want to make sure that not some issue with rendering the assets causing the issue but websocket connection
miknzau
miknzauOP•2y ago
how long should i wait before attempting to scroll
Alex Tran
Alex Tran•2y ago
like a minute or 2
miknzau
miknzauOP•2y ago
ok ok yes i can scroll now 😕 still can see that stalled connection in the network console but its working like normal
Alex Tran
Alex Tran•2y ago
and does it freeze after a while again?
miknzau
miknzauOP•2y ago
so what can you conclude from that? let me try freeze it no i can not freeze it strange should i reload the photos page and then try to scroll more or less right away again? ok so it gets weird... I opened /admin/server-status in a separate tab to see the size of my library.. and when i went back to the tabe i had open with the timeline view - its totally frozen now
Alex Tran
Alex Tran•2y ago
What is the server CPU's load?
miknzau
miknzauOP•2y ago
nothing
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
pressing refresh on the photos page i am just seeing
No description
miknzau
miknzauOP•2y ago
and
No description
miknzau
miknzauOP•2y ago
in the footer nothing in console
miknzau
miknzauOP•2y ago
immich_web log
`
`
Alex Tran
Alex Tran•2y ago
Hmm I have no clue now why it happens
miknzau
miknzauOP•2y ago
refresh that log view and the end is now 2023-10-21 03:45:59 data: { statusCode: 500, message: 'Internal server error' } 2023-10-21 03:45:59 } 2023-10-21 03:45:59 } 2023-10-21 03:52:10 Listening on 0.0.0.0:3000 so 52 is now
Alex Tran
Alex Tran•2y ago
so the web container just restarted
miknzau
miknzauOP•2y ago
all the admin pages load like lightning too btw\ like they are not dead
Alex Tran
Alex Tran•2y ago
@jrasm91 Do you have any thoughts on this issue? Hmm
miknzau
miknzauOP•2y ago
could it be related to the size of the gallery?
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
overlaoding the DOM or soemthing
Alex Tran
Alex Tran•2y ago
No we use lazy loading on the web so it only query for what is on the screen Ah
miknzau
miknzauOP•2y ago
let me try another browser like Edge or something
Alex Tran
Alex Tran•2y ago
Ok do that and just a thoughts is there any one month that you have more than 6-7000 photos taken
Alex Tran
Alex Tran•2y ago
Can you filter oput time-buckets in the network tab?
No description
miknzau
miknzauOP•2y ago
hmm in a single month? possibly i had some years with 20,000 or more i cant be sure though
Alex Tran
Alex Tran•2y ago
years should be fine try to filter out that and grab me the preview
miknzau
miknzauOP•2y ago
yep trying to get it to load again... it locked up in edge too same behaviour
Alex Tran
Alex Tran•2y ago
let's get the time-buckets request to see if you have any month that have absurd amount of assets
miknzau
miknzauOP•2y ago
proxy seems to have auto shut down
No description
miknzau
miknzauOP•2y ago
it auto started
No description
miknzau
miknzauOP•2y ago
this is just bizzare - all the admin pages are loading fine, and yet i cant get the photos page to render ANYTHING like its a white page with a spinning loading in the tab
Alex Tran
Alex Tran•2y ago
Can you help me with the request above?
miknzau
miknzauOP•2y ago
no, becuase i cant get the photo page to load at all
miknzau
miknzauOP•2y ago
thats what i am seeing
No description
Alex Tran
Alex Tran•2y ago
now do this, bring down the whole stack with docker-compose down then docker-compose pull and docker-compose up
miknzau
miknzauOP•2y ago
ok ok so pull pulled nothiong so I was up to date lol I forgot the -d on the compose command so now I know what that does 🙂 log spam ok photo page photo page up and running shit i forgot to open dev tools before I loaded it so then i opend dev tools - pressed refresh and its locked up again
Alex Tran
Alex Tran•2y ago
🤔
miknzau
miknzauOP•2y ago
i cant get it to load at all now have down down and up again no avail I am goin gto reboot the pc going to back in 5
Alex Tran
Alex Tran•2y ago
okay
miknzau
miknzauOP•2y ago
preview is blank
No description
Alex Tran
Alex Tran•2y ago
HMm can you try create a new Immich instance, upload a few dozen assets and see if it ever freeze
miknzau
miknzauOP•2y ago
good idea can i be sure my backup is sound? is there a way to integrity check it? it's a 1.8GB .sql file
Alex Tran
Alex Tran•2y ago
I just keep this instance and not removing anything
miknzau
miknzauOP•2y ago
(i didn't gzip it)
Alex Tran
Alex Tran•2y ago
I think by setting the project name in docker-compose file, it will split it regarding the volume
miknzau
miknzauOP•2y ago
oh - how do I have more than one instance?
Alex Tran
Alex Tran•2y ago
just change the port in docker-compose for web container to something different than 2283 you have to create a new folder on your machine with a new docker-compose and .env files though
miknzau
miknzauOP•2y ago
yep ok I get you
Alex Tran
Alex Tran•2y ago
Just to make sure, what is the output of your docker volume ls?
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
the docker UI gives some more insight into those volumes
No description
Alex Tran
Alex Tran•2y ago
hmm so they are not splitted by project, did you use the project feature in docker-compose?
miknzau
miknzauOP•2y ago
i dont believe so, but I did need to put COMPOSE_PROJECT_NAME=immich in my .env becuase remember I am running it in the root of a hdd and so it didnt have a folder name to assume as the project name
Alex Tran
Alex Tran•2y ago
Okay, let create a different project name for the test instnace
miknzau
miknzauOP•2y ago
all those volumes are immich instances btw, i dont run anything else in docker yes I will set COMPOSE_PROJECT_NAME=test-immich and run from a different hdd\ oops i forgot to set a different port should be ok though ok clean isntall is up should i use the CLI upload to send up some files or just use the web UI
jrasm91
jrasm91•2y ago
Just try browsing /api/asset/time-bucket
miknzau
miknzauOP•2y ago
have a new install up now
jrasm91
jrasm91•2y ago
https://demo.immich.app/api/asset/time-buckets?size=MONTH This is what Alex is looking for. I would guess your disk io is maxed out.
miknzau
miknzauOP•2y ago
on the new install i see that
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
disk i/o maxed out at what point? all resources were idle pretty much when things were dead Ok so to confirm the new install has 578 photos, is working fast as ligtening with no issues..... it should be noted, that even though it is most likely unrelated to the issues I was having, that this is still in the proxy log
2023-10-21 04:38:03 2023/10/20 21:38:03 [error] 41#41: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjF1Twe HTTP/1.1", upstream: "http://172.19.0.7:3001/socket.io/?EIO=4&transport=polling&t=OjF1Twe", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/map"
2023-10-21 04:38:03 2023/10/20 21:38:03 [error] 41#41: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: , request: "GET /api/socket.io/?EIO=4&transport=polling&t=OjF1Twe HTTP/1.1", upstream: "http://172.19.0.7:3001/socket.io/?EIO=4&transport=polling&t=OjF1Twe", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/map"
So whre does thaat leave us? disk i/o maxed out at what point? i don't follow as disk resources were not high at all when the page was not loading I am heading to bed 5am here.. I will bring the old instance back up so we can trouble shoot more later. ok have the old troublesome instance back up successfully - can confirm disk activity is zero when loading fails
miknzau
miknzauOP•2y ago
If I load /api/asset/time-buckets?size=MONTH before trying to load the UI then I do get a result...
No description
jrasm91
jrasm91•2y ago
Looks like 4k assets in the first bucket
miknzau
miknzauOP•2y ago
when I load the web UI, before touching it I see three time buckets in the console
miknzau
miknzauOP•2y ago
No description
miknzau
miknzauOP•2y ago
all of them are empty when i click "preview"on them one has status 304 and the other two 200
miknzau
miknzauOP•2y ago
miknzau
miknzauOP•2y ago
Ok thanks both ttyl need to zzz
jrasm91
jrasm91•2y ago
5am oh boy lololol
miknzau
miknzauOP•2y ago
Good afternoon, has anyone had any thoughts on next steps to try and resolve my issue? @Alex any further ideas? I can say that my library is working super fast and flawlessly from the IOS app
jrasm91
jrasm91•2y ago
I think you need to narrow down the issue. It is hard to troubleshoot such a general problem. Can you start with a smaller library and add more photos until it stops working?
miknzau
miknzauOP•2y ago
well it was flawless with 570 photos, and my library is 160,000 so i am not sure how many increments I would need to try? are there other users with large librarys and no such issue? also is it definately unrelated to this error can we say?
[error] 41#41: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.21.0.1, server: , request: "GET /api/server-info HTTP/1.1", upstream: "http://172.21.0.8:3001/server-info", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/photos"
[error] 41#41: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.21.0.1, server: , request: "GET /api/server-info HTTP/1.1", upstream: "http://172.21.0.8:3001/server-info", host: "192.168.1.188:2283", referrer: "http://192.168.1.188:2283/photos"
jrasm91
jrasm91•2y ago
We have other people with 200k+ and it works fine. So it could be a photos distribution problem (a lot of photos on one day), or a hardware problem (disk read speed is insufficient, although caching should mitigate this), or something else, but I'm not sure where to look. We really need some profiling to figure out if it is a rendering problem, a network problem, a disk problem, a memory problem, or something else
miknzau
miknzauOP•2y ago
ok well the disk when i copy to the c:drive is reading at 450MB/S
jrasm91
jrasm91•2y ago
Is your immich-server crashing?
miknzau
miknzauOP•2y ago
So I dont think its disk speed. The maachine is an i9 12th gen with 32gb ram so its plenty beefy... immic-server no it stays up the only thing that crashes is the browser
jrasm91
jrasm91•2y ago
Did that write happen while it was up and your accessed the photos page?
miknzau
miknzauOP•2y ago
have tried chrome and edge and same behaviour for both.. Have also tried on other machines on my local network - same issue
jrasm91
jrasm91•2y ago
Sounds like maybe a rendering problem.
miknzau
miknzauOP•2y ago
that was me copying the database backup from the USB SSD to the SSD on the local machine
jrasm91
jrasm91•2y ago
I meant the connection error Chrome has some profiling built in, maybe you can run that and share it, although it will be very large
miknzau
miknzauOP•2y ago
that connection error is contiinually there in the proxy log
jrasm91
jrasm91•2y ago
Like repeatedly? That does seem odd
miknzau
miknzauOP•2y ago
yes repeatedly, Alex was suggesting it might be a symptom of docker on windows
jrasm91
jrasm91•2y ago
Hmm.
miknzau
miknzauOP•2y ago
i have another i7 windows machine here, I am going to do a setup on that same setup and see how that behaves, to eliminate any hardware issues.
jrasm91
jrasm91•2y ago
Based on what you said it doesn't sound like a hardware issue Can you record the network tab and how long requests are taking?
miknzau
miknzauOP•2y ago
i wish but nothing even appears in the network tab half the time it's just bizzare
Alex Tran
Alex Tran•2y ago
Your time buckets looks normal I am not sure what we are experimenting here
jrasm91
jrasm91•2y ago
It's it a problem for all web clients?
Alex Tran
Alex Tran•2y ago
He tried On Chrome and Edge I believe Can also try on Firefox please?
miknzau
miknzauOP•2y ago
ok will try firefox
jrasm91
jrasm91•2y ago
You should be able to go to the Admin page then open the network tab and start recording and then go to the main timeline. It would be good to see what is happening with the requests
miknzau
miknzauOP•2y ago
ok am on a new machine now migration done testing... Same thing happening on Firefox I think the fact that it is running flawlessly on android and ios apps supports the theory that the proxy server errors are the issue am I correct in assuming that the apps are not using the immch_proxy service?
jrasm91
jrasm91•2y ago
What url did you use on the mobile apps? If it has /api then it goes through the proxy

Did you find this page helpful?