I
Immich•2y ago
Onelots.

[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 :
immich upload --key [NahThat'sMyKeyDon'tTouchIt] http://192.168.0.10:2283/api --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
immich upload --key [NahThat'sMyKeyDon'tTouchIt] http://192.168.0.10:2283/api --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
And I just get this :
Checking connectivity with Immich instance...
Error connecting to server - check server address and port
Checking connectivity with Immich instance...
Error connecting to server - check server address and port
: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}
No description
96 Replies
jrasm91
jrasm91•2y ago
http://192.168.0.10:2283/api
Onelots.
Onelots.OP•2y ago
:AHEM: my bad, i wrote the message without copy/paste and it was an important point I wanted to remember... and that I forget
No description
Onelots.
Onelots.OP•2y ago
but Yeah i'm hitting /api
jrasm91
jrasm91•2y ago
Where are you running this command from?
Onelots.
Onelots.OP•2y ago
my terminal Hm actually I'm in the google-photo-exif folder the one I used to concatenate jsons and img
jrasm91
jrasm91•2y ago
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?
Onelots.
Onelots.OP•2y ago
yep, okay I'm running the command on my mac, and my server is on the same network
jrasm91
jrasm91•2y ago
It is accessible via http on that ip from you mac?
Onelots.
Onelots.OP•2y ago
it is
Onelots.
Onelots.OP•2y ago
No description
jrasm91
jrasm91•2y ago
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?
Onelots.
Onelots.OP•2y ago
I Can login successfully, and this is via IP and 2283 @jrasm91 (or using the url, I have a reverse proxy so)
jrasm91
jrasm91•2y ago
And the CLI still is not working? Can you paste the full command?
Onelots.
Onelots.OP•2y ago
nah it is not :Lavie_estdure: I posted it above, I re post it now
immich upload --key [NahThat'sMyKeyDon'tTouchIt] http://192.168.0.10:2283/api --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
immich upload --key [NahThat'sMyKeyDon'tTouchIt] http://192.168.0.10:2283/api --recursive '/Users/onelots/Downloads/Takeout-1/output' -t 16
jrasm91
jrasm91•2y ago
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
Onelots.
Onelots.OP•2y ago
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
jrasm91
jrasm91•2y ago
Do you have any custom firewall or access rules? And the error is still a network error?
Onelots.
Onelots.OP•2y ago
ah maybe an ufw yeah still
jrasm91
jrasm91•2y ago
Can you curl the API from the same terminal?
Onelots.
Onelots.OP•2y ago
No description
Onelots.
Onelots.OP•2y ago
:Hitto: I'm gonna be crazy I know this reply is like "normal"
jrasm91
jrasm91•2y ago
And does the route /api/server-info/ping work?
Onelots.
Onelots.OP•2y ago
No description
Onelots.
Onelots.OP•2y ago
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:
jrasm91
jrasm91•2y ago
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 side
Onelots.
Onelots.OP•2y ago
I'ma try it has $ nope X) still not working I just checked, my container is available from everywhere, there is no trouble here.
jrasm91
jrasm91•2y ago
It has a $ did you wrap the api key with single quotes?
Onelots.
Onelots.OP•2y ago
yep I did it actually I don't care :kekexplosion: here is the key
jrasm91
jrasm91•2y ago
lol
Onelots.
Onelots.OP•2y ago
I re generated the key it is faos646m3WwkBWAbdJHW1LGtszzauMFoHsdsm7DymM
jrasm91
jrasm91•2y ago
And the full command now?
Onelots.
Onelots.OP•2y ago
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 work
jrasm91
jrasm91•2y ago
WHY IS THERE NO /api???
Onelots.
Onelots.OP•2y ago
RHAAA
Onelots.
Onelots.OP•2y ago
No description
Onelots.
Onelots.OP•2y ago
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:
jrasm91
jrasm91•2y ago
Can you do the previous curl test with sudo?
Onelots.
Onelots.OP•2y ago
yep
jrasm91
jrasm91•2y ago
Does immich command not work without sudo?
Onelots.
Onelots.OP•2y ago
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
jrasm91
jrasm91•2y ago
Can you send me a screenshot of the non-sudo version of the command with /api?
Onelots.
Onelots.OP•2y ago
(i tried to uninstall/reinstall immich btw) uh okay but it's the same
jrasm91
jrasm91•2y ago
You uninstalled it? Did your database persist between that or you started over? Is the api key still valid?
Onelots.
Onelots.OP•2y ago
āÆ 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*
jrasm91
jrasm91•2y ago
oh the cli
Onelots.
Onelots.OP•2y ago
excuse-me I wasn't clear enough yep
jrasm91
jrasm91•2y ago
OK let's try this instead. Idk why it doesn't log the actual error. Can you navigate to $HOME/node_modules/immich-cli/?
Onelots.
Onelots.OP•2y ago
yep cd: no such file or directory: /Users/onelots/node_modules/immich-cli/ :sueur: lemme find it
jrasm91
jrasm91•2y ago
which immich
Onelots.
Onelots.OP•2y ago
yes /usr/local/bin/immich lessgo
jrasm91
jrasm91•2y ago
Is that an alias to another location?
Onelots.
Onelots.OP•2y ago
it is not :Think:
jrasm91
jrasm91•2y ago
link*
Onelots.
Onelots.OP•2y ago
it is a file
jrasm91
jrasm91•2y ago
Is it a text file? Can you edit it?
Onelots.
Onelots.OP•2y ago
āÆ cd /usr/local/bin/immich cd: not a directory: /usr/local/bin/immich it looks like yes
jrasm91
jrasm91•2y ago
#! /usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
#! /usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
something crazy like this at the top?
Onelots.
Onelots.OP•2y ago
wait it's empty :risitas_sueur: what is it
jrasm91
jrasm91•2y ago
probably a link ls -l /usr/local/bin/immich
Onelots.
Onelots.OP•2y ago
I got it start :
#! /usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
#! /usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
jrasm91
jrasm91•2y ago
Find the line Error connecting to server
Onelots.
Onelots.OP•2y ago
okay
jrasm91
jrasm91•2y ago
Right before/after it add
console.error(e)
console.error(e)
Then run the command again
Onelots.
Onelots.OP•2y ago
function pingServer(endpoint) {
return __awaiter(this, void 0, void 0, function* () {
try {
const res = yield axios_1.default.get(`${endpoint}/server-info/ping`);
if (res.data['res'] == 'pong') {
log(chalk_1.default.green('Server status: OK'));
}
}
catch (e) {
log(chalk_1.default.red('Error connecting to server - check server address and port'));
process.exit(1);
}
});
}
function pingServer(endpoint) {
return __awaiter(this, void 0, void 0, function* () {
try {
const res = yield axios_1.default.get(`${endpoint}/server-info/ping`);
if (res.data['res'] == 'pong') {
log(chalk_1.default.green('Server status: OK'));
}
}
catch (e) {
log(chalk_1.default.red('Error connecting to server - check server address and port'));
process.exit(1);
}
});
}
okay
jrasm91
jrasm91•2y ago
right before the process exit is fine You're a hacker now
Onelots.
Onelots.OP•2y ago
let's debug
No description
Onelots.
Onelots.OP•2y ago
: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:
jrasm91
jrasm91•2y ago
It is using port 80 to connect?
Onelots.
Onelots.OP•2y ago
it seems to what the heck i specified 2283
jrasm91
jrasm91•2y ago
hold up
Onelots.
Onelots.OP•2y ago
lemme try with the URl since it uses the port 80
jrasm91
jrasm91•2y ago
you need to speicfy the url is the server url lol not a path --server <url>
Onelots.
Onelots.OP•2y ago
LMAOOO :kekexplosion: no plz
jrasm91
jrasm91•2y ago
lets gooooooooooooooooooooooooooo
Onelots.
Onelots.OP•2y ago
don't tell me it's ONLY this just because of a fucking little arg ALLEZ
jrasm91
jrasm91•2y ago
(and bad logging in the cli šŸ˜› )
Onelots.
Onelots.OP•2y ago
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
jrasm91
jrasm91•2y ago
Well, now that I have your url and api key I would probably recommend changing it šŸ™‚
Onelots.
Onelots.OP•2y ago
Yeah good Idea Fuck I launched the transfer :serieux: Upload Progress | ā–ˆā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ | 2% 237/9501 Current file [/Users/onelots/Downloads/Takeout-1/outp erf
jrasm91
jrasm91•2y ago
You can ctrl c it np
Onelots.
Onelots.OP•2y ago
and it will resume to where it stopped ?
jrasm91
jrasm91•2y ago
It'll skip ones that are fully uploaded.
Onelots.
Onelots.OP•2y ago
it's not like cp :jerry: incredible great thx
jrasm91
jrasm91•2y ago
gl
Onelots.
Onelots.OP•2y ago
you made my day thx
Onelots.
Onelots.OP•2y ago
No description
jrasm91
jrasm91•2y ago
Nice. Where did you post that?
Onelots.
Onelots.OP•2y ago
I edited the original post above ā«
jrasm91
jrasm91•2y ago
Oh gotcha, sounds good.
Onelots.
Onelots.OP•2y ago
:Thumb: Thanks, again
jrasm91
jrasm91•2y ago
np
Onelots.
Onelots.OP•2y ago
@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)
jrasm91
jrasm91•2y ago
which part?
Onelots.
Onelots.OP•2y ago
I stopped at like 8750 and I just had 245 left why does he want to upload 9501 :jerry:
jrasm91
jrasm91•2y ago
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.
Onelots.
Onelots.OP•2y ago
k great yep okay

Did you find this page helpful?