coze-dev / coze-dev/coze-studio
用oss做对象存储,配的管理员的ak,server服务报403
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
错误内容:
coze-server | 2025/09/19 08:28:42.410657 main.go:111: [Info] load env file: .env
coze-server | 2025/09/19 08:28:42.411145 main.go:132: [Info] log level: debug
coze-server | panic: InitializeInfra failed, err=init tos client failed, err=operation error S3: HeadBucket, https response error StatusCode: 403, RequestID: 68CD143AF062343130B7CAFA, HostID: , api error Forbidden: Forbidden
coze-server |
coze-server | goroutine 1 [running]:
coze-server | main.main()
coze-server | /app/main.go:55 +0x86
我的.env配置有啥问题吗?
export STORAGE_TYPE="s3" # minio / tos / s3
export STORAGE_UPLOAD_HTTP_SCHEME="https" # http / https. If coze studio website is https, you must set it to https
export STORAGE_BUCKET="data-coze"
export S3_ACCESS_KEY=xxxxxxx
export S3_SECRET_KEY=xxxxxxxxxx
export S3_ENDPOINT=https://oss-cn-hangzhou.aliyuncs.com
export S3_BUCKET_ENDPOINT=https://data-coze.oss-cn-hangzhou.aliyuncs.com
export S3_REGION=cn-hangzhou
Contributor guide
Research direction
Start at main.go:55 and follow InitializeInfra into the TOS client initialization referenced by the panic. Review the .env S3 settings alongside the S3 HeadBucket request and the logs at main.go:111 and main.go:132. Done means coze-server starts successfully with the reported object-storage configuration instead of returning 403.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100