0

我在 mac 上执行此操作,在启动 localstack 之前,我运行了pip install --upgrade localstack. 然后,我做到了localstack start。然后我得到了以下异常

Starting local dev environment. CTRL-C to quit.
Starting mock API Gateway (http port 4567)...
Starting mock DynamoDB (http port 4569)...
Starting mock SES (http port 4579)...
Starting mock Kinesis (http port 4568)...
Starting mock Redshift (http port 4577)...
Starting mock S3 (http port 4572)...
Starting mock CloudWatch (http port 4582)...
Starting mock CloudFormation (http port 4581)...
Starting mock SSM (http port 4583)...
Starting mock SQS (http port 4576)...
Starting local Elasticsearch (http port 4571)...
Starting mock SNS (http port 4575)...
Starting mock DynamoDB Streams service (http port 4570)...
Starting mock Firehose service (http port 4573)...
Starting mock Route53 (http port 4580)...
Starting mock ES service (http port 4578)...
Starting mock Lambda service (http port 4574)...
2017-11-23T16:12:41: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 0x10719d1d0>: Failed to establish a new connection: [Errno 61] Connection refused',)) Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/localstack/services/generic_proxy.py", line 181, in forward
    headers=forward_headers)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/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 0x10719d1d0>: Failed to establish a new connection: [Errno 61] Connection refused',))

我实际上检查了是否有任何进程正在监听 4564 by lsof -n -iTCP:4564 | grep LISTEN,但没有返回任何内容。

4

1 回答 1

0

试试这个

DEBUG=1 localstack start

在出错之前的日志中您可能会找到包含以下内容的路径: localstack.ddb.zip(替换下面的some_path) 删除该文件并从 localstack/infra 中删除 dynamodb 包。

rm -f /var/folders/some_path/localstack.ddb.zip
rm -rf /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/localstack/infra/dynamodb/

现在您可以再次尝试 localstack start。

此外:当我在 docker 中运行时,我看到了同样的问题,但是我无法删除任何内容,因为容器是从每个组合上的图像创建的。

于 2018-08-02T11:45:51.950 回答