Redis Service Failed to Start
Redis Service Failed to Start in Redis Issues.
Redis Service Failed to Start#
Getting below error while starting redis in single mode.
Recent Events:
Time Type Description
2023-03-21T15:37:35+05:30 Not Restarting Error was
unrecoverable
2023-03-21T15:37:35+05:30 Driver Failure rpc error: code =
Unknown desc = failed to start task, could not start container: Post
"http://u/v1.0.0/libpod/containers/129239cfc288d099c39735fe3c916e652
e4baec8c913ddcfe00fe51c9e8d8c65/start": context deadline exceeded
(Client.Timeout exceeded while awaiting headers)
2023-03-21T15:37:26+05:30 Killing Sent interrupt.
Waiting 5s before force killing
2023-03-21T15:37:26+05:30 Sibling Task Failed Task's sibling
"redis-node1" failed
2023-03-21T15:34:09+05:30 Task Setup Building Task
Directory
2023-03-21T15:34:09+05:30 Received Task received by
client
RCA: the containers are unable to start as the servers provided to you are very slow. Since, redis service attempts to start 6 jobs at once and the servers are very slow, so it is getting timed out.
Solution : we have separated each of these 6 jobs and run them separately post which redis is starting properly and cluster got formed.
Redis Node Outage and UI Accessibility Issue#
On February 27th, one of the Redis nodes experienced an outage, likely due to a network issue or backup server activity performed.
Solution: The issue was resolved by adding the following entry in the Redis Nomad file:
cluster-allow-reads-when-down yes
This configuration ensures that even if any of the Redis nodes goes down, the cluster allows reads to keep the configuration data accessible.
2. Despite the Redis node outage, the UI and Control Center (CC) remained accessible, and no data drop was observed during the identified time period.
Data Not Reflecting in UI Due to Redis-Microservice Connection Issue with Percona#
Data is not reflecting in the UI because the Redis microservice is unable to connect to Percona. The Redis microservice logs indicate the following error:
Caused by: com.mysql.cj.exceptions.CJCommunicationsException:
Communications link failure
The logs from the Redis microservice container show that communication to the Percona IP and port is not happening. This issue is observed on the first server, where communication between the respective containers of all services is disrupted.
echo "" > /dev/tcp/192.0.2.149/9998
echo "" > /dev/tcp/192.0.2.149/15671
echo "" > /dev/tcp/192.0.2.149/15672
RCA: The issue is related to a blocking state error in the kernel logs,
grep -i block /var/log/messages
Solution:
-
Workaround for Blocking State Error: Add the following file as a workaround:
cat > /etc/NetworkManager/conf.d/podman-cni.conf << EOF [keyfile] unmanaged-devices=interface-name:cni-podman*;interface-name:veth* EOFThis will not resolve the issue.
-
Change Network Mode to 'host' for Nomad Services:
- Modify the Nomad files to change the network mode to 'host ' for services on the first server.
- Mount the edited conf.properties from outside to the containers to resolve port conflicts.
- Shift the event-detector service to the second server to avoid port conflicts (specifically port 8080).
Redis Service Fails to Start#
When the redis service fails to start, the redis UI will not be accessible and the following error is displayed:
Time Type Description
2023-03-21T15:37:35+05:30 Not Restarting Error was
unrecoverable
2023-03-21T15:37:35+05:30 Driver Failure rpc error: code =
Unknown desc = failed to start task, could not start container: Post
"http://u/v1.0.0/libpod/containers/129239cfc288d099c39735fe3c916e652
e4baec8c913ddcfe00fe51c9e8d8c65/start": context deadline exceeded
(Client.Timeout exceeded while awaiting headers)
2023-03-21T15:37:26+05:30 Killing Sent interrupt.
Waiting 5s before force killing
2023-03-21T15:37:26+05:30 Sibling Task Failed Task's sibling
"redis-node1" failed
2023-03-21T15:34:09+05:30 Task Setup Building Task
Directory
2023-03-21T15:34:09+05:30 Received Task received by
client
Cause of the Error: The containers are unable to initiate due to the slow performance of the provided servers. Specifically, the Redis service makes six simultaneous start attempts, but due to the server's slow response, it times out.
Solution: Split each of these six jobs into individual processes, running them separately. After doing this, Redis starts correctly, and the cluster is successfully formed.
These individual process involves creating different NOMAD files, hence note the error and contact the respective team.
Redis Service Restart Issue#
After a system reboot, the Redis service failed to start due to a corrupted data directory.
RCA: The error message indicated a bad file format reading the append-only file, suggesting a corruption issue:
Bad file format reading the append only file
appendonly.aof.234.incr.aof: make a backup of your AOF file, then
use ./redis-check-aof --fix <filename.manifest>
Solution: The corrupted data directory should be cleared on all nodes. This resolves the issue and allowing the Redis service to start successfully.