1

我有一个安装了 aws cpp sdk 的 Debian 9 客户端。我正在将此 sdk 用于 Google Cloud Storage。sdk 使用 curl 向云端发出请求。我有一个测试程序,可以将一堆 PUT 放到云端。我观察到最初有几个 PUT 成功,然后我开始看到 PUT 的 curl 超时错误。以下是来自 AWS sdk 的日志,表明 curl 请求已超时:

[DEBUG] 2020-09-08 20:24:44.466 AWSAuthV4Signer [140206136674048] Signed Headers value:content-length;content-type;host;x-amz-content-sha256;x-amz-date
[DEBUG] 2020-09-08 20:24:44.466 AWSAuthV4Signer [140206136674048] Canonical Request String: PUT
<Objname>

content-length:2101248
content-type:binary/octet-stream
host:storage.googleapis.com
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20200908T202444Z

content-length;content-type;host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD
[DEBUG] 2020-09-08 20:24:44.466 AWSAuthV4Signer [140206136674048] Final String to sign: AWS4-HMAC-SHA256
20200908T202444Z
20200908/us-east-1/s3/aws4_request
79a64334206d67cfc19f147fdf51caa409d39f5054ab48a7ca655d5bc3a30438
..
[DEBUG] 2020-09-08 20:24:44.466 AWSClient [140206136674048] Request Successfully signed
[DEBUG] 2020-09-08 20:24:44.466 CurlHandleContainer [140206136674048] Attempting to acquire curl connection.
[INFO] 2020-09-08 20:24:44.466 CurlHandleContainer [140206136674048] Connection has been released. Continuing.
[DEBUG] 2020-09-08 20:24:44.466 CurlHandleContainer [140206136674048] Returning connection handle 0x7f839801e740
[DEBUG] 2020-09-08 20:24:44.466 CurlHttpClient [140206136674048] Obtained connection handle 0x7f839801e740
[ERROR] 2020-09-08 20:26:44.739 CurlHttpClient [140206136674048] Curl returned error code 28 - Timeout was reached
[DEBUG] 2020-09-08 20:26:44.739 CurlHandleContainer [140206136674048] Releasing curl handle 0x7f839801e740
[DEBUG] 2020-09-08 20:26:44.739 CurlHandleContainer [140206136674048] Notified waiting threads.
[DEBUG] 2020-09-08 20:26:44.739 AWSClient [140206136674048] Request returned error. Attempting to generate appropriate error codes from response
[ERROR] 2020-09-08 20:26:44.739 AWSClient [140206136674048] HTTP response code: -1
Exception name:
Error message: Unable to connect to endpoint

我的一些观察:

  • 我对 GET 没有这个问题。
  • 我只在使用 Debian 时看到这个问题。当我尝试使用 Ubuntu 18.04 的主机时,它运行良好。
  • 当我使用 HTTP 和端口 80 而不是 HTTPS 和端口 443 时,我没有看到这个问题。

任何想法可能导致卷曲超时?

4

0 回答 0