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
jrasm91
jrasm912y ago
Does the web still work to login and view your photos?
thirdpie
thirdpieOP2y ago
It works to login. There’s no photos in it currently
jrasm91
jrasm912y ago
Ok. You have a 502 gateway timeout exception in the logs Can you manually add a file via the web UI?
thirdpie
thirdpieOP2y ago
I can’t I get the same 502 error
thirdpie
thirdpieOP2y ago
No description
thirdpie
thirdpieOP2y ago
Also. For some reason it’s showing the wrong amount of space
thirdpie
thirdpieOP2y ago
No description
thirdpie
thirdpieOP2y ago
I have only 2 tb
jrasm91
jrasm912y ago
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
thirdpie
thirdpieOP2y ago
i havent made any changes in the docker compose file not exactly sure what you mean by remove logging > driver
jrasm91
jrasm912y ago
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?
thirdpie
thirdpieOP2y ago
0B . I’ll try that soon
jrasm91
jrasm912y ago
Maybe something is wrong with your mount
thirdpie
thirdpieOP2y ago
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?
jrasm91
jrasm912y ago
Unlikely Why is it returning 0 bytes?
thirdpie
thirdpieOP2y ago
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
jrasm91
jrasm912y ago
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
thirdpie
thirdpieOP2y ago
No description
thirdpie
thirdpieOP2y ago
Disk3s1 is where the folder is
jrasm91
jrasm912y ago
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
thirdpie
thirdpieOP2y ago
No description
jrasm91
jrasm912y ago
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?
thirdpie
thirdpieOP2y ago
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
jrasm91
jrasm912y ago
Is there anything useful in the immich-proxy, immich-server or immich-web logs?
thirdpie
thirdpieOP2y ago
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
jrasm91
jrasm912y ago
Can you share them here?
thirdpie
thirdpieOP2y ago
Should I just copy and paste into a file from the terminal
jrasm91
jrasm912y ago
That or a screenshot is fine Did you enable logging on the proxy container?
thirdpie
thirdpieOP2y ago
So I forgot to ask about that. What do I replace driver: none with
jrasm91
jrasm912y ago
You can comment out those two lines
thirdpie
thirdpieOP2y ago
Just commenting it didn’t work Oh
jrasm91
jrasm912y ago
logging driver: none
thirdpie
thirdpieOP2y ago
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:
jrasm91
jrasm912y ago
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.
thirdpie
thirdpieOP2y ago
Huh. Interesting. I’ll try w the cli
jrasm91
jrasm912y ago
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.
thirdpie
thirdpieOP2y ago
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
jrasm91
jrasm912y ago
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.
thirdpie
thirdpieOP2y ago
Interesting
jrasm91
jrasm912y ago
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
thirdpie
thirdpieOP2y ago
After pinging what do I do
jrasm91
jrasm912y ago
Oh, you might need to do it in the web, since it requires authentication It should return a json response
thirdpie
thirdpieOP2y ago
Ah Ok. So. How would I ping an ip in the web lol. I googled and I just see terminal
jrasm91
jrasm912y ago
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
thirdpie
thirdpieOP2y ago
Ah
thirdpie
thirdpieOP2y ago
No description
thirdpie
thirdpieOP2y ago
So ya that’s wrong
jrasm91
jrasm912y ago
The use percentage looks right
thirdpie
thirdpieOP2y ago
Ya
jrasm91
jrasm912y ago
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)
node -e "console.log(require('fs').statfsSync('/usr/src/app/uploa
d'))"
node -e "console.log(require('fs').statfsSync('/usr/src/app/uploa
d'))"
thirdpie
thirdpieOP2y ago
No description
jrasm91
jrasm912y ago
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
thirdpie
thirdpieOP2y ago
Ah
jrasm91
jrasm912y ago
This looks to be a problem with docker on mac
thirdpie
thirdpieOP2y ago
So then probably everything is fine. Just that parameter is messed up I’m on osx tho
jrasm91
jrasm912y ago
I meant mac
thirdpie
thirdpieOP2y ago
Ah. Makes sense then Thank you!
jrasm91
jrasm912y ago
No problem. What version of docker are you on btw?
thirdpie
thirdpieOP2y ago
23.0.5
jrasm91
jrasm912y ago
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.

Did you find this page helpful?