Skip to content
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

[CRASH] Redis Sentinel rewrite redis.conf by incorrect parameter #7760

Closed
pavel-z1 opened this issue Sep 8, 2020 · 1 comment · Fixed by #7761
Closed

[CRASH] Redis Sentinel rewrite redis.conf by incorrect parameter #7760

pavel-z1 opened this issue Sep 8, 2020 · 1 comment · Fixed by #7761
Assignees

Comments

@pavel-z1
Copy link

pavel-z1 commented Sep 8, 2020

Crash report

Redis sentinel rewrite option oom-score-adj-values 0 200 800 in the file /etc.redis.con by incorrect 0 200 800

Diff:

@@ -1063,7 +1063,7 @@
 # starts. Because typically the initial value is 0, they will often match the
 # absolute values.

-oom-score-adj-values 0 200 800
+0 200 800

 ############################## APPEND ONLY MODE ###############################

After Redis Sentinel is started it is not possible to start Redis server. Logs from /var/log/messages:

Sep  8 13:05:51 beta-redis-cluster-03 systemd: Starting Redis persistent key-value database...
Sep  8 13:05:51 beta-redis-cluster-03 redis-server: *** FATAL CONFIG FILE ERROR (Redis 6.0.7) ***
Sep  8 13:05:51 beta-redis-cluster-03 redis-server: Reading the configuration file, at line 1066
Sep  8 13:05:51 beta-redis-cluster-03 redis-server: >>> '0 200 800'
Sep  8 13:05:51 beta-redis-cluster-03 redis-server: Bad directive or wrong number of arguments
Sep  8 13:05:51 beta-redis-cluster-03 systemd: redis.service: main process exited, code=exited, status=1/FAILURE
Sep  8 13:05:51 beta-redis-cluster-03 systemd: Failed to start Redis persistent key-value database.
Sep  8 13:05:51 beta-redis-cluster-03 systemd: Unit redis.service entered failed state.
Sep  8 13:05:51 beta-redis-cluster-03 systemd: redis.service failed

Aditional information

  1. OS distribution and version
CentOS Linux release 7.8.2003 (Core)
Redis server v=6.0.7 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=2b369386c34cdeb6
# yum info redis
Installed Packages
Name        : redis
Arch        : x86_64
Version     : 6.0.7
Release     : 1.el7.remi
Size        : 4.0 M
Repo        : installed
From repo   : remi
Summary     : A persistent key-value database
URL         : http://redis.io
License     : BSD
  1. Steps to reproduce (if any)
  2. Configure Redis Sentinel with any parameters
  3. Start redis-sentinel service
  4. Restart redis service
    100% reproduced.
@yossigo yossigo self-assigned this Sep 8, 2020
@oranagra oranagra mentioned this issue Sep 9, 2020
bob-beck pushed a commit to openbsd/ports that referenced this issue Sep 11, 2020
ok rsadowski

Upgrade urgency HIGH: Anyone who's using Redis 6.0.7 with Sentinel or
CONFIG REWRITE command is affected and should upgrade ASAP, see #7760.
[redis/redis#7760]

Bug fixes:

* CONFIG REWRITE after setting oom-score-adj-values either via CONFIG SET or
  loading it from a config file, will generate a corrupt config file that will
  cause Redis to fail to start
* Fix issue with redis-cli --pipe on MacOS
* Fix RESP3 response for HKEYS/HVALS on non-existing key
* Various small bug fixes

Full release notes:
https://github.com/redis/redis/blob/6.0.8/00-RELEASENOTES
@momomo
Copy link

momomo commented Feb 9, 2021

What is the fucking fix for those that are not on 6.0.8?

Link: https://redis.io/topics/config

Still includes the flawed config files leaving to a bunch of waste of time. Fix that too. What is the fix now? It is not clear.
Comment out 'oom-score-adj no' ?

*** FATAL CONFIG FILE ERROR (Redis 6.0.6) ***
Reading the configuration file, at line 1062

'oom-score-adj no'
Bad directive or wrong number of arguments
j@j-server-101:/c/configuration/redis/6/server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants