Server is not responding

Hi there,

I set up my influx instance on a Raspberry Pi using Docker and Docker Compose. The YAML file is attached below. InfluxDB, NodeRed and Grafana containers are up and running, NodeRed and Grafana are working as well, while influx is not working.

dbocksteger@stats:~$ sudo docker ps
[sudo] password for dbocksteger:
CONTAINER ID   IMAGE                              COMMAND                  CREATED       STATUS                    PORTS                    NAMES
12b245bcb009   nodered/node-red                   "npm --no-update-not…"   2 hours ago   Up 44 seconds (healthy)   0.0.0.0:1880->1880/tcp   nodered
3dece8d58e76   grafana/grafana                    "/run.sh"                2 hours ago   Up 44 seconds             0.0.0.0:3000->3000/tcp   grafana
3ac1651da66a   quay.io/influxdb/influxdb:v2.0.4   "/entrypoint.sh infl…"   2 hours ago   Up 44 seconds             0.0.0.0:8086->8086/tcp   influxdb

I’m wondering whether it is correct, that all containers are running with ip 0.0.0.0, but as mentioned above, NodeRed and Grafana are working like charm.

But when I try to use Influx, nothing is working. I’m not abled to perform queries using influx only, trying to pass a host like localhost or the Pi’s IP fails even more.

dbocksteger@stats:~$ influx
WARN: Connected to http://localhost:8086, but found no server version.
Are you sure an InfluxDB server is listening at the given address?
InfluxDB shell version: 1.6.4
> SHOW DATABASES
ERR: received status code 401 from server

dbocksteger@stats:~$ influx -host localhost:8086
Failed to connect to http://[localhost:8086]:8086: Get http://[localhost:8086]:8086/ping: dial tcp: lookup localhost:8086: no such host
Please check your connection settings and ensure 'influxd' is running.

dbocksteger@stats:~$ influx -host 192.168.178.22:8086
Failed to connect to http://[192.168.178.22:8086]:8086: Get http://[192.168.178.22:8086]:8086/ping: dial tcp: lookup 192.168.178.22:8086: no such host
Please check your connection settings and ensure 'influxd' is running.

Trying to connect using Grafana I only get Bad Gateway. I really hope someone in this community is capable to help me out solving this issue.

The whole *.yml looks like:

version: "2.2"

services:

  grafana:
    image: grafana/grafana
    container_name: grafana
    restart: always
    ports:
      - 3000:3000
    networks:
      - knx
    volumes:
      - grafana-volume:/knxstats

  influxdb:
    image: quay.io/influxdb/influxdb:v2.0.4
    container_name: influxdb
    restart: always
    ports:
      - 8086:8086
    networks:
      - knx
    volumes:
      - influxdb-volume:/knxstats
    environment:
      - INFLUXDB_DB=knxstats

      - INFLUXDB_HTTP_ENABLED=true
      - INFLUXDB_HTTP_AUTH_ENABLED=true

      - INFLUXDB_HTTP_BIND_ADDRESS: 127.0.0.1:8086

      - INFLUXDB_USER=admin

      - INFLUXDB_ADMIN_USER=admin
      - INFLUXDB_ADMIN_PASSWORD=admin

  nodered:
    image: nodered/node-red
    container_name: nodered
    restart: always
    environment:
      - TZ=Europe/Amsterdam
    ports:
      - 1880:1880
    networks:
      - knx
    volumes:
      - node-red-data:/knxstats

volumes:
  grafana-volume:
  influxdb-volume:
  node-red-data:

networks:
  knx:

What makes me additionally wondering; In the used directory /knxstats still is the YAML file completely alone, altough it is mentioned in the file as volume for every service.

  • First of all, check the docker logs of the influxdb container. What does the log say?
  • I don’t understand what you want to achieve with these /knxstats folders in every container?
  • Where did you get this docker-compose.yml file from?