Tensorflow io.gfile.GFile错误-卷曲返回错误代码60-如果签名检查失败。这可能是因为时间偏斜

问题描述 投票:0回答:1

我正在使用tf.io.gfile.GFile(...)从符合S3的界面读取文件。产生此错误的代码昨天工作,今天停止工作,并且没有更改代码,因此可能在服务器端进行了更改。

2020-05-30 11:33:01.400501: I tensorflow/core/platform/s3/aws_logging.cc:54] Setting provider to read credentials from /home/davidparks21//.aws/credentials for credentials file and /home/davidparks21//.aws/config for the config file , for use with profile default
2020-05-30 11:33:01.400526: I tensorflow/core/platform/s3/aws_logging.cc:54] Creating AWSHttpResourceClient with max connections2 and scheme http
2020-05-30 11:33:01.400538: I tensorflow/core/platform/s3/aws_logging.cc:54] Initializing CurlHandleContainer with size 2
2020-05-30 11:33:01.400551: I tensorflow/core/platform/s3/aws_logging.cc:54] Creating Instance with default EC2MetadataClient and refresh rate 300000
2020-05-30 11:33:01.400561: I tensorflow/core/platform/s3/aws_logging.cc:54] Added EC2 metadata service credentials provider to the provider chain.
2020-05-30 11:33:01.400643: I tensorflow/core/platform/s3/aws_logging.cc:54] Successfully reloaded configuration.
2020-05-30 11:33:01.400705: I tensorflow/core/platform/s3/aws_logging.cc:54] Initializing CurlHandleContainer with size 25
2020-05-30 11:33:01.401062: I tensorflow/core/platform/s3/aws_logging.cc:54] Pool grown by 2
2020-05-30 11:33:01.401081: I tensorflow/core/platform/s3/aws_logging.cc:54] Connection has been released. Continuing.
2020-05-30 11:33:01.486735: E tensorflow/core/platform/s3/aws_logging.cc:60] Curl returned error code 60
2020-05-30 11:33:01.486780: E tensorflow/core/platform/s3/aws_logging.cc:60] HTTP response code: 684960552
Exception name: 
Error message: Unable to connect to endpoint
0 response headers:
2020-05-30 11:33:01.486802: W tensorflow/core/platform/s3/aws_logging.cc:57] If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
2020-05-30 11:33:01.486823: W tensorflow/core/platform/s3/aws_logging.cc:57] Request failed, now waiting 0 ms before attempting again.
2020-05-30 11:33:01.486993: I tensorflow/core/platform/s3/aws_logging.cc:54] Connection has been released. Continuing.

查看libcurl错误代码60 https://curl.haxx.se/libcurl/c/libcurl-errors.html

CURLE_PEER_FAILED_VERIFICATION (60)

The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.

在TF 1.14.0和2.2.0-rc3上测试

python tensorflow libcurl
1个回答
0
投票

事实证明,此证书在S3 api兼容服务器上过期。值得注意的是,只有libcurl似乎对此进行了检查。其他S3工具,例如awscli/boto3,则不在乎。

© www.soinside.com 2019 - 2024. All rights reserved.