First invocation of GCP API hangs at times

23 views
Skip to first unread message

Ramkumar Sankar

unread,
Jan 16, 2017, 10:33:32 PM1/16/17
to gce-discussion
Google Python API SDK version: 1.5.5
Python version: 2.7.6


**Sequence:**

http = httplib2.Http()
credentials = GoogleCredentials.get_application_default()
    if http:
        gcp = GCP_discovery.build('compute', 'v1', credentials=credentials, httt
p=http)
    else:
        gcp = GCP_discovery.build('compute', 'v1', credentials=credentials)
    list = gcp.routes().list(project = project).execute(http=http)

the last call to gcp never returns.  Replacing gcp.routes().list() with a different API also causes a hang.  If i restart the process everything goes through fine.

Appreciate any insights into this issue.

Thanks

File: "/opt/avi/python/bin/cloud_connector/baremetal/gcp_client.py", line 677, in _reconcile_all_vips
  rtlist = gcp.routes().list(project=xpn_project).execute(http=http)
File: "/usr/local/lib/python2.7/dist-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
  return wrapped(*args, **kwargs)
File: "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 833, in execute
  method=str(self.method), body=self.body, headers=self.headers)
File: "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 160, in _retry_request
  resp, content = http.request(uri, method, *args, **kwargs)
File: "/usr/local/lib/python2.7/dist-packages/oauth2client/transport.py", line 175, in new_request
  redirections, connection_type)
File: "/usr/local/lib/python2.7/dist-packages/oauth2client/transport.py", line 282, in request
  connection_type=connection_type)
File: "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1609, in request
  (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File: "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1351, in _request
  (response, content) = self._conn_request(conn, request_uri, method, body, headers)
File: "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1334, in _conn_request
  content = response.read()
File: "/usr/lib/python2.7/httplib.py", line 578, in read
  return self._read_chunked(amt)
File: "/usr/lib/python2.7/httplib.py", line 620, in _read_chunked
  line = self.fp.readline(_MAXLINE + 1)
File: "/usr/lib/python2.7/socket.py", line 476, in readline
  data = self._sock.recv(self._rbufsize)
File: "/usr/lib/python2.7/ssl.py", line 341, in recv
  return self.read(buflen)
File: "/usr/lib/python2.7/ssl.py", line 260, in read
  return self._sslobj.read(len)

Carlos (Cloud Platform Support)

unread,
Jan 17, 2017, 1:13:35 PM1/17/17
to gce-discussion
HI Ramkumar

I would suggest opening a report on this forum. The support team will be glad to help you. 
Reply all
Reply to author
Forward
0 new messages