gsutil cp挂起,获取初始access_token

时间:2018-01-11 01:43:29

标签: access-token gcloud gsutil

使用gsutil复制文件时,它会无限期挂起:

gsutil cp gs://gcp-public-data-sentinel-2/index.csv.gz .

使用调试gsutil -D cp输出运行gsutil:

gsutil version: 4.28n
boto version: 2.48.0
python version: 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
OS: Linux 2.6.32-504.23.4.el6.x86_64
multiprocessing available: True
using cloud sdk: True
pass cloud sdk credentials to gsutil: True
config path(s): /home/gardnera/.config/gcloud/legacy_credentials/my@email/.boto
gsutil path: /u/devon0/gardnera/yes/google-cloud-sdk/platform/gsutil/gsutil
compiled crcmod: True
installed via package manager: False
editable install: False
Command being run: /u/devon0/gardnera/yes/google-cloud-sdk/platform/gsutil/gsutil -o GSUtil:default_project_id=landsatdata1 -D cp gs://gcp-public-data-sentinel-2/index.csv.gz /home/gardnera/
config_file_list: ['/home/gardnera/.config/gcloud/legacy_credentials/my@email.com/.boto']
config: [('debug', '0'), ('working_dir', '/mnt/pyami'), ('https_validate_certificates', 'true'), ('debug', '0'), ('working_dir', '/mnt/pyami'), ('default_project_id', 'landsatdata1')]
INFO 0110 17:16:21.952356 base_api.py] Calling method storage.objects.get with StorageObjectsGetRequest: <StorageObjectsGetRequest
 bucket: u'gcp-public-data-sentinel-2'
 object: u'index.csv.gz'
 projection: ProjectionValueValuesEnum(noAcl, 1)>
INFO 0110 17:16:21.953642 base_api.py] Making http GET to https://www.googleapis.com/storage/v1/b/gcp-public-data-sentinel-2/o/index.csv.gz?fields=contentType%2Cname%2Cgeneration%2CcustomerEncryption%2Cmd5Hash%2CcontentEncoding%2Ccrc32c%2Cetag%2CmediaLink%2Csize&alt=json&projection=noAcl
INFO 0110 17:16:21.954131 base_api.py] Headers: {'accept': 'application/json',
 'accept-encoding': 'gzip, deflate',
 'content-length': '0',
 'user-agent': 'apitools gsutil/4.28 Python/2.7.13 (linux2) google-cloud-sdk/184.0.0 analytics/disabled'}
INFO 0110 17:16:21.954305 base_api.py] Body: (none)
INFO 0110 17:16:21.954441 client.py] Attempting refresh to obtain initial access_token

但在obtain initial access_token

上无限期挂起

我现在一直在深入研究这个问题,似乎无法找到答案。在其他机器上测试我无法复制该问题。重新安装gcloud并没有解决问题。

任何人都对可能发生的事情有任何想法?

由于

1 个答案:

答案 0 :(得分:1)

好像看起来问题出在.config文件中。我删除了~/.config/gcloud文件夹,问题已自行解决