我在 docker 容器中安装了 localstack 和 awscli。我运行不同的 aws 命令来列出流和存储桶,但是当我尝试列出 dynamoDB 表时(如下所示),它失败了:
aws --region us-east-1 --endpoint-url=http://localhost:4569 dynamodb list-tables
这是我得到的错误:
2018-07-12T09:26:35:ERROR:localstack.services.generic_proxy: Error forwarding request: HTTPConnectionPool(host='127.0.0.1', port=4564): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f68941a43d0>: Failed to establish a new connection: [Errno 111] Connection refused',)) Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/localstack/services/generic_proxy.py", line 201, in forward
headers=forward_headers)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 508,in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 618,in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 508,in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=4564): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f68941a43d0>: Failed to establish a new connection: [Errno 111] Connection refused',))
我没有在互联网上找到任何解决我问题的回复。
如果有人有线索或想法,我将不胜感激。
提前致谢