7

我已经在本地安装了 localstack。使用以下 docker 版本。

Docker 版本:- 18.09.1。

还在我的 Mac 中创建了一个 tmp 目录。

TMPDIR=/私人$TMPDIR

localstack 在没有 docker 版本的情况下工作正常。因为我正在编写测试用例,所以想启动 docker 容器并运行我的测试用例。

这是我的日志输出。你能帮我看看有什么问题吗..

localstack start --docker
Starting local dev environment. CTRL-C to quit.
docker run -it -e LOCALSTACK_HOSTNAME="localhost" -p 8080:8080 -p 443:443 -p 4567-4584:4567-4584 -p 4590-4593:4590-4593 -v "/private/var/folders/_t/t3f89j5n6r1cdsztj2pc9rg00000gq/T/localstack:/tmp/localstack" -v "/var/run/docker.sock:/var/run/docker.sock" -e DOCKER_HOST="unix:///var/run/docker.sock" -e HOST_TMP_FOLDER="/private/var/folders/_t/t3f89j5n6r1cdsztj2pc9rg00000gq/T/localstack" "localstack/localstack" 
2019-02-15 19:40:44,638 CRIT Supervisor running as root (no user in config file)
2019-02-15 19:40:44,641 INFO supervisord started with pid 1
2019-02-15 19:40:45,646 INFO spawned: 'dashboard' with pid 8
2019-02-15 19:40:45,649 INFO spawned: 'infra' with pid 9
(. .venv/bin/activate; bin/localstack web)
(. .venv/bin/activate; exec bin/localstack start)
2019-02-15 19:40:46,667 INFO success: dashboard entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-02-15 19:40:46,668 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Starting local dev environment. CTRL-C to quit.
2019-02-15T19:40:46:INFO:werkzeug:  * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
2019-02-15T19:40:46:INFO:werkzeug:  * Restarting with stat
2019-02-15T19:40:47:WARNING:werkzeug:  * Debugger is active!
2019-02-15T19:40:47:INFO:werkzeug:  * Debugger PIN: 411-291-669
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 mock Secrets Manager (http port 4584)...
Starting local Elasticsearch (http port 4571)...
Starting mock SNS (http port 4575)...
Starting mock STS (http port 4592)...
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)...
2019-02-15T19:41:14:WARNING:infra.pyc: Service "dynamodb" not yet available, retrying...
2019-02-15T19:41:45:WARNING:infra.pyc: Service "dynamodb" not yet available, retrying...
2019-02-15T19:41:59:WARNING:infra.pyc: Service "dynamodb" not yet available, retrying...
2019-02-15T19:42:47:WARNING:infra.pyc: Service "s3" not yet available, retrying...
2019-02-15T19:43:22:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:25:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:29:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:32:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:35:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:39:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:42:ERROR:localstack.services.es.es_starter: Elasticsearch health check failed (retrying...): TransportError(502, u'') Traceback (most recent call last):
File "/opt/code/localstack/localstack/services/es/es_starter.py", line 59, in check_elasticsearch
out = es.cat.aliases()
File "/opt/code/localstack/.venv/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 76, in _wrapped
return func(*args, params=params, **kwargs)
File "/opt/code/localstack/.venv/lib/python2.7/site-packages/elasticsearch/client/cat.py", line 23, in aliases
'aliases', name), params=params)
File "/opt/code/localstack/.venv/lib/python2.7/site-packages/elasticsearch/transport.py", line 314, in perform_request
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
File "/opt/code/localstack/.venv/lib/python2.7/site-packages/elasticsearch/connection/http_requests.py", line 90, in perform_request
self._raise_error(response.status_code, raw_data)
File "/opt/code/localstack/.venv/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
TransportError: TransportError(502, u'')

2019-02-15T19:43:42:WARNING:infra.pyc: Service "elasticsearch" not yet available, retrying...
2019-02-15T19:43:42:ERROR:infra.pyc: Error checking state of local environment (after some retries): Traceback (most recent call last):
File "/opt/code/localstack/localstack/services/infra.py", line 353, in check_infra
raise e
AssertionError

Error starting infrastructure:  Traceback (most recent call last):
File "/opt/code/localstack/localstack/services/infra.py", line 491, in start_infra
check_infra(apis=apis)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 362, in check_infra
check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
File "/opt/code/localstack/localstack/services/infra.py", line 360, in check_infra
4

0 回答 0