binbeobo / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 1 forks source link

SSL validation error from gcloud init #337

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Issue running command [gcloud init].

What steps will reproduce the problem? "sudo gcloud init" or "gcloud init"

What is the expected output? What do you see instead? I expected it to not 
throw a huge stack trace for an SSL error. Instead it did this:

c02l14taf6t6:~ sspencer$ gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

Pick credentials to use:
 [1] REDACTED
 [2] Login with new credentials
Please enter your numeric choice:  1

You are now logged in as: [REDACTED]

Enter project id you would like to use:  REDACTED
Your current project has been set to: [REDACTED].

Failed to run [compute project-info describe]
You can use [gcloud config] to change more gcloud settings.

Your current configuration is: [default]

[app]
use_appengine_api = True
[core]
account = REDACTED
disable_usage_reporting = True
project = REDACTED
[meta]
active_config = default
Traceback (most recent call last):
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 187, in main
    _cli.Execute()
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 592, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1223, in Run
    resources = command_instance.Run(args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/surface/init.py", line 83, in Run
    self._PickDefaultRegionAndZone()
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/surface/init.py", line 232, in _PickDefaultRegionAndZone
    project_info = self._RunCmd(['compute', 'project-info', 'describe'])
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/surface/init.py", line 373, in _RunCmd
    return self.cli.Execute(args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 592, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1212, in Run
    last_group = context_filter(tool_context, Http, args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 580, in ContextFilter
    group.Filter(context, args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/compute/subcommands/__init__.py", line 55, in Filter
    _DoFilter(context, self.Http(), 'v1', args)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/base.py", line 279, in Http
    return self._http_func(auth=auth, creds=creds, **kwargs)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1207, in Http
    **kwargs)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/core/cli.py", line 121, in Http
    creds = c_store.Load()
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/core/credentials/store.py", line 249, in Load
    Refresh(cred)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/googlecloudsdk/core/credentials/store.py", line 267, in Refresh
    creds.refresh(http or _Http())
  File "/Users/sspencer/y/google-cloud-sdk/./lib/oauth2client/client.py", line 597, in refresh
    self._refresh(http.request)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/oauth2client/client.py", line 780, in _refresh
    self._do_refresh_request(http_request)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/oauth2client/client.py", line 799, in _do_refresh_request
    self.token_uri, method='POST', body=body, headers=headers)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/httplib2/__init__.py", line 1608, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/httplib2/__init__.py", line 1350, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/Users/sspencer/y/google-cloud-sdk/./lib/httplib2/__init__.py", line 1272, in _conn_request
    conn.connect()
  File "/Users/sspencer/y/google-cloud-sdk/./lib/httplib2/__init__.py", line 1059, in connect
    raise SSLHandshakeError(e)
SSLHandshakeError: [Errno 1] _ssl.c:507: error:14090086:SSL 
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Please provide any additional information below.

Traceback (most recent call last):
  File "googlecloudsdk/calliope/cli.py", line 592, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "googlecloudsdk/calliope/backend.py", line 1223, in Run
    resources = command_instance.Run(args)
  File "googlecloudsdk/surface/init.py", line 83, in Run
    self._PickDefaultRegionAndZone()
  File "googlecloudsdk/surface/init.py", line 232, in _PickDefaultRegionAndZone
    project_info = self._RunCmd(['compute', 'project-info', 'describe'])
  File "googlecloudsdk/surface/init.py", line 373, in _RunCmd
    return self.cli.Execute(args)
  File "googlecloudsdk/calliope/cli.py", line 592, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "googlecloudsdk/calliope/backend.py", line 1212, in Run
    last_group = context_filter(tool_context, Http, args)
  File "googlecloudsdk/calliope/backend.py", line 580, in ContextFilter
    group.Filter(context, args)
  File "googlecloudsdk/compute/subcommands/__init__.py", line 55, in Filter
    _DoFilter(context, self.Http(), 'v1', args)
  File "googlecloudsdk/calliope/base.py", line 279, in Http
    return self._http_func(auth=auth, creds=creds, **kwargs)
  File "googlecloudsdk/calliope/backend.py", line 1207, in Http
    **kwargs)
  File "googlecloudsdk/core/cli.py", line 121, in Http
    creds = c_store.Load()
  File "googlecloudsdk/core/credentials/store.py", line 249, in Load
    Refresh(cred)
[output truncated]

Original issue reported on code.google.com by sspen...@bluestatedigital.com on 23 Oct 2015 at 6:00

GoogleCodeExporter commented 8 years ago
Any update here? This is blocking me from using gcloud.

Original comment by sspen...@bluestatedigital.com on 27 Oct 2015 at 7:47

GoogleCodeExporter commented 8 years ago
Thanks for your feedback and sorry about the delay. This looks like a 
connectivity issue possibly related to your python installation. Could you 
please: 

1) Provide the output of gcloud info (with private info redacted)? 
2) Tell us how you installed python?
3) Try to access https://accounts.google.com/ using your python and let us know 
what happens.

Original comment by vil...@google.com on 27 Oct 2015 at 8:27

GoogleCodeExporter commented 8 years ago
Yep - it was the python installation. It was 2.7.6 which was throwing an SSL 
error related to that specific version. Upgrading to 2.7.10 fixed it. 

Original comment by sspen...@bluestatedigital.com on 28 Oct 2015 at 5:20

GoogleCodeExporter commented 8 years ago
FYI-we have a workaround for this particular issue (SSL cert problems) targeted 
for Cloud SDK 0.9.88.

Original comment by z...@google.com on 20 Nov 2015 at 10:15

GoogleCodeExporter commented 8 years ago
0.9.88 is out. Please let us know if you can still reproduce this issue on 
2.7.6.

Original comment by z...@google.com on 24 Nov 2015 at 9:28