Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesObjectExist 这个方法 访问私有桶 报403 Error message:Request Error.OBS service Error Message. #158

Open
everythinggood opened this issue Jul 23, 2024 · 3 comments

Comments

@everythinggood
Copy link

everythinggood commented Jul 23, 2024

使用iam用户的ak和sk生成永久客户端,iam用户已授权obs:bucket:ListBucket权限,但调用doesObjectExist 方法报403
使用sdk版本:3.22.12
image
image

@liqiuqiu111
Copy link

catch (ObsException e) {
System.out.println("CreateBucket failed");
// 请求失败,打印http状态码
System.out.println("HTTP Code: " + e.getResponseCode());
// 请求失败,打印服务端错误码
System.out.println("Error Code:" + e.getErrorCode());
// 请求失败,打印详细错误信息
System.out.println("Error Message: " + e.getErrorMessage());
// 请求失败,打印请求id
System.out.println("Request ID:" + e.getErrorRequestId());
System.out.println("Host ID:" + e.getErrorHostId());
} catch (Exception e) {
System.out.println("CreateBucket failed");
// 其他异常信息打印
e.printStackTrace();
打印更多报错信息;是否有requestid,客户端时间与服务端时间超过15分钟也会报错403

@everythinggood
Copy link
Author

everythinggood commented Jul 26, 2024 via email

@everythinggood
Copy link
Author

设置了防盗链导致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants