error while uploading with cli
Hi. I got this error. I copied and pasted it into the attached file. Any ideas why? I recently reset my laptop and so restarted everything so it’s possible I messed something up during the setup.
63 Replies
Does the web still work to login and view your photos?
It works to login. There’s no photos in it currently
Ok.
You have a 502 gateway timeout exception in the logs
Can you manually add a file via the web UI?
I can’t I get the same 502 error

Also. For some reason it’s showing the wrong amount of space

I have only 2 tb
The 502 looks like a setup error. Can you attach your docker compose file and env file as well as explain any changes you've made? You could also look at the immich-web logs
Immich-proxy logs are turned off by default, but if you remove logging > driver: none you should probably seem some errors in there as well
i havent made any changes in the docker compose file
not exactly sure what you mean by remove logging > driver
Towards the bottom of the yml file under the proxy container there is a line with logging
Everything looks pretty normal.
If you run "du -h" in /volumes/backups what does that output?
0B .
I’ll try that soon
Maybe something is wrong with your mount
I checked the drive and everything is fine. I do have Immich running on a different computer on the same network already. Could that affect this?
Unlikely
Why is it returning 0 bytes?
There’s nothing in the folder
I’m my upload location folder
In*
So ya. Even starting Immich doesn’t create the upload, library, and other folders
Oh woops, can you run df -h? That should show the disk space for that folder. I think that's essentially what we use to show the storage info

Disk3s1 is where the folder is
What about if you run that command from inside the container at /usr/src/app/upload?
I'm just wondering if something weird is going on with the filesystem because:
- you are able to login, which implies the web, server, and database are all working fine
- you are not able to upload anything
- the disk usage reporting is obviously wrong

What does gprcfuse mean here? I'm wondering if that isn't supported an causing an issue
Can you make a touch/create a new file in that folder?
Ya I was able to create a file
That’s the hard drive that I have my docker compose file in. It’s always worked in the past so not sure why not now
Is there anything useful in the immich-proxy, immich-server or immich-web logs?
The only way to check logs Ik is through docker logs. I did look at those but didn’t understand much. And nothing stood out to me
Can you share them here?
Should I just copy and paste into a file from the terminal
That or a screenshot is fine
Did you enable logging on the proxy container?
So I forgot to ask about that. What do I replace driver: none with
You can comment out those two lines
Just commenting it didn’t work
Oh
logging
driver: none
Got it
Will do that rn
Ok something has changed I’m not sure what. I’m able to upload images through the web now. The storage still is wrong
Here is the logs:
The web and cli communicate to the server through the immich-proxy. The proxy should be started after the immich-server. It's possible that simply restarting the proxy container once the server was ready to accept connections magically fixed the issue.
Huh. Interesting. I’ll try w the cli
The only thing I noticed was typesense was lagging, which meant it was taking a bit to start, which is fine. Maybe that impacted the server being ready or something.
Ok ya cli is working now!!
Thank you
Still confused about why it’s showing wrong numbers for the storage. But I have my pictures in now so I’m happy
Great. Yeah, you did have this line in the logs:
\cf3 2023/05/22 01:46:22 [error] 40#40: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /api/server-info/ping HTTP/1.1", upstream: "http://172.20.0.7:3001/server-info/ping", host: "localhost:2283", referrer: "http://localhost:2283/photos"\It wasn't able to connect, at least at some point.
Interesting
Can you ping this url?
http://ip:2283/api/server-info
It should show the actual data return from the server that we're using for the storage size
After pinging what do I do
Oh, you might need to do it in the web, since it requires authentication
It should return a json response
Ah
Ok. So. How would I ping an ip in the web lol. I googled and I just see terminal
It doesn't have to be ip
Just navigate to the web portal and the url should be
/photos
Then just change that section to /api/server-info
Ah
So ya that’s wrong
The use percentage looks right
Ya
Can you run the df command again without -h?
I believe this is the actual code we use to get that information. You can run this in the immich-server container and let me know the results. It's possible we're doing the calculation wrong (it looks like this was just changed when we moved from node16 to node18 in 1.56)

bsize is supposed to be blocksize. I think it is usually 4096, but yours is 1048576. If it was 4096 I think the calculations would be correct.
488319243 * 4096 / 1024 / 1024 / 1024 / 1024 = 1.8TB
Ah
This looks to be a problem with docker on mac
So then probably everything is fine. Just that parameter is messed up
I’m on osx tho
I meant mac
Ah. Makes sense then
Thank you!
No problem. What version of docker are you on btw?
23.0.5
Feel free to open a ticket for it on github if you want. Looks like there are some work arounds to possibly get the right value.