1

我是处理 Parse-Server 和在 AWS 上托管的新手。但是我注意到,当我的 Parse Server 环境位于 N.Virginia 时,终端中的“eb labs download”命令可以工作,但是当服务器环境最初保存在俄勒冈州时,会返回完整的错误列表。这些错误与“HTTP 标头错误”有关。有谁知道为什么会这样?提前致谢!错误如下:

Downloading application version...
Traceback (most recent call last):
  File "/usr/local/bin/eb", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/ebcli/core/ebcore.py", line 150, in main
    app.run()
  File "/usr/local/lib/python2.7/site-packages/cement/core/foundation.py", line 797, in run
    return_val = self.controller._dispatch()
  File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 472, in _dispatch
    return func()
  File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 472, in _dispatch
    return func()
  File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 478, in _dispatch
    return func()
  File "/usr/local/lib/python2.7/site-packages/ebcli/core/abstractcontroller.py", line 57, in default
    self.do_command()
  File "/usr/local/lib/python2.7/site-packages/ebcli/labs/download.py", line 36, in do_command
    download_source_bundle(app_name, env_name)
  File "/usr/local/lib/python2.7/site-packages/ebcli/labs/download.py", line 49, in download_source_bundle
    data = s3.get_object(bucket_name, key_name)
  File "/usr/local/lib/python2.7/site-packages/ebcli/lib/s3.py", line 68, in get_object
    Key=key)
  File "/usr/local/lib/python2.7/site-packages/ebcli/lib/s3.py", line 34, in _make_api_call
    return aws.make_api_call('s3', operation_name, **operation_options)
  File "/usr/local/lib/python2.7/site-packages/ebcli/lib/aws.py", line 218, in make_api_call
    response_data = operation(**operation_options)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/client.py", line 251, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/client.py", line 526, in _make_api_call
    operation_model, request_dict)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/endpoint.py", line 141, in make_request
    return self._send_request(request_dict, operation_model)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/endpoint.py", line 170, in _send_request
    success_response, exception):
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/endpoint.py", line 249, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/hooks.py", line 227, in emit
    return self._emit(event_name, kwargs)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/utils.py", line 868, in redirect_from_error
    new_region = self.get_bucket_region(bucket, response)
  File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/utils.py", line 913, in get_bucket_region
    response_headers = service_response['ResponseMetadata']['HTTPHeaders']
KeyError: 'HTTPHeaders'
4

1 回答 1

0

通常,EB CLI 一次在一个区域中工作。如果您有要使用的特定区域,则可以使用--region标志指定它。

 eb labs download --region us-west-2

否则,将 AWS 堆栈资源保留在单个区域中通常是最佳实践。

于 2017-02-03T18:46:53.503 回答