I am trying to set up a docker build file that is intended to replace a single Docker container solution that runs several processes (RQ worker, RQ dashboard and Flask application) with Supervisor .
The host system is Debian 8 Linux, and my docker-compose.yml
looks like this (I deleted all other entries to reduce the sources of errors):
version: '2' services: redis: image: redis:latest rq-worker1: build: . command: /usr/local/bin/rqworker boo-uploads depends_on: - redis
"rq-worker1" is a Python RQ worker trying to connect to redis via localhost and port 6379, but it cannot establish a connection:
redis_1 | 1:M 23 Dec 13:06:26.285 * The server is now ready to accept connections on port 6379 rq-worker1_1 | [2016-12-23 13:06] DEBUG: worker: Registering birth of worker d5cb16062fc0.1 rq-worker1_1 | Error 111 connecting to localhost:6379. Connection refused. galileoqueue_rq-worker1_1 exited with code 1
The output of docker ps
as follows:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 36cac91670d2 redis:latest "docker-entrypoint.sh" 14 minutes ago Up About a minute 6379/tcp galileoqueue_redis_1
I tried everything: from running a working RQ from local IPs 0.0.0.0/127.0.0.1 and even from localhost. Other solutions published in Stackoverflow also did not work for me ( docker-compose: the connection was refused between containers, but access to the service was from a host , for example.).
And this is my docker info
output:
Containers: 25 Running: 1 Paused: 0 Stopped: 24 Images: 485 Server Version: 1.12.5 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 436 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: null bridge host overlay Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: Kernel Version: 3.16.0-4-amd64 Operating System: Debian GNU/Linux 8 (jessie) OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 13.61 GiB Name: gp-pc-201 ID: LBGV:K26G:UXXI:BWRH:OYVE:OQTA:N7LQ:I4DV:BTNH:FZEW:7XDD:WOCU
Does anyone have an idea why the connection between the two containers is not working?
source share