This may be an extension of this post, but I figured it might be a different problem since that post is more then 2 years old.
Basically, I am using the redis
image and connecting it to my web server. Here is my docker compose config:
version: '3'
services:
...
session-store:
image: redis
ports:
- 6379:6379
restart: on-failure
networks:
- babylon
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASS"
container_name: 'session-store'
environment:
- REDIS_PASS=<pass>
...
For some reason, after some time I am getting this error:
9:C 10 May 2024 15:14:37.012 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
9:C 10 May 2024 15:14:37.012 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=9, just started
9:C 10 May 2024 15:14:37.012 * Configuration loaded
9:M 10 May 2024 15:14:37.012 * monotonic clock: POSIX clock_gettime
9:M 10 May 2024 15:14:37.013 * Running mode=standalone, port=6379.
9:M 10 May 2024 15:14:37.013 * Server initialized
9:M 10 May 2024 15:14:37.013 * Ready to accept connections tcp
9:M 10 May 2024 16:14:38.076 * 1 changes in 3600 seconds. Saving...
9:M 10 May 2024 16:14:38.077 * Background saving started by pid 14
14:C 10 May 2024 16:14:38.099 * DB saved on disk
14:C 10 May 2024 16:14:38.101 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
9:M 10 May 2024 16:14:38.178 * Background saving terminated with success
9:signal-handler (1715364019) Received SIGTERM scheduling shutdown...
9:M 10 May 2024 18:00:19.541 * User requested shutdown...
9:M 10 May 2024 18:00:19.541 * Saving the final RDB snapshot before exiting.
9:M 10 May 2024 18:00:19.557 * DB saved on disk
9:M 10 May 2024 18:00:19.557 # Redis is now ready to exit, bye bye...
I’ve searched the internet for an answer, but most of them rely on changing the service type in the file system. But since I am using the official docker image, it should have all the configurations set.
Has anyone encountered this and found any fix?
2
Answers
The solution is kind of stupid if you ask me, but it worked for me at least.
The system that I am using is an
Ubuntu 24 LTS
server. The problem is that I have installeddocker
anddocker-desktop
and they are not good friends with each other. What I did was uninstalldocker
anddocker-desktop
and reinstalling them from 0.Here are the steps that I took:
Instalation process:
Install Docker Compose(Optional)
For me works with
docker compose
command. I did not install follow thedocker-compose
steps since I did not need them. I just place them in case someone has a hard time setting it up.i am using docker under kubernetes , and had something same with bitnami/redis repo , the problem was in livenessProbe and readinessProbe , increasing initialDelaySeconds, periodSeconds, timeoutSeconds solved my problem