bq cli工具无法连接到服务器

时间:2018-10-30 22:14:44

标签: google-bigquery gcloud

我正在尝试在docker容器中使用bq工具,但连接时遇到困难。我也运行过gcloud init,我也可以在webui和带有bq的docker容器之外进行查询。

bq query --format=prettyjson --nouse_legacy_sql 'select count(*) from `bigquery-public-data.samples.shakespeare`'
  

查询操作中的BigQuery错误:无法联系服务器。请试试   再次。追溯:追溯(最近一次通话):文件   “ /usr/lib/google-cloud-sdk/platform/bq/bigquery_client.py”,第886行,   在BuildApiClient response_metadata中,discovery_document =   http.request(discovery_url)文件   “ /usr/lib/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/transport.py”,   第176行,在new_request重定向中,connection_type)   “ /usr/lib/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/transport.py”,   请求中的第283行connection_type = connection_type)文件   “ /usr/lib/google-cloud-sdk/platform/bq/third_party/httplib2/init.py”,   第1626行,在请求(响应,内容)= self._request(conn,   权限,uri,request_uri,方法,正文,标头,重定向,   cachekey)文件   “ /usr/lib/google-cloud-sdk/platform/bq/third_party/httplib2/init.py”,   第1368行,位于_request(响应,内容)= self._conn_request(conn,   request_uri,方法,主体,标题)文件   “ /usr/lib/google-cloud-sdk/platform/bq/third_party/httplib2/init.py”,   _conn_request conn.connect()文件中的第1288行   “ /usr/lib/google-cloud-sdk/platform/bq/third_party/httplib2/init.py”,   第1082行,在连接中引发SSLHandshakeError(e)SSLHandshakeError:   [SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败   (_ssl.c:726)

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

冻结点是

airflow==1.8.0
alembic==0.8.10
asn1crypto==0.24.0
BigQuery-Python==1.14.0
boto==2.49.0
cachetools==2.1.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
Click==7.0
croniter==0.3.25
cryptography==2.3.1
dill==0.2.8.2
docutils==0.14
enum34==1.1.6
filechunkio==1.8
Flask==0.11.1
Flask-Admin==1.4.1
Flask-Cache==0.13.1
Flask-Login==0.2.11
flask-swagger==0.2.13
Flask-WTF==0.12
funcsigs==1.0.0
future==0.15.2
futures==3.2.0
gitdb2==2.0.5
GitPython==2.1.11
google-api-core==1.5.1
google-api-python-client==1.5.5
google-auth==1.5.1
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.2.0
google-cloud-bigquery==1.6.0
google-cloud-core==0.28.1
google-resumable-media==0.3.1
googleapis-common-protos==1.5.3
gunicorn==19.3.0
httplib2==0.11.3
idna==2.7
ipaddress==1.0.22
itsdangerous==1.1.0
JayDeBeApi==1.1.1
Jinja2==2.8.1
JPype1==0.6.3
lockfile==0.12.2
lxml==3.8.0
Mako==1.0.7
Markdown==2.6.11
MarkupSafe==1.0
MySQL-python==1.2.5
numpy==1.15.3
oauth2client==2.0.2
oauthlib==2.1.0
ordereddict==1.1
pandas==0.18.1
pandas-gbq==0.7.0
protobuf==3.6.1
psutil==4.4.2
psycopg2==2.7.5
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
Pygments==2.2.0
pyOpenSSL==18.0.0
python-daemon==2.1.2
python-dateutil==2.7.5
python-editor==1.0.3
python-nvd3==0.14.2
python-slugify==1.1.4
pytz==2018.7
PyYAML==3.13
requests==2.20.0
requests-oauthlib==1.0.0
rsa==4.0
setproctitle==1.1.10
six==1.11.0
smmap2==2.0.5
SQLAlchemy==1.2.12
tabulate==0.7.7
thrift==0.9.3
Unidecode==1.0.22
uritemplate==3.0.0
urllib3==1.24
Werkzeug==0.14.1
WTForms==2.2.1
zope.deprecation==4.3.0

0 个答案:

没有答案