[Bug] ⢠"Error connecting to server - check server address and port"
[TL;DR] : Don't forget any argument in your command. I forgot the --server key and it was the issue. Thx to jrasm91 :happ:
Hi fellas,
I'm using Immich (and i'm a true fan :prayge: ) since a few days
I uploaded everything from my phone BUT I did a google takeout to bulk upload and followed all the steps described on github.
Now, I wanna upload :
And I just get this :
:jerry: can anyone help me please ? :prayge: thanks
additional things :
- My server works on the URL (photos.onelots.fr) and on the ip
- /api/server-info/version = {"major":1,"minor":78,"patch":1}

96 Replies
http://192.168.0.10:2283/api
:AHEM: my bad, i wrote the message without copy/paste
and it was an important point I wanted to remember... and that I forget

but Yeah
i'm hitting /api
Where are you running this command from?
my terminal
Hm actually I'm in the google-photo-exif folder
the one I used to concatenate jsons and img
But on a separate machine? Immich is running on another machine on the network?
You can access immich via a browser from this same machine?
yep, okay I'm running the command on my mac, and my server is on the same network
It is accessible via http on that ip from you mac?
it is

You can login successfully?
This is via ip and 2283?
I'm not familiar with this browser and i do not see a port?
Is it using port 80?
I Can login successfully, and this is via IP and 2283 @jrasm91
(or using the url, I have a reverse proxy so)
And the CLI still is not working? Can you paste the full command?
nah it is not :Lavie_estdure:
I posted it above, I re post it now
That doesn't make any sense. I feel like you are missing something you are not sharing, which is why it is hard to debug or you have a very strange error where networking is different between the browser and the request from the terminal
I agree with you
š
It doesn't make any fcking sense
I'm on the same network
wait
nah it's good
The api key is fine
Do you have any custom firewall or access rules?
And the error is still a network error?
ah maybe an ufw
yeah still
Can you curl the API from the same terminal?

:Hitto:
I'm gonna be crazy
I know this reply is like "normal"
And does the route
/api/server-info/ping
work?
it does, sadly
I don't understand where is the problem
maybe the api key
I'm gonna try to change it
it doesn't work
:TktJsuisPasTriste:
If the api key is invalid that would be really annoying if it gave a connection error
If your key has weird characters in it, it might be not actually sending the expected value
If it has
$
, '
, or "
it might be doing bash stuff.
You can try escaping it with '
on each sideI'ma try
it has $
nope
X) still not working
I just checked, my container is available from everywhere, there is no trouble here.
It has a
$
did you wrap the api key with single quotes?yep I did it
actually I don't care :kekexplosion: here is the key
lol
I re generated the key
it is
faos646m3WwkBWAbdJHW1LGtszzauMFoHsdsm7DymM
And the full command now?
no character
uh
sudo immich upload --key 'faos646m3WwkBWAbdJHW1LGtszzauMFoHsdsm7DymM' http://192.168.0.10:2283/ --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
or immich upload --key 'faos646m3WwkBWAbdJHW1LGtszzauMFoHsdsm7DymM' http://192.168.0.10:2283/ --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
doesn't workWHY IS THERE NO
/api
???RHAAA

sudo immich upload --key 'faos646m3WwkBWAbdJHW1LGtszzauMFoHsdsm7DymM' http://192.168.0.10:2283/api --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
š
it doesn't work with it neither :issou:Can you do the previous curl test with sudo?
yep
Does immich command not work without sudo?
same result "404 blablabla"
it works I just tried it, maybe it was it but no
and since I just use arrow_up instead of typing the command everytime I have to, it stays
Can you send me a screenshot of the non-sudo version of the command with
/api
?(i tried to uninstall/reinstall immich btw)
uh okay but it's the same
You uninstalled it?
Did your database persist between that or you started over? Is the api key still valid?
⯠immich upload --key 'faos646m3WwkBWAbdJHW1LGtszzauMFoHsdsm7DymM' http://192.168.0.10:2283/api --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
Checking connectivity with Immich instance...
Error connecting to server - check server address and port
client-side*oh the cli
excuse-me I wasn't clear enough
yep
OK let's try this instead. Idk why it doesn't log the actual error. Can you navigate to
$HOME/node_modules/immich-cli/
?yep
cd: no such file or directory: /Users/onelots/node_modules/immich-cli/
:sueur:
lemme find it
which immich
yes
/usr/local/bin/immich
lessgo
Is that an alias to another location?
it is not :Think:
link*
it is a file
Is it a text file?
Can you edit it?
⯠cd /usr/local/bin/immich
cd: not a directory: /usr/local/bin/immich
it looks like
yes
something crazy like this at the top?
wait
it's empty
:risitas_sueur:
what is it
probably a link
ls -l /usr/local/bin/immich
I got it
start :
Find the line
Error connecting to server
okay
Right before/after it add
Then run the command again
okay
right before the process exit is fine
You're a hacker now
let's debug

:jerry: I'm in an ingeneer school
I debug pretty often actually
:issou:
Error: connect ECONNREFUSED ::1:80
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) {
okay I'm gonna commit mass murder :serieux:
It is using port 80 to connect?
it seems to
what the heck
i specified 2283
hold up
lemme try with the URl since it uses the port 80
you need to speicfy the url is the server url lol
not a path
--server <url>
LMAOOO
:kekexplosion:
no plz
lets gooooooooooooooooooooooooooo
don't tell me it's ONLY this
just because of a fucking little arg
ALLEZ
(and bad logging in the cli š )
OK I'M GONNA KILL MYSELF
:exit:
you're sweet but i'm the only one in fault
:Lavie_estdure:
okay, maybe logging could be a BIT more explicit
it works lessgo
uploading :loading:
thanks @jrasm91 :prayge:
what would I do without you
Well, now that I have your url and api key I would probably recommend changing it š
Yeah
good Idea
Fuck I launched the transfer
:serieux:
Upload Progress | āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | 2% 237/9501 Current file [/Users/onelots/Downloads/Takeout-1/outp
erf
You can ctrl c it np
and it will resume to where it stopped ?
It'll skip ones that are fully uploaded.
it's not like
cp
:jerry:
incredible
great
thxgl
you made my day
thx

Nice. Where did you post that?
I edited the original post
above ā«
Oh gotcha, sounds good.
:Thumb: Thanks, again
np
@jrasm91 just like that, I assume this is a visual bug ?
Comparing local assets with those on the Immich instance...
A total of 245 assets will be uploaded to the server
Do you want to start upload now? (y/n) y
Start uploading...
Upload Progress | āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | 0% 7/9501 Current file [/Users/onelots/Downloads/Takeout-1/output/IMG_20190813_132326.jpg]
(I stopped then started)
which part?
I stopped at like 8750 and I just had 245 left
why does he want to upload 9501 :jerry:
Yeah, it's a bug. The total there is everything, but it will stop after 245 finish
9501 is how many assets it found, it doesn't update after the uploaded assets are filtered out.
k great
yep okay