I
Immich•6mo ago
idontknow

Error: connect ECONNREFUSED 127

Woke up today and my immich server is not able to talk to redis
55 Replies
Immich
Immich•6mo ago
:wave: Hey @idontknow, Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker compose ps docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy Checklist 1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: I have read applicable release notes. 3. :ballot_box_with_check: I have reviewed the FAQs for known issues. 4. :ballot_box_with_check: I have reviewed Github for known issues. 5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting. 7. :ballot_box_with_check: I have tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) If this ticket can be closed you can use the /close command, and re-open it later if needed.
idontknow
idontknowOP•6mo ago
Error: connect ECONNREFUSED 172.19.0.3:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1610:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '172.19.0.3',  port: 6379 } using the default compose for portainer, tried to update the redis image, but no fix there root@Immich:~# curl 172.19.0.3:6379 curl: (7) Failed to connect to 172.19.0.3 port 6379 after 0 ms: Couldn't connect to server i can ping the docker ip from the lxc container
Immich
Immich•6mo ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Daniel
Daniel•6mo ago
You have not provided all the information Also, docker doesn't just break overnight. You'd need to tell us what you've done/if there are auto-updates/etc
idontknow
idontknowOP•6mo ago
I can't paste the compose since i dont have nitro, but i have used a text compare to the current one available, and it matches only thing i do overnight is a stop, backup the lxc, and start it and have done that many times before without any issues
Daniel
Daniel•6mo ago
You don't need nitro for that? 👀
idontknow
idontknowOP•6mo ago
can i upload a .txt file ?
Daniel
Daniel•6mo ago
Yes
idontknow
idontknowOP•6mo ago
one sec
Daniel
Daniel•6mo ago
You can also upload a yml file Or wrap it in code blocks Also, the redis logs would be interesting
idontknow
idontknowOP•6mo ago
idontknow
idontknowOP•6mo ago
redis logs are empty when i download from portainer, or try viewing it
Daniel
Daniel•6mo ago
Unrelated, but why's your redis port exposed? Is redis even up?
idontknow
idontknowOP•6mo ago
no, all local yep
bo0tzz
bo0tzz•6mo ago
ports:\ - '6379:6379'\
This part is not in the default setup
Daniel
Daniel•6mo ago
You have the 6379:6389 port mapping Which exposes it on the host
idontknow
idontknowOP•6mo ago
that was me trying any things usually is not there, and also has the health check i tried a few things before asking for help new image, deleting the pod, re deploying, rebooting...
Daniel
Daniel•6mo ago
Those are things you should mention at first
idontknow
idontknowOP•6mo ago
my bad
Daniel
Daniel•6mo ago
Can you try a telnet 172.19.0.3 6379 instead?
idontknow
idontknowOP•6mo ago
root@Immich:~# telnet 172.19.0.3 6379 Trying 172.19.0.3... telnet: Unable to connect to remote host: Connection refused
Daniel
Daniel•6mo ago
So that port is indeed not open/exposed
idontknow
idontknowOP•6mo ago
the default compose doesn't have the ports, does it make any difference ?
Daniel
Daniel•6mo ago
Btw https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA It shouldn't You definitely don't need them It is annoying that you don't get any redis logs I feel like there must be something going wrong
idontknow
idontknowOP•6mo ago
No description
idontknow
idontknowOP•6mo ago
not even joking lol
Daniel
Daniel•6mo ago
Can you try bringing down redis, deleting the docker volume it's using, and bringing it back up?
idontknow
idontknowOP•6mo ago
yeah, one sec want me to change anything in the compose while i am at it ?
Daniel
Daniel•6mo ago
You can remove the ports again Not sure what else you changed
idontknow
idontknowOP•6mo ago
image from redis 6.2 to 7.4 i will change it back to 6.2
Daniel
Daniel•6mo ago
Idk if redis had breaking changes (I doubt it) Yeah just do that
idontknow
idontknowOP•6mo ago
re-deploying now still no logs
Daniel
Daniel•6mo ago
Is it working though? Restart Immich?
idontknow
idontknowOP•6mo ago
Error: connect ECONNREFUSED 172.19.0.5:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1610:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '172.19.0.5',  port: 6379 } [Nest] 7 - 11/27/2024, 9:40:59 PM LOG [NestFactory] Starting Nest application... [Nest] 7 - 11/27/2024, 9:40:59 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)... no -_- saying cant connect to the DB but the ip is from redis
Daniel
Daniel•6mo ago
Wait yeah that's the weird thing Is your database up? And pelase also share your env file (and there are also multi line code blocks ;))
idontknow
idontknowOP•6mo ago
UPLOAD_LOCATION=/root/immich-data/library DB_DATA_LOCATION=/root/immich-data/postgres IMMICH_VERSION=release DB_PASSWORD=postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich DUMP_LOCATION=/root/immich-data/db_dumps yes but also no logs are displaying
Daniel
Daniel•6mo ago
In the postgres folder there should be log files
idontknow
idontknowOP•6mo ago
root@immich:~/immich-data/postgres/log# cat postgresql-2024-11-27_000000.log 2024-11-27 09:14:45.941 UTC [1] LOG: received fast shutdown request 2024-11-27 09:14:46.026 UTC [1] LOG: aborting any active transactions 2024-11-27 09:14:46.037 UTC [1] LOG: background worker "logical replication launcher" (PID 34) exited with exit code 1 2024-11-27 09:14:46.052 UTC [29] LOG: shutting down 2024-11-27 09:14:46.978 UTC [1] LOG: database system is shut down
Daniel
Daniel•6mo ago
Yeah so your database isn't up What makes you say it is up?
idontknow
idontknowOP•6mo ago
it shows as unhealthy in postgres
bo0tzz
bo0tzz•6mo ago
What system are you running on, what sort of specs does it have?
idontknow
idontknowOP•6mo ago
lxc container in proxmox 4cpus 8gb ram 8gb swap 258gb hdd even tried to restore yesterdays backup, which didn't fix the problem, starting to think it is a proxmox issue
bo0tzz
bo0tzz•6mo ago
docker in lxc is unsupported and can run into weird issues
Daniel
Daniel•6mo ago
Me too 😅
idontknow
idontknowOP•6mo ago
well... what is the safest and supported way ? time to copy all images lol
Daniel
Daniel•6mo ago
Docker :P
idontknow
idontknowOP•6mo ago
isn't lxc just an enviroment where docker runs on top of ?
Daniel
Daniel•6mo ago
Correct, that's nested containerization
idontknow
idontknowOP•6mo ago
i will delete the stack, delete all images, and redeploy the stack, if that doesnt work, this sounds like a next week problem for me
Daniel
Daniel•6mo ago
At least you have backups, right? That's definitely good 😅
idontknow
idontknowOP•6mo ago
yeah, just a pain to move them lol
Daniel
Daniel•6mo ago
Fair enough
idontknow
idontknowOP•6mo ago
one back up is a ssd, another one is somewhere in the server, and another one is lost lmao I Fu** fixed it hehe It was the swap memory, I disabled that, rebooted the server, and now it is working why? dunno, dont care lol
Daniel
Daniel•6mo ago
You usually don't want to have swap disabled completely fwiw
idontknow
idontknowOP•6mo ago
next weeks problem to figure out i gave it enough ram and cpu for now to not bottleneck

Did you find this page helpful?