dcb9 / google-cloud-sdk

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

gcloud auth login exception - responseNotReady (related to closed issue 11) #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Refer to issue 11, now closed as dev team released an update with SOCKS library 
included.

i am past that initial issue, and now get a seperate related, issue - trace 
included below. I have re-installed cloud sdk and updated components, no help.  

when entering security key back into terminal session, it throws an exception ( 
responseNotReady() ). 

Currently behind internet proxy server, but curl and component update working 
as proxy configured in bash.

What is the expected output? What do you see instead?
expect to run "gcloud auth login --no-launch-browser" successfully and enter 
key back into terminal. 

i get a new trace message back now for gcloud auth login. Tried reinstalling 
cloud sdk and still cannot authenticate using same information as initial 
report.

Traceback (most recent call last):
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py", line 78, in <module>
    main()
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py", line 75, in main
    _loader.Execute()
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 1270, in Execute
    cur._Execute(cli_mode=True, kwargs=kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 933, in _Execute
    cli_mode=cli_mode)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 665, in Run
    result = command_instance.Run(args)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/exceptions.py", line 84, in TryFunc
    return func(*args, **kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/sdktools/auth/login.py", line 46, in Run
    launch_browser=args.launch_browser and not c_gce.IsOnGCE())
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials/__init__.py", line 290, in AcquireFromWebFlow
    cred = flow.Run(webflow, launch_browser=launch_browser)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials/flow.py", line 152, in Run
    credential = flow.step2_exchange(code, http=http)
  File "/home/c2485/google-cloud-sdk/bin/../lib/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/oauth2client/client.py", line 1283, in step2_exchange
    headers=headers)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1586, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1333, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1289, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1018, in getresponse
    raise ResponseNotReady()
httplib.ResponseNotReady

Original issue reported on code.google.com by mmcdo...@gmail.com on 5 Dec 2013 at 7:43

GoogleCodeExporter commented 9 years ago
What happens if do the following patch:

in google-cloud-sdk/lib/google/cloud/sdk/core/credentials/flow.py, line 152

before
    credential = flow.step2_exchange(code, http=http)

add the lines
    import httplib2
    proxy_info = httplib2.proxy_info_from_environment()
    if proxy_info:
      proxy_info.proxy_rdns = True
    http = httplib2.Http(proxy_info=proxy_info)

Original comment by jasm...@google.com on 6 Dec 2013 at 12:32

GoogleCodeExporter commented 9 years ago
thanks for the suggestion, added lines as above and same trace thrown:

Traceback (most recent call last):
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py", line 78, in <module>
    main()
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py", line 75, in main
    _loader.Execute()
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 1270, in Execute
    cur._Execute(cli_mode=True, kwargs=kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 933, in _Execute
    cli_mode=cli_mode)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 665, in Run
    result = command_instance.Run(args)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/exceptions.py", line 84, in TryFunc
    return func(*args, **kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/sdktools/auth/login.py", line 46, in Run
    launch_browser=args.launch_browser and not c_gce.IsOnGCE())
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials/__init__.py", line 290, in AcquireFromWebFlow
    cred = flow.Run(webflow, launch_browser=launch_browser)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials/flow.py", line 157, in Run
    credential = flow.step2_exchange(code, http=http)
  File "/home/c2485/google-cloud-sdk/bin/../lib/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/oauth2client/client.py", line 1283, in step2_exchange
    headers=headers)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1586, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1333, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1289, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1018, in getresponse
    raise ResponseNotReady()
httplib.ResponseNotReady

Original comment by mmcdo...@gmail.com on 6 Dec 2013 at 3:40

GoogleCodeExporter commented 9 years ago
Has this issue been resolved?

Original comment by Hora.Sto...@admb.net on 8 Jul 2014 at 7:42

GoogleCodeExporter commented 9 years ago
Issue 40 has been merged into this issue.

Original comment by alockw...@google.com on 12 Aug 2014 at 4:14

GoogleCodeExporter commented 9 years ago
I am having the exact same issue with the latest version of the SDK. The only 
difference is that the error on the last line is a ServerNotFoundError 

bash-3.00$ gcloud version
Google Cloud SDK 0.9.29a

bq 2.0.18
bq-nix 2.0.18
compute 2014.08.12
core 2014.08.12
core-nix 2014.06.17
dns 2014.08.07
gcutil 1.16.5
gcutil-nix 1.16.1
gsutil 4.4
gsutil-nix 4.3
sql 2014.08.12

Traceback (most recent call last):
  File "/home/pocuser/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 882, in Run
    result = command_instance.Run(args)
  File "/home/pocuser/google-cloud-sdk/./lib/googlecloudsdk/calliope/exceptions.py", line 78, in TryFunc
    return func(*args, **kwargs)
  File "/home/pocuser/google-cloud-sdk/lib/googlecloudsdk/gcloud/sdktools/auth/login.py", line 82, in Run
    creds = self.DoWebFlow(args.launch_browser)
  File "/home/pocuser/google-cloud-sdk/lib/googlecloudsdk/gcloud/sdktools/auth/login.py", line 125, in DoWebFlow
    return c_store.AcquireFromWebFlow(launch_browser=launch_browser)
  File "/home/pocuser/google-cloud-sdk/./lib/googlecloudsdk/core/credentials/store.py", line 339, in AcquireFromWebFlow
    http=_Http())
  File "/home/pocuser/google-cloud-sdk/./lib/googlecloudsdk/core/credentials/flow.py", line 156, in Run
    credential = flow.step2_exchange(code, http=http)
  File "/home/pocuser/google-cloud-sdk/./lib/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/pocuser/google-cloud-sdk/./lib/oauth2client/client.py", line 1283, in step2_exchange
    headers=headers)
  File "/home/pocuser/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 "/home/pocuser/google-cloud-sdk/./lib/httplib2/__init__.py", line 1350, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/pocuser/google-cloud-sdk/./lib/httplib2/__init__.py", line 1278, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
ServerNotFoundError: Unable to find the server at accounts.google.com

Original comment by fmr...@gmail.com on 18 Aug 2014 at 8:43

GoogleCodeExporter commented 9 years ago
even i'm having same issue... please fix 

Traceback (most recent call last):
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py", line 78, in <module>
    main()
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/gcloud.py", line 75, in main
    _loader.Execute()
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 1270, in Execute
    cur._Execute(cli_mode=True, kwargs=kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 933, in _Execute
    cli_mode=cli_mode)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/__init__.py", line 665, in Run
    result = command_instance.Run(args)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/calliope/exceptions.py", line 84, in TryFunc
    return func(*args, **kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/gcloud/sdktools/auth/login.py", line 46, in Run
    launch_browser=args.launch_browser and not c_gce.IsOnGCE())
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials/__init__.py", line 290, in AcquireFromWebFlow
    cred = flow.Run(webflow, launch_browser=launch_browser)
  File "/home/c2485/google-cloud-sdk/bin/../lib/google/cloud/sdk/core/credentials/flow.py", line 157, in Run
    credential = flow.step2_exchange(code, http=http)
  File "/home/c2485/google-cloud-sdk/bin/../lib/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/c2485/google-cloud-sdk/bin/../lib/oauth2client/client.py", line 1283, in step2_exchange
    headers=headers)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1586, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1333, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/c2485/google-cloud-sdk/bin/../lib/httplib2/__init__.py", line 1289, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1018, in getresponse
    raise ResponseNotReady()
httplib.ResponseNotReady

Original comment by krishnac...@gmail.com on 24 Aug 2014 at 9:56

GoogleCodeExporter commented 9 years ago
Same problem here....Is this resolved already? I'm using a windows machine.

Original comment by epmacapa...@globe.com.ph on 10 Oct 2014 at 6:54

GoogleCodeExporter commented 9 years ago
I also see same issue. 

C:\Program Files\Google\Cloud SDK>gcloud auth login
Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&respon
se_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%
2Fwww.googleapis.com%2Fauth%2Fappengine.
admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbigquery+https%3A%2F%2Fwww.googl
eapis.com%2Fauth%2Fcompute+https%3A%2F%2
Fwww.googleapis.com%2Fauth%2Fdevstorage.full_control+https%3A%2F%2Fwww.googleapi
s.com%2Fauth%2Fuserinfo.email+https%3A%2
F%2Fwww.googleapis.com%2Fauth%2Fndev.cloudman+https%3A%2F%2Fwww.googleapis.com%2
Fauth%2Fcloud-platform+https%3A%2F%2Fwww
.googleapis.com%2Fauth%2Fsqlservice.admin+https%3A%2F%2Fwww.googleapis.com%2Faut
h%2Fprediction+https%3A%2F%2Fwww.googlea
pis.com%2Fauth%2Fprojecthosting&access_type=offline

Traceback (most recent call last):
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\gcloud\gcloud.py", line 153, in <
module>
    main()
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\gcloud\gcloud.py", line 149, in m
ain
    _cli.Execute()
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\cli.py", line 431, in Ex
ecute
    post_run_hooks=self.__post_run_hooks, kwargs=kwargs)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\frontend.py", line 274,
in _Execute
    pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\backend.py", line 882, i
n Run
    result = command_instance.Run(args)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\calliope\exceptions.py", line 78,
 in TryFunc
    return func(*args, **kwargs)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\gcloud\sdktools\auth\login.py", line 82, i
n Run
    creds = self.DoWebFlow(args.launch_browser)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\gcloud\sdktools\auth\login.py", line 125,
in DoWebFlow
    return c_store.AcquireFromWebFlow(launch_browser=launch_browser)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\core\credentials\store.py", line
339, in AcquireFromWebFlow
    http=_Http())
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\core\credentials\flow.py", line 1
56, in Run
    credential = flow.step2_exchange(code, http=http)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\oauth2client\util.py", line 129, in positional_w
rapper
    return wrapped(*args, **kwargs)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\oauth2client\client.py", line 1683, in step2_exc
hange
    headers=headers)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1608, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey
)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1350, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\httplib2\__init__.py", line 1278, in _conn_reque
st
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at accounts.google.com

I made sure I could ping the server. it's not IPV6 issue I believe.

C:\Program Files\Google\Cloud SDK>ping accounts.google.com

Pinging accounts.l.google.com [64.233.171.84] with 32 bytes of data:
Reply from 64.233.171.84: bytes=32 time=33ms TTL=46
Reply from 64.233.171.84: bytes=32 time=38ms TTL=46
Reply from 64.233.171.84: bytes=32 time=35ms TTL=46
Reply from 64.233.171.84: bytes=32 time=34ms TTL=46

http://stackoverflow.com/questions/18429927/google-calendar-python-api-sample-un
able-to-find-the-server-at-accounts-google

Original comment by Narendra...@gmail.com on 17 Oct 2014 at 11:43

GoogleCodeExporter commented 9 years ago
Any solution to the above mentioned issues, i get the below error when i run 
"gcloud auth login"

  File "D:\Installations\Google Cloud\Cloud SDK\google-cloud-sdk\google-cloud-sd
k\bin\..\./lib\socks\__init__.py", line 395, in __negotiatehttp
    raise HTTPError((statuscode, statusline[2]))
socks.HTTPError: (407, 'Proxy Authorization Required')

I am behind the proxy and i have set the http_proxy and https_proxy in my 
environment accordingly to pt to proxy server and its correspinding port.

Original comment by gv.ramku...@gmail.com on 18 Nov 2014 at 6:37

GoogleCodeExporter commented 9 years ago
Thank you for reporting the issue. Note that we do not support authenticated 
proxies at the moment. We have an open ticket to work on this.

Original comment by vil...@google.com on 24 Nov 2014 at 7:23

GoogleCodeExporter commented 9 years ago
The issue is fixed as of latest release.
Use 'gcloud components update' to get the patch.

Original comment by che...@google.com on 27 Feb 2015 at 7:59