一、/root/.s3cfg文件中access_key和secret_key与自己服务器的key不匹配导致
- 这时我们在客户端查看
[root@client1 /]# radosgw-admin user create --uid="testuser" --display-name="First User"
{
"user_id": "testuser",
"display_name": "First User",
"email": "",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{
"user": "testuser",
"access_key": "RAU8280JGIHIJDP57HNY",
"secret_key": "MOxvIWhvxmLVTlwss4OXDMACa7hlNa1DHO3EI1fq"
}
],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"temp_url_keys": [],
"type": "rgw",
"mfa_ids": []
}
- 将文件中的access_key和secret_key值修改为上方标记内容
[root@client1 /]# vim /root/.s3cfg
[default]
access_key = RAU8280JGIHIJDP57HNY
secret_key = MOxvIWhvxmLVTlwss4OXDMACa7hlNa1DHO3EI1fq
host_base = 192.168.10.200:7480
host_bucket = 192.168.10.200:7480/%(bucket)
cloudfront_host = 192.168.10.200:7480
use_https = False
- 新建桶
[root@client1 /]# s3cmd mb s3://test_bucket
成功了!!!
Bucket 's3://test_bucket/' created
二、 有延迟,服务器之间没有反应过来
- 我们在服务端重置key
[root@node1 ceph]ceph-deploy forgetkeys
- 客户端创建rgw
[root@node1 ceph]# ceph-deploy rgw create node1
[root@node1 ceph]# lsof -i:7480
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
radosgw 15932 ceph 40u IPv4 64489 0t0 TCP *:7480 (LISTEN)
- 在客户端查看
[root@client1 /]# radosgw-admin user create --uid="testuser" --display-name="First User"
{
"user_id": "testuser",
"display_name": "First User",
"email": "",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{
"user": "testuser",
"access_key": "RAU8280JGIHIJDP57HNY",
"secret_key": "MOxvIWhvxmLVTlwss4OXDMACa7hlNa1DHO3EI1fq"
}
],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"temp_url_keys": [],
"type": "rgw",
"mfa_ids": []
}
- 将文件中的access_key和secret_key值修改为上方标记内容
[root@client1 /]# vim /root/.s3cfg
[default]
access_key = RAU8280JGIHIJDP57HNY
secret_key = MOxvIWhvxmLVTlwss4OXDMACa7hlNa1DHO3EI1fq
host_base = 192.168.10.200:7480
host_bucket = 192.168.10.200:7480/%(bucket)
cloudfront_host = 192.168.10.200:7480
use_https = False
- 新建桶
[root@client1 /]# s3cmd mb s3://test_bucket
成功了!!!
Bucket 's3://test_bucket/' created