Docker Compose Dial Tcp Lookup No Such Host

Kent - September 28, 2023

If you happen to be working with Docker and Docker Compose, with multiple services, and you get E! Write error: Post \"http://host:1234/api/v2/write?bucket=http-logs\": dial tcp: lookup influxdb on 127.0.0.11:53: no such host, batch kept for retrying"}, make sure both the client and server are on the same docker network.

version: "3.7"

services:
  caddy:
    networks:
      - monitoring
  influxdb:
    networks:
      - monitoring
networks:
  monitoring:

See Also

Comments

Any comments? Create a new discussion on GitHub.
There used to be an inline comment form here, but it was removed.