Reputation: 5877
I have a BigQuery job running periodically. It was running fine so far. Now I am getting the following error. And when I directly tried executing the bq
commands in the terminal it does not result in the same error response consistently. Sometimes it works fine.
The bash command used is:
bq query --project_id=$BQ_PROJECT_ID --nouse_legacy_sql --format=json --quiet $MAX_TIME_QUERY
And it raises the following error:
BigQuery error in query operation: Cannot contact server. Please try again. Traceback: Traceback (most recent call last): File "/google-cloud-sdk/platform/bq/bigquery_client.py", line 681, in BuildApiClient _, discovery_document = http.request(discovery_url) File "/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/transport.py", line 160, in new_request credentials._refresh(orig_request_method) File "/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/client.py", line 762, in _refresh self._do_refresh_request(http) File "/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/client.py", line 781, in _do_refresh_request body=body, headers=headers) File "/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/transport.py", line 283, in request connection_type=connection_type) File "/google-cloud-sdk/platform/bq/third_party/httplib2/init.py", line 1626, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/google-cloud-sdk/platform/bq/third_party/httplib2/init.py", line 1368, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/google-cloud-sdk/platform/bq/third_party/httplib2/init.py", line 1288, in _conn_request conn.connect() File "/google-cloud-sdk/platform/bq/third_party/httplib2/init.py", line 1082, in connect raise SSLHandshakeError(e) SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
I am using this within docker container (google/cloud-sdk:206.0.0-alpine
). Also the same container when run on my mac laptop it works fine. When I check the same on a linux server it fails.
Upvotes: 1
Views: 2136
Reputation: 5877
Upgrading to google/cloud-sdk:250.0.0-alpine
version resolved the problem. I did not figure out the root cause for this problem but upgrading helped to fix it.
Upvotes: 1