redis ConnectionError on docker
See original GitHub issueIssue Summary
Status: Downloaded newer image for redash/redash:4.0.0-rc.1.b3785
[2018-03-05 01:35:21,730][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-05 01:35:21,760][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
Traceback (most recent call last):
File "/app/manage.py", line 6, in <module>
from redash.cli import manager
File "/app/redash/__init__.py", line 76, in <module>
reset_new_version_status()
File "/app/redash/version_check.py", line 34, in reset_new_version_status
latest_version = get_latest_version()
File "/app/ redash/version_check.py", line 40, in get_latest_version
return redis_connection.get(REDIS_KEY)
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 880, in get
return self.execute_command('GET', name)
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 578, in execute_command
connection.send_command(*args)
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 563, in send_command
self.send_packed_command(self.pack_command(*args))
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 538, in send_packed_command
self.connect()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 442, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address.
A summary of the issue and the browser/OS environment in which it occurs.
Steps to Reproduce
docker-compose.yml
version: '2'
services:
server:
image: redash/redash:4.0.0-rc.1.b3785
depends_on:
- postgres
- redis
ports:
- "45000:5000"
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
REDASH_COOKIE_SECRET: veryverysecret
REDASH_WEB_WORKERS: 4
command: server
restart: always
worker:
image: redash/redash:4.0.0-rc.1.b3785
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
WORKERS_COUNT: 2
command: scheduler
restart: always
redis:
image: redis:3.0-alpine
restart: always
postgres:
image: postgres:9.5.6-alpine
volumes:
- postgres-data:/var/lib/postgresql/data
restart: always
nginx:
image: redash/nginx:latest
ports:
- "45080:80"
depends_on:
- server
links:
- server:redash
restart: always
volumes:
postgres-data: {}
$ docker-compose run --rm server create_db
Technical details:
- Redash Version: 4.0.0-rc.1.b3785
- Browser/OS: ubuntu16.04
- How did you install Redash: dockerhub
I suppose REDASH_REDIS_URL or REDIS_URL has problems
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Redis Docker connection refused - Stack Overflow
If you're running boot2docker (or in any other VM) you need to use the IP of the VM not localhost. If you're using...
Read more >Docker could not connect to redis at 127.0.0.1:6379 - Bobcares
Wondering how to resolve Docker could not connect to redis at 127.0.0.1:6379: connection refused error? We can help you.
Read more >Fails to connect to redis, when running inside of docker ...
My application is a microservice, which connects to a redis database, which is running inside of docker. However, I can not connect to...
Read more >I cannot connect to Redis image from a Node image within ...
I cannot connect to Redis image from a Node image within Docker ... is from my client which is ioredis but it is...
Read more >Redis connection refused, using Docker : r/django - Reddit
py", line 557, in connect raise ConnectionError(self._error_message(e)) redis.exceptions.ConnectionError: Error 111 connecting to 0.0.0.0:6379.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I copy pasted your
docker-compose.yml
file (with a single change: using the4.0.0-rc.1
image) and everything works just fine.Not sure what went wrong in your case, but it looks like a local setup issue. 🤷♂️
Feel free to reopen if you have more details.
Please install
redis-server
bysudo apt-get install redis-server
. And runredis-sever
in background.For me, this problem is solved by installing and running redis-server.