gcloud由于(SSLHandshakeError)而崩溃:[SSL:UNKNOWN_PROTOCOL]

问题描述 投票:0回答:1

我已经在Ubuntu 16.04.6 LTS上通过链接https://cloud.google.com/sdk/docs/downloads-apt-get安装了gcloud sdk。我还使用以下链接https://cloud.google.com/sdk/docs/proxy-settings完成了代理配置。

Google Cloud SDK 288.0.0
alpha 2020.04.03
beta 2020.04.03
bq 2.0.56
core 2020.04.03
gsutil 4.49
kubectl 2020.04.03

gcloud init成功,并且gcloud info --run-diagnostics没有显示任何问题。但是我运行的任何其他命令gcloud都会崩溃。我尝试了以下命令。

1. gcloud compute images list
2. gcloud services list
3. gcloud logging logs list

这是我在崩溃后收到的消息。

ERROR: gcloud crashed (SSLHandshakeError): [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics

有人可以帮忙。

PS。这是调试输出。

DEBUG: Running [gcloud.compute.images.list] with arguments: [--verbosity: "debug"]
INFO: Refreshing access_token
INFO: Display format: "    table(
      name,
      selfLink.map().scope(projects).segment(0):label=PROJECT,
      family,
      deprecated.state:label=DEPRECATED,
      status
    )"
DEBUG: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)
Traceback (most recent call last):
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 983, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 809, in Run
    display_info=self.ai.display_info).Display()
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/display.py", line 483, in Display
    self._printer.Print(self._resources)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_printer_base.py", line 275, in Print
    for resource in resources:
  File "/usr/lib/google-cloud-sdk/lib/surface/compute/images/list.py", line 113, in _FilterDeprecated
    for image in images:
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/lister.py", line 1065, in __call__
    errors=errors):
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/request_helper.py", line 204, in ListJson
    for item in _ListCore(requests, http, batch_url, errors, _HandleJsonList):
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/request_helper.py", line 134, in _ListCore
    requests=requests, http=http, batch_url=batch_url)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/batch_helper.py", line 106, in MakeRequests
    batch_request_callback=batch_checker.BatchCheck)
  File "/usr/bin/../lib/google-cloud-sdk/lib/third_party/apitools/base/py/batch.py", line 226, in Execute
    batch_http_request.Execute(http)
  File "/usr/bin/../lib/google-cloud-sdk/lib/third_party/apitools/base/py/batch.py", line 492, in Execute
    self._Execute(http)
  File "/usr/bin/../lib/google-cloud-sdk/lib/third_party/apitools/base/py/batch.py", line 449, in _Execute
    response = http_wrapper.MakeRequest(http, request)
  File "/usr/bin/../lib/google-cloud-sdk/lib/third_party/apitools/base/py/http_wrapper.py", line 356, in MakeRequest
    max_retry_wait, total_wait_sec))
  File "/usr/bin/../lib/google-cloud-sdk/lib/third_party/apitools/base/py/http_wrapper.py", line 304, in HandleExceptionsAndRebuildHttpConnections
    raise retry_args.exc
SSLHandshakeError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)
ERROR: gcloud crashed (SSLHandshakeError): [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)
google-compute-engine gcloud google-cloud-sdk
1个回答
0
投票

经过一些调试后,它开始工作。在我看来,防火墙就是问题所在。我转向python 3.5。之后,我运行了相同的命令gcloud compute images list我收到错误“捕获的套接字错误,重试请求URL https://compute.googleapis.com/batch/compute/v1”。将此URL添加到防火墙例外中解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.