Comments (9)
麻烦设置一下这个日志开关,然后复现一下问题,终端上会刷一些请求日志,麻烦把这个日志贴一下。
在windows下
set OSS_SDK_LOG_LEVEL=debug
在 linux 环境下
export OSS_SDK_LOG_LEVEL=debug
from aliyun-oss-cpp-sdk.
我设置了日志级别,但日志的默认路径不知道在哪,通过控制台打印的错误码 是 200028,msg timeout was reached
上个代码:
std::string AccessKeyId = "xxxx";
std::string AccessKeySecret = "xxxx"
std::string Endpoint = "oss-cn-hangzhou.aliyuncs.com";
std::string BucketName = "aaa";
std::string ObjectName = "data\2.jpg";
InitializeSdk();
SetLogLevel(LogDebug);
ClientConfiguration conf;
OssClient client(Endpoint, AccessKeyId, AccessKeySecret, conf);
auto outcome = client.PutObject(BucketName, ObjectName, "d:\\3.jpg"); //这里填写本地的文件名
if (!outcome.isSuccess()) {
/* 异常处理 */
std::cout << "PutObject fail" <<
",code:" << outcome.error().Code() <<
",message:" << outcome.error().Message() <<
",requestId:" << outcome.error().RequestId() << std::endl;
ShutdownSdk();
return -1;
}
else
{
std::cout << "succ";
}
ShutdownSdk();
from aliyun-oss-cpp-sdk.
日志是默认输出 到std::cerr 上。
from aliyun-oss-cpp-sdk.
7.66 版本是你自己编译出来的吗, 是不是你编译的方式有问题, 导致它无法正常运行。
你可以使用 附带的curl 程序 来验证你的构建的libcurl 库
from aliyun-oss-cpp-sdk.
libcurl 是 v7.67,是自己编译的,它依赖openssl v1.1.1d版本的,自带的libcurl 是7.59版本的,是正常的。
我自己有写过简单的demo 验证过libcurl v7.67版本的http 的post get,put请求是正常的
我个人觉得是openssl 1.1.1d和openssl 1.0.x 版本头文件变更导致的兼容性问题
建议你可以自行编译个libcurl7.67版本验证一下看看
from aliyun-oss-cpp-sdk.
在工程下,有个 third_party/ 目录, 你可以把 自己编译 相关 库 和 头文件一起更新替换掉。
然后再重新构建。
from aliyun-oss-cpp-sdk.
我就是这么操作的,编译出来的
from aliyun-oss-cpp-sdk.
1)本地做了测试,替换到 libcurl 7.6.7 版本,是可以正常 work的。
2)在windows 下,libcurl 默认是 使用 WINSSL, 你不需要特别构建 openssl v1.1.1d, 你可以使用缺省命令来构建出 libcurl,然后再试试。
from aliyun-oss-cpp-sdk.
后面重新试了一下,是可以通过put上传图片文件成功了
from aliyun-oss-cpp-sdk.
Related Issues (20)
- 安装时 cmake .. 后 make失败 HOT 9
- 断点续传的进度好像跟上一次的进度相差很大。
- 其它问题,8个月没更新了,这个OSS SDK还有在维护吗.
- Build with Bazel
- third_party 能提供 静态库吗,不想应用程序中打包libeay32.dll和ssleay32.dll,我用其它版本的静态库编译老是报错 HOT 1
- 关于Meta的疑问:在C++下如何在上传文件时设置自定义meta? HOT 2
- 管理目录功能缺失 HOT 1
- Mac下崩溃,并发,未对齐指针释放问题,malloc: Non-aligned pointer 0x6000002d18a0 being freed (2) HOT 1
- malloc: Double free of object 0x133fb6730 ResumableDownloadObject HOT 2
- 关于CurlHttpClient存在于Client下的成员变量std::shared_ptr<HttpClient> httpClient_ 是线程安全的吗?
- 异步
- oss CurlHttpClient::makeRequest源码 有关curl相关内存释放的问题
- C++版本的sdk提供了中断下载的接口么 HOT 1
- C++ cmakelist怎么写 HOT 1
- undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' HOT 2
- 请求上传出现偶发错误:Unsupported protocol.Received HTTP/0.9 when not allowed
- build Android
- windos下QT调取: error: no member named 'GetObjectW' in 'AlibabaCloud::OSS::OssClient' HOT 2
- 麻烦更新一下官网文档吧 HOT 1
- 有没有人把openssl替换成小众一点wolfSSL的?代码贴过来参考一下。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aliyun-oss-cpp-sdk.