Error: connect ECONNREFUSED 127
Woke up today and my immich server is not able to talk to redis
55 Replies
: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.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
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
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
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
You don't need nitro for that? 👀
can i upload a .txt file ?
Yes
one sec
You can also upload a yml file
Or wrap it in code blocks
Also, the redis logs would be interesting
redis logs are empty when i download from portainer, or try viewing it
Unrelated, but why's your redis port exposed?
Is redis even up?
no, all local
yep
ports:\ - '6379:6379'\This part is not in the default setup
You have the
6379:6389
port mapping
Which exposes it on the hostthat 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...
Those are things you should mention at first
my bad
Can you try a
telnet 172.19.0.3 6379
instead?root@Immich:~# telnet 172.19.0.3 6379
Trying 172.19.0.3...
telnet: Unable to connect to remote host: Connection refused
So that port is indeed not open/exposed
the default compose doesn't have the ports, does it make any difference ?
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

not even joking lol
Can you try bringing down redis, deleting the docker volume it's using, and bringing it back up?
yeah, one sec
want me to change anything in the compose while i am at it ?
You can remove the ports again
Not sure what else you changed
image
from redis 6.2 to 7.4
i will change it back to 6.2
Idk if redis had breaking changes (I doubt it)
Yeah just do that
re-deploying now
still no logs
Is it working though?
Restart Immich?
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 redisWait 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 ;))
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 displayingIn the postgres folder there should be log files
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
Yeah so your database isn't up
What makes you say it is up?
it shows as unhealthy in postgres
What system are you running on, what sort of specs does it have?
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
docker in lxc is unsupported and can run into weird issues
Me too 😅
well... what is the safest and supported way ?
time to copy all images lol
Docker :P
isn't lxc just an enviroment where docker runs on top of ?
Correct, that's nested containerization
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
At least you have backups, right?
That's definitely good 😅
yeah, just a pain to move them lol
Fair enough
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
You usually don't want to have swap disabled completely fwiw
next weeks problem to figure out
i gave it enough ram and cpu for now to not bottleneck