I
Immichβ€’6mo ago
DrAg0n141

Immich and dragonfly

I have the strange problem when i update the dragonfly cluster a new pod is master. Because of that there is an ip change and immich wants to use the old ip address. I can only fix that with a restart of the immich pods.
25 Replies
Immich
Immichβ€’6mo ago
:wave: Hey @DrAg0n141, 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. Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Mraedis
Mraedisβ€’6mo ago
Okay, what exactly is it that you want from us? Other than "use a hostname, not an IP" there's not much help we can offer
DrAg0n141
DrAg0n141OPβ€’6mo ago
I am using the hostname, i think that immich does resolve the hostname only one time. and when the ip has changed it uses the cached ip of the hostname.
Zeus
Zeusβ€’6mo ago
what do you mean, "immich wants to use"? the app or the server?
DrAg0n141
DrAg0n141OPβ€’6mo ago
The server, the app does not use redis or dragonfly
Zeus
Zeusβ€’6mo ago
ok. the server doesn't really have any control/opinion as to what IP it's on this would be an issue with the pod migration / clustering service immich listens on all available IPs by default
Mraedis
Mraedisβ€’6mo ago
It's the other way around @Zeus he's using an external redis cluster, dragonfly
DrAg0n141
DrAg0n141OPβ€’6mo ago
Yes the problem is from the immich server to the redis cluster (dragonfly)
Zeus
Zeusβ€’6mo ago
oh I see interesting so the REDIS_HOSTNAME is not re resolving?
DrAg0n141
DrAg0n141OPβ€’6mo ago
It is resolving one time, when the ip has changed it does not get the new address.
Mraedis
Mraedisβ€’6mo ago
It is, but the IP doesn't re-resolve on update Not really an immich issue πŸ‘€ but still interesting I think your best bet would be using an intermediate proxy
DrAg0n141
DrAg0n141OPβ€’6mo ago
I am running this all in an kubernetes cluster, normally i have a load balancer service in front. That does not help.
Mraedis
Mraedisβ€’6mo ago
I meant immich -> proxy for redis -> redis It can probably even run in the cluster But immich won't re-resolve the redis IP, and your redis cluster isn't able to get a fixed IP, so the only solution would be to place something that can do both in between
DrAg0n141
DrAg0n141OPβ€’6mo ago
What proxy can i use for that?
Mraedis
Mraedisβ€’6mo ago
Something dead simple like NPM?
DrAg0n141
DrAg0n141OPβ€’6mo ago
Yes that can work. But only for interest why does immich not re-resolve the ip?
Mraedis
Mraedisβ€’6mo ago
It might, eventually, how long have you waited? πŸ‘€
DrAg0n141
DrAg0n141OPβ€’6mo ago
Over a day πŸ˜… it does not fixed it by itself
bo0tzz
bo0tzzβ€’6mo ago
If Immich is pointed at a kubernetes Service then afaik that service should have a stable IP even if the backing endpoints change and so Immich shouldn't need to do anything
DrAg0n141
DrAg0n141OPβ€’6mo ago
I thought so too, but every dragonfly upgrade immich crashes.
sogan
soganβ€’6mo ago
Can you post the logs? I don't know if it's at all related, but BullMQ requires a specific configuration for Dragonfly: https://www.dragonflydb.io/docs/integrations/bullmq
reefland πŸ‡ΊπŸ‡Έ
Any movement on getting Immich to not cache the IP (or renew cache on write failure)? Immich still needs a forced restarted after every Dragaonfly update or leader change as it then tries to write to a read-only replica.
W20250421 11:44:40.166092 11 main_service.cc:1374] EVALSHA b8c8950186e870a4dfcc57e460f7637cd1c25077 8 immich_bull:search:stalled immich_bull:search:wait immich_bull:search:active immich_bull:search:failed immich_bull:search:stalled-check immich_bull:search:meta immich_bull:search:paused immich_bull:search:events 1 immich_bull:search: 1745235880165 30000 failed with reason: Error running script (call to b8c8950186e870a4dfcc57e460f7637cd1c25077): @user_script:195: -READONLY You can't write against a read only replica.
W20250421 11:44:40.517180 11 script_mgr.cc:328] Error running script (call to b8c8950186e870a4dfcc57e460f7637cd1c25077): @user_script:195: -READONLY You can't write against a read only replica.
W20250421 11:44:40.166092 11 main_service.cc:1374] EVALSHA b8c8950186e870a4dfcc57e460f7637cd1c25077 8 immich_bull:search:stalled immich_bull:search:wait immich_bull:search:active immich_bull:search:failed immich_bull:search:stalled-check immich_bull:search:meta immich_bull:search:paused immich_bull:search:events 1 immich_bull:search: 1745235880165 30000 failed with reason: Error running script (call to b8c8950186e870a4dfcc57e460f7637cd1c25077): @user_script:195: -READONLY You can't write against a read only replica.
W20250421 11:44:40.517180 11 script_mgr.cc:328] Error running script (call to b8c8950186e870a4dfcc57e460f7637cd1c25077): @user_script:195: -READONLY You can't write against a read only replica.
I have ArgoCD, PaperlessNGX, Authelia using Dragonfly with no issues after leader change.
bo0tzz
bo0tzzβ€’2w ago
I haven't investigated but that'd probably be something to take up with the bullmq library That said, maybe just don't bother fixing it as we're looking to drop redis entirely

Did you find this page helpful?