I have the following setup: -
RPi 4 with 4GB ram Ubuntu 20:04 server Docker version 19.03.11, build 42e35e6
I've got everything contained in
docker containers created via
The problem I have is when I configure the
host in the node-red
instance node I get this message:
pbu_node-red | [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379 pbu_node-red | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
I've created the node-red image myself using this Dockerfile
FROM nodered/node-red RUN echo 'Installing required nodes...' WORKDIR /usr/src/node-red RUN npm install node-red-contrib-redis RUN npm install node-red-contrib-influxdb
redis image is straight from Docker Hub. I know Docker creates its own network when you deploy the containers via
docker-compose and I believe the hostname I should have in the redis instance is
redis:6379. Unfortunately this gives the same error.
docker-compose file looks like this:
ersion: '3.7' services: redis: container_name: pbu_redis image: djtbrit/redis # ports: # - "6379:6379" networks: - pbu-net # environment: # - REDIS_URL=redis://redis:6379/0 volumes: - redis-data influx: container_name: pbu_influx image: influxdb ports: - "8086:8086" networks: - pbu-net volumes: - infux-data grafana: container_name: pbu_grafana image: grafana/grafana ports: - "80:3000" networks: - pbu-net depends_on: - redis - influx volumes: - grafana-data:/var/lib/grafana node-red: container_name: pbu_node-red image: djtbrit/node-red environment: - TZ=UTC/UTC - REDIS_URL=redis://redis:6379/0 ports: - "1880:1880" volumes: - node-red-data links: - redis networks: - pbu-net depends_on: - redis - influx volumes: node-red-data: redis-data: influx-data: grafana-data:
I've spent many days trying to resolve this and I'm not progressing at all...
Any help gratefully received.