0

I'm trying to set up redis-sentinel from bitnami and I'm getting the following error:

redis-sentinel_1  | nami    ERROR Unable to start com.bitnami.redis-sentinel: 
redis-sentinel_1  | *** FATAL CONFIG FILE ERROR ***
redis-sentinel_1  | Reading the configuration file, at line 69
redis-sentinel_1  | >>> 'sentinel monitor mymaster redis 6379 2'
redis-sentinel_1  | Can't resolve master instance hostname.
redis-sentinel_1  | 
andreaskralj_redis-sentinel_1 exited with code 1

I tried researching this issue but didn't find much about it. I'm following the steps here, and I'm not sure why the error is occuring. For what it's worth, my application works with Redis already, I'm just now trying to get it to work with redis-sentinel. The related code in the development.yml is below:

redis:
    image: bitnami/redis:latest
    networks:
      - private
    volumes:
      - ./tmp:/tmp
  redis-sentinel:
    image: 'bitnami/redis-sentinel:latest'
    depends_on:
      - redis
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    environment:
      - REDIS_MASTER_HOST=redis
    ports:
      - '26379:26379'
    networks:
      - private

Please let me know if there is anything else I can post to shed more light on the subject.

0

Wow, really basic reason to why it wasn't working. I just needed the ALLOW_EMPTY_PASSWORD=yes in the redis config, redis-sentinel wasn't loading because redis exited due to not having the password properties configured properly. This was even in the documentation, I just missed it. In case this is helpful to anyone else, the proper config to allow it to work is as follows:

  redis:
    image: bitnami/redis:latest
    networks:
      - private
    volumes:
      - ./tmp:/tmp
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
  redis-sentinel:
    image: 'bitnami/redis-sentinel:latest'
    depends_on:
      - redis
    environment:
      - REDIS_MASTER_HOST=redis
    ports:
      - '26379:26379'
    networks:
      - private

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.