RedisInsight on Docker and Redis on Docker: Could not connect: Error 99 connecting to localhost:6379. Cannot assign requested address

RedisInsight on Docker and Redis on Docker: Could not connect: Error 99 connecting to localhost:6379. Cannot assign requested address

Using this setup in docker-compose.yml

version: 3.7

services:
  redis:
    image: redis:6.0.6
    ports:
      - 127.0.0.1:6379:6379/tcp
    volumes:
      - redis_data:/data:rw
    healthcheck:
      test: redis-cli ping
      interval: 3s
      timeout: 5s
      retries: 5

  redisinsight:
    image: redislabs/redisinsight:latest
    ports:
      - 127.0.0.1:8001:8001

you can access redis via

enter

RedisInsight are trying to connect to containers localhost. Try typing 127.0.0.1 into Host field.

If file host has been changed like the updated information in question, use 192.168.1.44 .

Run Redis Insights in Docker Compose

RedisInsight on Docker and Redis on Docker: Could not connect: Error 99 connecting to localhost:6379. Cannot assign requested address

Since you havent mentioned any network for the containers, they are conneted to the default bridge network. learn more

To get container IP address

Type in your terminal

# Check container network IP address

docker container inspect -f {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} <container name>

Use the IP address in: http://localhost:8001/ (RedisInsight).

or

(Not Recommended) Type the IP address of your HOST machine will solve the problem

Use ipconfig or ifconfig based on your OS to get your IP

Leave a Reply

Your email address will not be published.