We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一直报这个错误,但是通过 redis-cli 就可以连接,而且看服务都是启动的,通过文档里生产环境的部署方法启动的。
redis-cli
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused.
The text was updated successfully, but these errors were encountered:
应该是程序的配置文件没有改,docker访问127.0.0.1.. 还是在那个docker内部,好吧,是我傻了,我们就当无事发生过...
Sorry, something went wrong.
实际上确实启动不了,我检查了一下,在 Config.setting 模块的 DATABASES 里没有设置成 docker-compose 文件里设置的 links 指定的 proxy_pool,而且 port 也是 8888 而不是 6379。看了下历史,从创建开始配置就是不正确的。
如果不用docker-compose,可以用--net=host参数连接宿主机的redis
docker run -itd --rm --net=host -v $(pwd):/usr/src/app proxy_pool
如果redis也是docker跑的
可以使用link把redis的容器连过来
docker run -it --rm --name proxy_pool --link c92096d24537:redis -v $(pwd):/usr/src/app -p 7188:7188 proxy_pool
我在docker的两个容器里分别跑redis和proxy_pool。env参数用link会连接不到数据库,但是用redis所在container的ip就没问题。有办法使用docker的link吗
No branches or pull requests
一直报这个错误,但是通过
redis-cli
就可以连接,而且看服务都是启动的,通过文档里生产环境的部署方法启动的。redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:6379. Connection refused.
The text was updated successfully, but these errors were encountered: