Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用AWS cpp sdk for Google cloud时出现Curl超时_Curl_Google Cloud Platform_Google Cloud Storage_Debian Stretch_Aws Sdk Cpp - Fatal编程技术网

使用AWS cpp sdk for Google cloud时出现Curl超时

使用AWS cpp sdk for Google cloud时出现Curl超时,curl,google-cloud-platform,google-cloud-storage,debian-stretch,aws-sdk-cpp,Curl,Google Cloud Platform,Google Cloud Storage,Debian Stretch,Aws Sdk Cpp,我有一个安装了aws cpp sdk的Debian 9客户端。我将此sdk用于谷歌云存储。sdk使用curl向云发出请求。我有一个测试程序,它对云进行了大量的测试。我观察到有几个PUT最初成功,然后我开始看到PUT的curl超时错误。以下是来自AWS sdk的日志,表明curl请求超时: [DEBUG] 2020-09-08 20:24:44.466 AWSAuthV4Signer [140206136674048] Signed Headers value:content-length;con

我有一个安装了aws cpp sdk的Debian 9客户端。我将此sdk用于谷歌云存储。sdk使用curl向云发出请求。我有一个测试程序,它对云进行了大量的测试。我观察到有几个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
[DEBUG]2020-09-08 20:24:44.466 awsauthv4签名者[140206136674048]签名头值:内容长度;内容类型;主办x-amz-content-sha256;x-amz-date
[调试]2020-09-08 20:24:44.466 AWSAUTHV4签名者[140206136674048]规范请求字符串:PUT
内容长度:2101248
内容类型:二进制/八位字节流
主持人:storage.googleapis.com
x-amz-content-sha256:未签名的有效负载
x-amz-日期:20200908T202444Z
内容长度;内容类型;主办x-amz-content-sha256;x-amz-date
无符号有效载荷
[调试]2020-09-08 20:24:44.466 AWSAUTHV4签名者[140206136674048]要签名的最终字符串:AWS4-HMAC-SHA256
20200908T202444Z
20200908/us-east-1/s3/aws4\U请求
79a64334206d67cfc19f147fdf51caa409d39f5054ab48a7ca655d5bc3a30438
..
[调试]2020-09-08 20:24:44.466 AWSClient[140206136674048]请求已成功签名
[调试]2020-09-08 20:24:44.466 CurlHandleContainer[140206136674048]正在尝试获取curl连接。
[信息]2020-09-08 20:24:44.466 CurlHandleContainer[140206136674048]连接已释放。持续的。
[调试]2020-09-08 20:24:44.466卷曲手柄容器[140206136674048]返回连接手柄0x7f839801e740
[调试]2020-09-08 20:24:44.466 CurlHttpClient[140206136674048]已获得连接句柄0x7f839801e740
[错误]2020-09-08 20:26:44.739 CurlHttpClient[140206136674048]Curl返回错误代码28-已达到超时
[调试]2020-09-08 20:26:44.739卷曲手柄容器[140206136674048]释放卷曲手柄0x7f839801e740
[调试]2020-09-08 20:26:44.739 CurlHandleContainer[140206136674048]通知正在等待的线程。
[调试]2020-09-08 20:26:44.739 AWSClient[140206136674048]请求返回错误。正在尝试从响应生成适当的错误代码
[错误]2020-09-08 20:26:44.739 AWSClient[140206136674048]HTTP响应代码:-1
异常名称:
错误消息:无法连接到终结点
我的一些看法是:

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

你知道是什么导致了卷曲超时吗?

Hi@San这似乎是一个图书馆,而不是谷歌方面的官方图书馆。我建议您联系AWS开发人员团队——负责此库的团队——以便他们能够为您提供更多信息。你可以联系他们。谢谢你的回复@gso_gabriel。根据这一页,谷歌提到可以使用Aws Sdk从s3迁移到谷歌云存储。问题是,当我对AWS使用相同的程序时,我没有观察到这个问题。所以我希望得到谷歌的帮助。嗨@San,这似乎是一个图书馆,不是谷歌方面的官方图书馆。我建议您联系AWS开发人员团队——负责此库的团队——以便他们能够为您提供更多信息。你可以联系他们。谢谢你的回复@gso_gabriel。根据这一页,谷歌提到可以使用Aws Sdk从s3迁移到谷歌云存储。问题是,当我对AWS使用相同的程序时,我没有观察到这个问题。所以我希望能得到谷歌的帮助。