質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

ただいまの
回答率

89.49%

bq.cmd lsを実行時にエラー出力

解決済

回答 1

投稿

  • 評価
  • クリップ 0
  • VIEW 483

raccoondog

score 17

PCにcloud SDKをインストール
gcpにアカウント作成

を実施し、bigqueryにプロジェクト作成、テーブル作成をしました。"bq.cmd -l"を使って状況確認したいのですが、ネットワークエラーが出ております。原因を知りたいです。

※コマンド実行時のエラー

C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\bin>bq.cmd ls
Network connection problem encountered, please try again.

If this problem persists, you may have encountered a bug in the bigquery client.
Please file a bug report in our public issue tracker:
https://issuetracker.google.com/issues/new?component=187149&template=0
Please include a brief description of the steps that led to this issue, as well
as any rows that can be made public from the following information:

========================================
== Platform ==
  CPython:2.7.13:Windows-7-6.1.7601-SP1
== bq version ==
  2.0.31
== Command line ==
  ['C:\\Users\\yazaki\\Desktop\\google-cloud-sdk-196.0.0\\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\\google-cloud-sdk\\platform/bq\\bq.py', '--application_default_credential_file', 'C:\\Users\\yazaki\\AppData\\Roaming\\gcloud\\legacy_credentials\\dwhtest01@gmail.com\\adc.json', '--crede
ntial_file', 'C:\\Users\\yazaki\\AppData\\Roaming\\gcloud\\legacy_credentials\\dwhtest01@gmail.com\\singlestore_bq.json', '--project=fluid-emissary-216806', 'ls']
== UTC timestamp ==
  2018-11-02 02:43:16
== Error trace ==
Traceback (most recent call last):
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\bq.py", line 995, in RunSafely
    return_value = self.RunWithArgs(*args, **kwds)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\bq.py", line 2298, in RunWithArgs
    filter_expression=self.filter)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform\bq\bigquery_client.py", line 1943, in ListDatasets
    result = self.apiclient.datasets().list(**request).execute()
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform\bq\bigquery_client.py", line 732, in apiclient
    self._apiclient = self.BuildApiClient()
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform\bq\bigquery_client.py", line 690, in BuildApiClient
    _, discovery_document = http.request(discovery_url)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\third_party\oauth2client_4_0\transport.py", line 160, in new_request
    credentials._refresh(orig_request_method)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\third_party\oauth2client_4_0\client.py", line 762, in _refresh
    self._do_refresh_request(http)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\third_party\oauth2client_4_0\client.py", line 781, in _do_refresh_request
    body=body, headers=headers)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\third_party\oauth2client_4_0\transport.py", line 283, in request
    connection_type=connection_type)
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\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 "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\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 "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform/bq\third_party\httplib2\__init__.py", line 1324, in _conn_request
    response = conn.getresponse()
  File "C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\platform\bundledpython\lib\httplib.py", line 1108, in getresponse
    raise ResponseNotReady()
ResponseNotReady
========================================

Unexpected exception in ls operation: Network connection problem encountered,
please try again.

If this problem persists, you may have encountered a bug in the bigquery client.
Please file a bug report in our public issue tracker:
https://issuetracker.google.com/issues/new?component=187149&template=0
Please include a brief description of the steps that led to this issue, as well
as any rows that can be made public from the following information:
  • 気になる質問をクリップする

    クリップした質問は、後からいつでもマイページで確認できます。

    またクリップした質問に回答があった際、通知やメールを受け取ることができます。

    クリップを取り消します

  • 良い質問の評価を上げる

    以下のような質問は評価を上げましょう

    • 質問内容が明確
    • 自分も答えを知りたい
    • 質問者以外のユーザにも役立つ

    評価が高い質問は、TOPページの「注目」タブのフィードに表示されやすくなります。

    質問の評価を上げたことを取り消します

  • 評価を下げられる数の上限に達しました

    評価を下げることができません

    • 1日5回まで評価を下げられます
    • 1日に1ユーザに対して2回まで評価を下げられます

    質問の評価を下げる

    teratailでは下記のような質問を「具体的に困っていることがない質問」、「サイトポリシーに違反する質問」と定義し、推奨していません。

    • プログラミングに関係のない質問
    • やってほしいことだけを記載した丸投げの質問
    • 問題・課題が含まれていない質問
    • 意図的に内容が抹消された質問
    • 過去に投稿した質問と同じ内容の質問
    • 広告と受け取られるような投稿

    評価が下がると、TOPページの「アクティブ」「注目」タブのフィードに表示されにくくなります。

    質問の評価を下げたことを取り消します

    この機能は開放されていません

    評価を下げる条件を満たしてません

    評価を下げる理由を選択してください

    詳細な説明はこちら

    上記に当てはまらず、質問内容が明確になっていない質問には「情報の追加・修正依頼」機能からコメントをしてください。

    質問の評価を下げる機能の利用条件

    この機能を利用するためには、以下の事項を行う必要があります。

回答 1

check解決した方法

0

※インストールログ

>install.bat

Welcome to the Google Cloud SDK!

To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:

    gcloud config set disable_usage_reporting true

Do you want to help improve the Google Cloud SDK (Y/n)?

Your current Cloud SDK version is: 196.0.0
The latest available version is: 223.0.0

+----------------------------------------------------------------------------------------------------------------+
|                                                   Components                                                   |
+------------------+------------------------------------------------------+--------------------------+-----------+
|      Status      |                         Name                         |            ID            |    Size   |
+------------------+------------------------------------------------------+--------------------------+-----------+
| Update Available | BigQuery Command Line Tool                           | bq                       |   < 1 MiB |
| Update Available | Cloud SDK Core Libraries                             | core                     |   8.7 MiB |
| Update Available | Cloud Storage Command Line Tool                      | gsutil                   |   3.5 MiB |
| Not Installed    | App Engine Go Extensions                             | app-engine-go            | 154.5 MiB |
| Not Installed    | Cloud Bigtable Command Line Tool                     | cbt                      |   6.2 MiB |
| Not Installed    | Cloud Bigtable Emulator                              | bigtable                 |   4.2 MiB |
| Not Installed    | Cloud Datalab Command Line Tool                      | datalab                  |   < 1 MiB |
| Not Installed    | Cloud Datastore Emulator                             | cloud-datastore-emulator |  17.7 MiB |
| Not Installed    | Cloud Datastore Emulator (Legacy)                    | gcd-emulator             |  38.1 MiB |
| Not Installed    | Cloud Pub/Sub Emulator                               | pubsub-emulator          |  33.4 MiB |
| Not Installed    | Cloud SQL Proxy                                      | cloud_sql_proxy          |   3.5 MiB |
| Not Installed    | Emulator Reverse Proxy                               | emulator-reverse-proxy   |  14.5 MiB |
| Not Installed    | Google Container Registry's Docker credential helper | docker-credential-gcr    |   1.8 MiB |
| Not Installed    | gcloud Alpha Commands                                | alpha                    |   < 1 MiB |
| Not Installed    | gcloud Beta Commands                                 | beta                     |   < 1 MiB |
| Not Installed    | gcloud app Java Extensions                           | app-engine-java          | 108.8 MiB |
| Not Installed    | gcloud app PHP Extensions                            | app-engine-php           |  19.1 MiB |
| Not Installed    | gcloud app Python Extensions                         | app-engine-python        |   6.2 MiB |
| Not Installed    | gcloud app Python Extensions (Extra Libraries)       | app-engine-python-extras |  28.5 MiB |
| Not Installed    | kubectl                                              | kubectl                  |   < 1 MiB |
+------------------+------------------------------------------------------+--------------------------+-----------+
To install or remove components at your current SDK version [196.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [223.0.0], run:
  $ gcloud components update

Update %PATH% to include Cloud SDK binaries? (Y/n)?
The installer is unable to automatically update your system PATH. Please add
  C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\bin
to your system PATH to enable easy use of the Cloud SDK Command Line Tools.


For more information on how to get started, please visit:
  https://cloud.google.com/sdk/docs/quickstarts


>gcloud.cmd init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
Reachability Check passed.
Network diagnostic (1/1 checks) passed.

You must log in to continue. Would you like to log in (Y/n)?
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&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platfor
m+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline

Updates are available for some Cloud SDK components.  To install them,
please run:
  $ gcloud components update

You are logged in as: [dwhtest01@gmail.com].

Pick cloud project to use:
 [1] fluid-emissary-216806
 [2] Create a new project
Please enter numeric choice or text value (must exactly match list
item):

Please enter a value between 1 and 2, or a value present in the list:  1

Your current project has been set to: [fluid-emissary-216806].

Do you want to configure a default Compute Region and Zone? (Y/n)?  n

Created a default .boto configuration file at [C:\Users\yazaki\.boto]. See this file and
[https://cloud.google.com/storage/docs/gsutil/commands/config] for more
information about configuring Google Cloud Storage.
Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use dwhtest01@gmail.com by default
* Commands will reference project `fluid-emissary-216806` by default
Run `gcloud help config` to learn how to change individual settings

This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.

Some things to try next:

* Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command.
* Run `gcloud topic -h` to learn about advanced features of the SDK like arg files and output formatting

C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\bin>C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\bin\bq.cmd

C:\Users\yazaki\Desktop\google-cloud-sdk-196.0.0\google-cloud-sdk-196.0.0-windows-x86_64-bundled-python\google-cloud-sdk\bin>

投稿

  • 回答の評価を上げる

    以下のような回答は評価を上げましょう

    • 正しい回答
    • わかりやすい回答
    • ためになる回答

    評価が高い回答ほどページの上位に表示されます。

  • 回答の評価を下げる

    下記のような回答は推奨されていません。

    • 間違っている回答
    • 質問の回答になっていない投稿
    • スパムや攻撃的な表現を用いた投稿

    評価を下げる際はその理由を明確に伝え、適切な回答に修正してもらいましょう。

15分調べてもわからないことは、teratailで質問しよう!

  • ただいまの回答率 89.49%
  • 質問をまとめることで、思考を整理して素早く解決
  • テンプレート機能で、簡単に質問をまとめられる

同じタグがついた質問を見る