• 9
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Issues with Redis Cluster in Docker

I am running a Redis Cluster of 48 instances spread across 6 physical servers. These redis instances are running in docker containers.

The cluster is designed as below:

1) 4 Docker containers for Redis Master are running on each of these 4 servers (M1, M2, M3, M4).

2) Each master has 2 slaves. So that means 16 Docker Containers for Redis Slave, running on rest of two servers(S1, S2).

I am facing an issue while fetching the key. For example I am fetching a key which is stored on M1D2 using the redis-cli from the M1D1 it gives me the following error.

# echo "get a " | redis-cli -c -h 172.16.84.181 -p 6351

-> Redirected to slot [3902] located at 172.17.0.1:6350

Could not connect to Redis at 172.17.0.1:6350: Connection refused

Could not connect to Redis at 172.17.0.1:6350: Connection refused

I am quite sure that this issue related to Docker. Is it possible to make the Docker use Base Host eth0 IP for redis, rather than using docker0 IP?

    • how did you run each redis container? You need to forward the ports from the host to the container and then use that forwarded port on the host to connect in
    • we ran the containers with bridge mode networking & are able to connect to the redis instances on the host IP and mapped port.

It uses base host eth0 IP itself to be accessible outside the box.So possibly change the configuration of redis to use the IP of the redis instance as base host eth0 IP and port forward on docker

  • 0
Reply Report
      • 1
    • Can you please shortly describe content or highlights from those links? Answers containing links only risk to became useless if link get stale.

Trending Tags