rqlite: I deployed rqlite by docker compose but it returned peer error

Hi, when I deploy rqlite and a service that call rqlite, but I received an error like this

tried all peers unsuccessfully. here are the results: peer #0: http://0.0.0.0:4001/status failed due to Get "http://0.0.0.0:4001/status": dial tcp 0.0.0.0:4001: connect: connection refused

Here how I write the docker compose file:

rqlite:
    image: rqlite/rqlite:5.9.0
    container_name: rqlite
    ports:
      - 4001:4001
      - 4002:4002
    restart: always
    logging:
      driver: "json-file"
      options:
        max-file: "10"
        max-size: 20m
    healthcheck:
      test: ["CMD", "curl", "http://localhost:4001/status"]

And the connection uri I used is: http://rqlite:4001

Have anyone met that issue and how to fix it?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

OK, thanks for the update.

I am not a Docker expert, so I can’t help you much more I’m afraid. I can tell you exactly what the various command line params do, but you’ll need to figure out how to make them work. Plenty of folks have got rqlite working fine in Docker, so it’s not something broken with rqlite. You could try the rqlite Google Group for more ideas.