Netbox and redis sentinel

323 views
Skip to first unread message

Samuel Mutel

unread,
Jul 22, 2021, 11:07:44 AM7/22/21
to NetBox
Hello,

I have a sentinel redis cluster setup with 3 nodes.

Here is the result of the command redis-cli -p 5000 info sentinel
# Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
sentinel_simulate_failure_flags:0
master0:name=master01,status=ok,address=XX.XX.XX.XX:6379,slaves=2,sentinels=3

I have the error message below in netbox logs:
/opt/netbox/current/venv-py3/lib/python3.7/site-packages/cacheops/redis.py:19: RuntimeWarning: The cacheops cache is unreachable! Error: No master found for 'master'
  warnings.warn("The cacheops cache is unreachable! Error: %s" % e, RuntimeWarning)

Here is my redis config in Netbox:
REDIS = {
    'tasks': {
        'SENTINELS': [
            ('XX.XX.XX.XX', 5000),
            ('XX.XX.XX.XX', 5000),
            ('XX.XX.XX.XX', 5000),
        ],
        'SENTINEL_SERVICE': 'master',
        'SENTINEL_TIMEOUT': 1800,
        'PASSWORD': 'password',
        'DATABASE': 0,
        'SSL': False,
    },
    'caching': {
        'SENTINELS': [
            ('XX.XX.XX.XX', 5000),
            ('XX.XX.XX.XX', 5000),
            ('XX.XX.XX.XX', 5000),
        ],
        'SENTINEL_SERVICE': 'master',
        'SENTINEL_TIMEOUT': 1800,
        'PASSWORD': 'password',
        'DATABASE': 1,
        'SSL': False,
    }
}

What's wrong in my config ?
The SENTINEL_SERVICE parameter ?

Thanks.

Brian Candler

unread,
Jul 22, 2021, 11:58:06 AM7/22/21
to NetBox
Is the master set really called just 'master', or is it 'master01' ?

Samuel Mutel

unread,
Jul 23, 2021, 3:41:42 AM7/23/21
to NetBox
I tried master01, master0, netbox => same issue.
Reply all
Reply to author
Forward
0 new messages