I
Immichβ€’2y ago
Mr.President

Error while importing with CLI - Bad request 400 File does not exist

files are there, CLI also recognize all of them but fail to import them. any Idea? using truenas
164 Replies
jrasm91
jrasm91β€’2y ago
What command did you run?
Mr.President
Mr.PresidentOPβ€’2y ago
immich upload --key <my-api-key> --server http://my-server-ip:2283/api /mnt/media/precious-memory --recursive --import it recognized the files also showed that it did connected to the server but faild at import
Alex Tran
Alex Tranβ€’2y ago
what is your docker compose and external path value look like?
jrasm91
jrasm91β€’2y ago
The error in the log mis-matches that mount path. Can you run the command from inside the immich-server container instead? The server url will become http://localhost:3001/ I think.
Mr.President
Mr.PresidentOPβ€’2y ago
i did read it it doesnt say anything to help me with my probelm this is not the server so im getting server adrees error connection error both the external path under user and in the app setting are set correctly it does recocgnize the files, correct number of files, connect to the server, just fails to import you can see it here :
Mr.President
Mr.PresidentOPβ€’2y ago
No description
jrasm91
jrasm91β€’2y ago
/usr/src/app/upload/upload/Tomer/IMG-20220704-WA0021.jpg This is the file not found. Why did the file not match the precious memories folder structure?
jrasm91
jrasm91β€’2y ago
What are the permissions on the file I posted? Can you send the output of ls -l of the directory with the file? Also, upload/ is where immich stores your library. Why are you importing from that location?
Mr.President
Mr.PresidentOPβ€’2y ago
im not 100% sure about everything im kinda a noob if upload is not the file for uploading what is ? Ls on the directory @jrasm91
Mr.President
Mr.PresidentOPβ€’2y ago
No description
Jiibus
Jiibusβ€’2y ago
For context, @Mr.President is trying this with the TrueNAS Scale TrueCharts app. Complicates things a bit trying to figure out which pod & container to run this from and translating paths. The app has a setting in the Scale UI for uploads folder to enable the read-only gallery.
No description
Jiibus
Jiibusβ€’2y ago
Actually, this might be a truecharts issue @Mr.President https://github.com/truecharts/charts/issues/10202
GitHub
Immich External Exports Mount Β· Issue #10202 Β· truecharts/charts
App Name Immich SCALE Version 22.02.3 App Version 1.65.0_7.1.3 Application Events N/A Application Logs N/A Application Configuration Describe the bug Unable to use Immich External Path to a mounted...
Mr.President
Mr.PresidentOPβ€’2y ago
yeah i know i mounted it the right way and this is something really old you cant choose anymore the internal mount path so at this time idk what to try more
Jiibus
Jiibusβ€’2y ago
It's current as of 2 weeks ago FWIW, I imported my gphotos collection with the cli from my PC to immich no problem I just used a dedicated immich dataset for the storage and mounted it with hostpath for App Library Storage
Mr.President
Mr.PresidentOPβ€’2y ago
yes that's what I did what did you put under the mount path and the user external path are you using NFS share or Host path?
Jiibus
Jiibusβ€’2y ago
Use this section
No description
Jiibus
Jiibusβ€’2y ago
No need to add another storage
Mr.President
Mr.PresidentOPβ€’2y ago
yes as I said they're all set up for folders but should I put the files i want to upload in the library storage or in Upload storage? then what did you write in the user host path and in the cli code? because you cant use host path in pods so... it wont work I hope we can solve it
Jiibus
Jiibusβ€’2y ago
I installed it with ingress enabled on TrueNAS, had my photos on my PC, got the docker image on it, and followed this https://immich.app/docs/features/bulk-upload I used the alias creation since I main linux on my desktop. My command was immich upload --key <key> --server https://<ingress URL>/api <folder to upload>
Bulk Upload (Using the CLI) | Immich
You can use the CLI to upload an existing gallery to the Immich server
Mr.President
Mr.PresidentOPβ€’2y ago
what did you put under the user host path in the web ui
Jiibus
Jiibusβ€’2y ago
I didn't I used this. Unless I'm misunderstanding what you mean by user host path
Mr.President
Mr.PresidentOPβ€’2y ago
so nothing under user host path external path in the web ui
Jiibus
Jiibusβ€’2y ago
Yea, that option doesn't use that
Mr.President
Mr.PresidentOPβ€’2y ago
ok ill try it now, yeah its not wotking im getting no such file or directory error because you cant wirte host path paths in a cli command in a pod it needs to be the container path
Jiibus
Jiibusβ€’2y ago
I showed you my command, you don't use host paths
Mr.President
Mr.PresidentOPβ€’2y ago
ok maybe i didnt understood what did you put uner <folder to upload>
Jiibus
Jiibusβ€’2y ago
You aren't doing this bulk upload from within a container You're doing this from a different device This was the folder containing all the pics I wanted to import into immich
jrasm91
jrasm91β€’2y ago
You need to pick between import and upload. Import requires the files be mounted on the container. Upload uses http to send the files to the immich server from somewhere else
Mr.President
Mr.PresidentOPβ€’2y ago
yes i understand
Jiibus
Jiibusβ€’2y ago
Yes sorry, i said import when I meant upload
jrasm91
jrasm91β€’2y ago
Import uses external path in the UI user settings, upload does not
Mr.President
Mr.PresidentOPβ€’2y ago
yeah but im doing it
jrasm91
jrasm91β€’2y ago
You can run import from another machine but it is much simpler if your run it from the container directly
Mr.President
Mr.PresidentOPβ€’2y ago
that's what im doing...
jrasm91
jrasm91β€’2y ago
Then you avoid pathing issues.
Mr.President
Mr.PresidentOPβ€’2y ago
but im getting no such file or directory
jrasm91
jrasm91β€’2y ago
Then the user who is running the immich server can't read that file
Jiibus
Jiibusβ€’2y ago
There seems to be an issue with the truecharts container, which is why I'm suggesting upload .
jrasm91
jrasm91β€’2y ago
Is it not added to the server container?
Jiibus
Jiibusβ€’2y ago
He tried from the immich & server containers I believe Err no, just from the immich one
jrasm91
jrasm91β€’2y ago
If the volume mount is added properly to the server container import should work
Jiibus
Jiibusβ€’2y ago
The issue I linked seems to suggest there's something funky going on and import doesn't work
jrasm91
jrasm91β€’2y ago
Got it.
Mr.President
Mr.PresidentOPβ€’2y ago
ok see this:
Joey
Joeyβ€’2y ago
I had the same problem, maybe you can take a look at #File does not exist within user's external path
Jiibus
Jiibusβ€’2y ago
If you meant to send a screenshot, it didn't work
Mr.President
Mr.PresidentOPβ€’2y ago
im on it, i changes stuff for you guys so waitining for it to redeploy youll get everything in couple of minutes thank you for your help btw!!
Mr.President
Mr.PresidentOPβ€’2y ago
No description
Mr.President
Mr.PresidentOPβ€’2y ago
No description
jrasm91
jrasm91β€’2y ago
Can you connect to the pod directly and run the command on there?
Mr.President
Mr.PresidentOPβ€’2y ago
which pod? ill try it
jrasm91
jrasm91β€’2y ago
Immich-server
Mr.President
Mr.PresidentOPβ€’2y ago
no such pod, do you mean the main pod of immich?
jrasm91
jrasm91β€’2y ago
Idk how truenas is configured, but the main pod, yes
Mr.President
Mr.PresidentOPβ€’2y ago
so what i sent you until now was from the main pod the problem is that you cant use host path in pods as i said before, but when im using container pods i does found the relevant files just fails to upload them
jrasm91
jrasm91β€’2y ago
It can't be you are setting the API address to another port What pod runs with the IP 1.61?
Mr.President
Mr.PresidentOPβ€’2y ago
all of them? I can also ingress it if it will help
jrasm91
jrasm91β€’2y ago
What pod uses port 10323?
Mr.President
Mr.PresidentOPβ€’2y ago
immich
jrasm91
jrasm91β€’2y ago
You are running the command on that pod?
Mr.President
Mr.PresidentOPβ€’2y ago
yes
jrasm91
jrasm91β€’2y ago
Would it work if you used localhost instead?
Mr.President
Mr.PresidentOPβ€’2y ago
I think you told me that and i tried it and it wont connect to the server at all i can try it again if you want
jrasm91
jrasm91β€’2y ago
If you can't make it work with a localhost address then you're not running it on the pod that's running the API...
Mr.President
Mr.PresidentOPβ€’2y ago
show me how to write the local host and ill try it again also
Mr.President
Mr.PresidentOPβ€’2y ago
these are the pods if you want me to try it somewhere else
No description
Mr.President
Mr.PresidentOPβ€’2y ago
im trying it on the main pod
jrasm91
jrasm91β€’2y ago
Are main 1 and 2 load balanced?
Mr.President
Mr.PresidentOPβ€’2y ago
im not sure i know what is load balanced, but anyway the main pod is the one that says immich-numbers no the cnpg-main
jrasm91
jrasm91β€’2y ago
@bo0tzz do you know how the truenas stuff works?
Mr.President
Mr.PresidentOPβ€’2y ago
Just letting you know that the main problem is that you cant use host path in pods but you need the container path. with the container path it works, just fails to upload. Ok im done with life @jrasm91 XD XD I just run the same code I said from the begining that didnt work and it worked same thing
jrasm91
jrasm91β€’2y ago
............
Mr.President
Mr.PresidentOPβ€’2y ago
so I was right you cant use host path as I said but why did it work
bo0tzz
bo0tzzβ€’2y ago
Not really. It's kubernetes under the hood but hacked to fit their weird ways of doing things, they don't use our helm chart or anything like that :P
Mr.President
Mr.PresidentOPβ€’2y ago
I changed nothing
jrasm91
jrasm91β€’2y ago
K will that explains that I guess.
bo0tzz
bo0tzzβ€’2y ago
The cnpg-* containers are postgres databases managed by cloudnative-pg, there is one primary and one read-only secondary, it should always be pointing it to the primary, probably nothing to see there That part I do know how it works πŸ˜›
jrasm91
jrasm91β€’2y ago
Obviously my expertise has hit is limit here.
Mr.President
Mr.PresidentOPβ€’2y ago
I am so confused really I have to go for a meeting ill be back in an hour to try it again and see if its working again ill let you guys know ok im back, how you guys ever had a problem with stoppign the app? if you use truenas for some reason everytime i try to stop the app nothing happens. and then I need to delete it and reinstall it fun stuff
jrasm91
jrasm91β€’2y ago
Yeah I think all your problems are pretty specific to the truenas implementation, which we don't have any experience or knowledge about, so can't be much help in that area I'm afraid.
Mr.President
Mr.PresidentOPβ€’2y ago
yeah but at least i can move my knowlege forward so if someone will ask you the same thing again.. you know what and how SO with truenas CLI works only if you use container path not Host path, if anyone have the same problem as me also @jrasm91 do you know about a problem with pictures from what'sapp? I think all the pics from what'sapp after the upload are broken
jrasm91
jrasm91β€’2y ago
I think there is a github issue for it. Looks like the exif data for those images are quite bad.
Mr.President
Mr.PresidentOPβ€’2y ago
Mmm ok so its a known problem
Mr.President
Mr.PresidentOPβ€’2y ago
OH ANOTHER thing if you press stop or start on the app in Truenas it will break the entire app forever you have to do it via heavyscript in the shell so if someone ever ask you about why it wont start or stop that's why XD
Jiibus
Jiibusβ€’2y ago
immich is a cnpg app, and so cannot be stopped with the stop button. You need to edit it, check this, then save.
No description
Jiibus
Jiibusβ€’2y ago
Heavyscript is another way, but I think the stop all checkbox will be more practical for you
Mr.President
Mr.PresidentOPβ€’2y ago
idk that's what I see in FAQ for truechart
Mr.President
Mr.PresidentOPβ€’2y ago
No description
Jiibus
Jiibusβ€’2y ago
Yes, it's valid, but since you're new the stop all is easier.
Mr.President
Mr.PresidentOPβ€’2y ago
how about start?
Jiibus
Jiibusβ€’2y ago
But if you wanna use heavyscript go for it You uncheck the box and save
Mr.President
Mr.PresidentOPβ€’2y ago
and it will start?
Jiibus
Jiibusβ€’2y ago
Yea
Mr.President
Mr.PresidentOPβ€’2y ago
ohhhhhhh I seeee
Jiibus
Jiibusβ€’2y ago
Just be aware that CNPG apps can take a while to fully spin up
Mr.President
Mr.PresidentOPβ€’2y ago
yeah now lets see if i can still do CLI XD
Jiibus
Jiibusβ€’2y ago
Did you not get it working?
Mr.President
Mr.PresidentOPβ€’2y ago
I did but now im trying it on another user with different API so at this point in time i kinda lost all confident in my abilities to use anything so ill let you knowww BTW you guys are awosome thanks for the help
Jiibus
Jiibusβ€’2y ago
This is how I learn. Blindly stumble about till I find something that works and I repeat it lol
Mr.President
Mr.PresidentOPβ€’2y ago
True haha
Jiibus
Jiibusβ€’2y ago
Related, you can tell an app is a cnpg app by clicking on it to open this little window and open the containers portion
No description
Jiibus
Jiibusβ€’2y ago
Just so you don't accidentally try to stop another app the wrong way
Mr.President
Mr.PresidentOPβ€’2y ago
yeah I think you can also see it in pods i dont think i ever used cnpg apps before what is so important or good or unique about cnpg ?
Jiibus
Jiibusβ€’2y ago
They moved to it because ix-systems implementations caused a lot of headaches I couldn't tell you the specifics of the advantages of cnpg for this usecase, though
Mr.President
Mr.PresidentOPβ€’2y ago
just tried that stop option... didnt work and now my app broke fuckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk XD
Mr.President
Mr.PresidentOPβ€’2y ago
this is nottttt working
No description
Mr.President
Mr.PresidentOPβ€’2y ago
its just stays on stop forever fuckkkkkkkkkkkkkk XD
Jiibus
Jiibusβ€’2y ago
Something's off with your system then. I use it all the time You can go into command shell and do sudo systemctl restart middlewared and it'll clear You'll have to log in again Yea, just did the Stop All with immich and it stopped as I expected. @Mr.President
Mr.President
Mr.PresidentOPβ€’2y ago
idk man hahah
Jiibus
Jiibusβ€’2y ago
Is it still stuck?
Mr.President
Mr.PresidentOPβ€’2y ago
nope i restarted the middlewared thingy solved it then started it with heavyscript
Jiibus
Jiibusβ€’2y ago
So then stick with heavyscript. Not sure why stop all is being wonky for you
Mr.President
Mr.PresidentOPβ€’2y ago
haha yeah i have another question do you know why I cant see,the albums i make in the web UI, at the immich android app?
Jiibus
Jiibusβ€’2y ago
No, shouldn't be like that. That's an immich dev question
Mr.President
Mr.PresidentOPβ€’2y ago
I should see the albums?
Jiibus
Jiibusβ€’2y ago
Yea, I do with mine
Mr.President
Mr.PresidentOPβ€’2y ago
is it under sharing or library?
Jiibus
Jiibusβ€’2y ago
Library
Mr.President
Mr.PresidentOPβ€’2y ago
maybe its becuase i just downloaded the app idk maybe it needs to sync?
Jiibus
Jiibusβ€’2y ago
You on android?
Mr.President
Mr.PresidentOPβ€’2y ago
Yes sir
Jiibus
Jiibusβ€’2y ago
Try force closing the app and open it again
Mr.President
Mr.PresidentOPβ€’2y ago
on it it is still scanning my phone so im letting it finish that and ill force close it no so I cant see the albums i made in the web ui also if i made an album in the app i still cant see it but it will be avilable in the web ui
Jiibus
Jiibusβ€’2y ago
I'd wait till tomorrow when some devs are around and troubleshoot with them
Mr.President
Mr.PresidentOPβ€’2y ago
how do I reach devs? open new support and close this one?
Alex Tran
Alex Tranβ€’2y ago
we are here and following can you nuke your installation and try again?
Mr.President
Mr.PresidentOPβ€’2y ago
well I dont really want to lose everything... and already did that yesterday and problem is still there
Alex Tran
Alex Tranβ€’2y ago
can you spin up a VM to use docker and docker compose to see if the problems persist?
Mr.President
Mr.PresidentOPβ€’2y ago
phfff well the ability is there but I've never done it or really know how to do it if you want to help me with that I would be more than happy to try
Alex Tran
Alex Tranβ€’2y ago
yeah why not πŸ™‚
Mr.President
Mr.PresidentOPβ€’2y ago
sure lets dooo itttt do I need any operation system from the VM?
Alex Tran
Alex Tranβ€’2y ago
what do you mean?
Mr.President
Mr.PresidentOPβ€’2y ago
i might be stupid because im pretty newwww to servers but as far as i know when you run a VM you need like an opration system for it? like linux or something
Alex Tran
Alex Tranβ€’2y ago
no worry we are all learning something new here ah I see, use Linux and Ubuntu for ease of use
Mr.President
Mr.PresidentOPβ€’2y ago
ok let me find the installer and see if i know how to do it XD is it ubuntu desktop or server?
Alex Tran
Alex Tranβ€’2y ago
server
Mr.President
Mr.PresidentOPβ€’2y ago
do you know what permitions i need to let vm for it to be able work? im getting an error trying to figure it out
Alex Tran
Alex Tranβ€’2y ago
I dont unfortunately, I use promox so all the systems run on different VMs πŸ˜› what error are you encountering?
Mr.President
Mr.PresidentOPβ€’2y ago
No description
Alex Tran
Alex Tranβ€’2y ago
Hmm can you ask Google?
Mr.President
Mr.PresidentOPβ€’2y ago
im trying haha ill let you know ok i solved it but now i have something else when i spin the vm im getting this
Mr.President
Mr.PresidentOPβ€’2y ago
No description
Mr.President
Mr.PresidentOPβ€’2y ago
add an IOMMU? @Alex I give up I cant find anything about it online
Alex Tran
Alex Tranβ€’2y ago
Do you have many services already run on your server?
Mr.President
Mr.PresidentOPβ€’2y ago
Mmmm maybe but there's 20 cores in my server and like 1% usage so idk that's so weird i change it to 1 core and it worked I hope it wont be slow lets see @Alex I think its working now
Alex Tran
Alex Tranβ€’2y ago
The old instace?
Mr.President
Mr.PresidentOPβ€’2y ago
yeah i just put 1 cpu instead of 5 and it worked
Alex Tran
Alex Tranβ€’2y ago
:BO_djtmecuocdoi: Doesn’t make any sense
Mr.President
Mr.PresidentOPβ€’2y ago
welcome to truenas XD
Alex Tran
Alex Tranβ€’2y ago
TruePain
Mr.President
Mr.PresidentOPβ€’2y ago
Its all magic True
Alex Tran
Alex Tranβ€’2y ago
I hope you will find revelation one day in system like Promox
Mr.President
Mr.PresidentOPβ€’2y ago
IDK i still think for a storage server truenas is pretty good
Mr.President
Mr.PresidentOPβ€’2y ago
No description
Mr.President
Mr.PresidentOPβ€’2y ago
now what
Alex Tran
Alex Tranβ€’2y ago
Wait until it boots to the shell
Mr.President
Mr.PresidentOPβ€’2y ago
will it? it stuck there
Alex Tran
Alex Tranβ€’2y ago
:icebearehwhat: Problem for tomorrow I’m going to bed
Mr.President
Mr.PresidentOPβ€’2y ago
LOL ok ok let me know when are you avilable tomorrow ill be here
Alex Tran
Alex Tranβ€’2y ago
Keep researching My weekend schedule is pretty tight You can ask in general channel for help as well
Mr.President
Mr.PresidentOPβ€’2y ago
I fixed it it is working now so if you want can try and check what you wanted πŸ˜„

Did you find this page helpful?