openim-docker icon indicating copy to clipboard operation
openim-docker copied to clipboard

[BUG] oss image upload prompts signature error, cos upload prompts 403 error, minio is normal

Open hackerjmss opened this issue 1 year ago • 1 comments

OpenIM Server Version

3.8.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

按照配置修改了 oss 或者 cos 都无法成功上传图片,都提示失败

oss 提示签名错误, cos 提示 403 错误

Screenshots Link

No response

hackerjmss avatar Aug 12 '24 08:08 hackerjmss

Could you please provide more detailed configuration information?

icey-yu avatar Aug 14 '24 02:08 icey-yu

352406344-dbf28c82-27c1-4853-a6a6-efdddbb9e216

hackerjmss avatar Aug 14 '24 07:08 hackerjmss

Could you please provide the contents of the configuration file?

icey-yu avatar Aug 16 '24 09:08 icey-yu

WX20240816-175919@2x WX20240816-175942@2x

hackerjmss avatar Aug 16 '24 10:08 hackerjmss

environment: - IMENV_MONGODB_ADDRESS=${MONGO_ADDRESS} - IMENV_MONGODB_USERNAME=${MONGO_USERNAME} - IMENV_MONGODB_PASSWORD=${MONGO_PASSWORD} - IMENV_KAFKA_ADDRESS=${KAFKA_ADDRESS} - IMENV_DISCOVERY_ETCD_ADDRESS=${ETCD_ADDRESS} - IMENV_REDIS_ADDRESS=${REDIS_ADDRESS} - IMENV_REDIS_PASSWORD=${REDIS_PASSWORD} - IMENV_MINIO_INTERNALADDRESS=${MINIO_INTERNAL_ADDRESS} - IMENV_MINIO_EXTERNALADDRESS=${MINIO_EXTERNAL_ADDRESS} - IMENV_MINIO_ACCESSKEYID=${MINIO_ACCESS_KEY_ID} - IMENV_MINIO_SECRETACCESSKEY=${MINIO_SECRET_ACCESS_KEY} - IMENV_SHARE_SECRET=${OPENIM_SECRET} - IMENV_LOG_ISSTDOUT=${LOG_IS_STDOUT} - IMENV_LOG_REMAINLOGLEVEL=${LOG_LEVEL} - IMENV_OPENIM_API_PROMETHEUS_GRAFANAURL=${GRAFANA_URL}

  - IMENV_OPENIM_RPC_THIRD_OBJECT_ENABLE=${OSS_ENABLE}
  - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_ENDPOINT=${OSS_ENDPOINT}
  - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_BUCKET=${OSS_BUCKET}
  - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_BUCKETURL=${OSS_BUCKETURL}
  - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYID=${OSS_ACCESSKEYID}
  - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYSECRET=${OSS_ACCESSKEYSECRET}
  # - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_SESSIONTOKEN=${OSS_SESSIONTOKEN}
  - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_PUBLICREAD=${OSS_PUBLICREAD}

hackerjmss avatar Aug 16 '24 10:08 hackerjmss

Check whether the configuration key is correct

withchao avatar Aug 16 '24 10:08 withchao

密钥是正确的 我使用 oss 可以直接登录 WX20240816-190418@2x

hackerjmss avatar Aug 16 '24 11:08 hackerjmss

I recommend using the official OSS SDK. Just input your key and secret, and try to access it.

skiffer-git avatar Aug 16 '24 11:08 skiffer-git

我尝试了,是正常可访问的

hackerjmss avatar Aug 17 '24 03:08 hackerjmss

WX20240817-120135 WX20240817-120247@2x WX20240817-120311@2x 我不知道什么原因,cos oss 都不行 都会提示签名错误

hackerjmss avatar Aug 17 '24 04:08 hackerjmss

Remove all the double quotes from the environment variables and try it.

icey-yu avatar Aug 19 '24 10:08 icey-yu

WX20240819-183158@2x I've removed the double quotes, but the error persists

hackerjmss avatar Aug 19 '24 10:08 hackerjmss

This could be caused by a CORS issue, and you need to configure the settings in the management console.

icey-yu avatar Aug 23 '24 04:08 icey-yu