-
-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught error when trying to use Redis >=7.4 #2244
Comments
I think the The actual error is likely something else. For example, the first problem I see in your docker compose config is that you are missing the link between the shlink and redis services. networks:
shared:
name: shared-network
services:
redis:
container_name: redis
image: redis:latest
restart: unless-stopped
ports:
- 6379:6379
networks:
- shared
shlink:
container_name: shlink
image: shlinkio/shlink:stable-roadrunner
restart: unless-stopped
ports:
- 8080:8080
environment:
- "DEFAULT_DOMAIN=s.test"
- "IS_HTTPS_ENABLED=false"
- "SKIP_INITIAL_GEOLITE_DOWNLOAD=true"
- "SHORT_URL_TRAILING_SLASH=true"
- "SHELL_VERBOSITY=3"
- "REDIS_SERVERS=tcp://redis:6379/0"
- "REDIS_PUB_SUB_ENABLED=true"
networks:
- shared
depends_on:
- redis
+ links:
+ - redis Can you try if it works with that? |
@acelaya Thanks, but adding the We've also tried this in the cloud where we first noticed the error, so I went ahead and reproduced this locally to report it. I've also tried using other Redis drop-ins like Dragonfly and Garnet with the same results so I'm completely stumped as to why this happens. |
Thanks for the confirmation. I will try to find out what is the root error being thrown, as you provided very useful and concrete reproducible steps (much appreciated). |
Ok, I think I found something. It seems to be related with redis version. I suppose the abstraction libraries used by Shlink do not yet support everything. These versions worked for me:
And these didn't:
Could you try one of the above? |
I've been able to reproduce the issue in a development environment. I'm going to try to dig what's the actual difference between redis 7.4 and older versions, and report it to the appropriate project, or fix it here if possible. |
This is the root cause symfony/symfony#58660 |
Marking as blocked until the issue is fixed upstream. I'll release a patch version once it has been fixed. In the meantime, using redis 7.2 should work. |
@acelaya Thanks for looking into this, I'll monitor progress and wait for an update release. |
I'm unblocking this, as there's a simple workaround that can be put in place until this has been fixed upstream. |
I have just released v4.2.5. Docker images are being built at the moment, and will be available once https://github.com/shlinkio/shlink/actions/runs/11650632374 has finished. Could you test it afterwards? |
@acelaya Tested and working. Thanks for the quick fix! |
Shlink version
4.2.4
PHP version
RoadRunner 2024.2.1
How do you serve Shlink
Docker image
Database engine
MicrosoftSQL
Database version
2022
Current behavior
Simple single instance Redis configuration does not work and throws an uncaught error on startup.
Log on the Redis server:
Expected behavior
Basic Redis configuration should just work.
Minimum steps to reproduce
Run the following Docker Compose:
Shlink starts up but fails when trying to use Redis.
The text was updated successfully, but these errors were encountered: