我试图在docker中运行localstack并收到以下错误:
等待所有LocalStack服务准备就绪localstack_1
| 2019-09-08T12:32:52:错误:localstack.services.generic_proxy:错误 转发请求:HTTPConnectionPool(host ='127.0.0.1',port = 4561): URL超过最大重试次数:/(由引起 NewConnectionError(':无法建立新的连接:[Errno 111] 连接被拒绝',))追溯(最近一次通话结束):localstack_1 |文件 “ /opt/code/localstack/.venv/lib/python3.6/site-packages/urllib3/connection.py”, _new_conn localstack_1中的第160行|
(self._dns_host,self.port),self.timeout,** extra_kw)localstack_1
|文件“ /opt/code/localstack/.venv/lib/python3.6/site-pack
我不确定自己做错了什么,我有从图像运行的本地堆栈:
localstack:
image: localstack/localstack:latest
#container_name: app_localstack
ports:
- '4563-4599:4563-4599'
- '8055:8080'
environment:
- SERVICES=sns,sqs
- HOSTNAME=localstack
- DEFAULT_REGION=eu-west-2
- DEBUG=1
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
- localdevenv
使用在网上找到的信息,我随后在镇上/高山上运行一个短暂的乐队,以创建必要的SQS主题和队列。
localstack-configurator:
build:
context: ./dockerImgs/localstack
dockerfile: Dockerfile
container_name: localstack-configurator
environment:
- AWS_ACCESS_KEY_ID=xxx
- AWS_SECRET_ACCESS_KEY=xxx
- AWS_DEFAULT_REGION=eu-west-2
depends_on:
- localstack
networks:
- localdevenv
似乎队列创建正确,订阅工作是整个过程中最奇怪的部分。
这正在MacOS Sierra上运行最新版本的Docker。