发起问题
0

failed to emulate s3 on swift by swift3

提问于 2017-03-13 09:35:36 -0600

james_wangjz 图像

updated 2017-03-15 10:31:17 -0600

i installed swift3 followed by https://git.openstack.org/cgit/openstack/swift3/tree/README.md (https://git.openstack.org/cgit/openst...).

Failed to creatbucket.

[root@aio ~]# cd s3curl/
[root@aio s3curl]# ./s3curl.pl --id=personal --createBucket -- http://172.24.4.100:8080/ab
Bad URL[root@aio s3curl]#
[root@aio s3curl]# cat /etc/swift/swift.conf |grep -v ^#|grep -v ^$
[swift-hash]
swift_hash_path_suffix = changeme
swift_hash_path_prefix = changeme
[storage-policy:0]
name = Policy-0
default = yes
aliases = yellow, orange
[swift-constraints]
[root@aio s3curl]# cat /etc/swift/proxy-server.conf |grep -v ^#|grep -v ^$
[DEFAULT]
bind_port = 8080
user = swift
swift_dir = /etc/swift
[pipeline:main]
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk ratelimit swift3 s3token authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server
[app:proxy-server]
use = egg:swift#proxy
account_autocreate = True
[filter:tempauth]
use = egg:swift#tempauth
user_admin_admin = admin .admin .reseller_admin
user_test_tester = testing .admin
user_test2_tester2 = testing2 .admin
user_test_tester3 = testing3
user_test5_tester5 = testing5 service
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = swift
password = swiftpassword
delay_auth_decision = True
[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = admin, user
[filter:healthcheck]
use = egg:swift#healthcheck
[filter:cache]
use = egg:swift#memcache
memcache_servers = controller:11211
[filter:ratelimit]
use = egg:swift#ratelimit
[filter:domain_remap]
use = egg:swift#domain_remap
[filter:catch_errors]
use = egg:swift#catch_errors
[filter:cname_lookup]
use = egg:swift#cname_lookup
[filter:staticweb]
use = egg:swift#staticweb
[filter:tempurl]
use = egg:swift#tempurl
[filter:formpost]
use = egg:swift#formpost
[filter:name_check]
use = egg:swift#name_check
[filter:list-endpoints]
use = egg:swift#list_endpoints
[filter:proxy-logging]
use = egg:swift#proxy_logging
[filter:bulk]
use = egg:swift#bulk
[filter:slo]
use = egg:swift#slo
[filter:dlo]
use = egg:swift#dlo
[filter:container-quotas]
use = egg:swift#container_quotas
[filter:account-quotas]
use = egg:swift#account_quotas
[filter:gatekeeper]
use = egg:swift#gatekeeper
[filter:container_sync]
use = egg:swift#container_sync
[filter:xprofile]
use = egg:swift#xprofile
[filter:versioned_writes]
use = egg:swift#versioned_writes
[filter:copy]
use = egg:swift#copy
[filter:keymaster]
use = egg:swift#keymaster
encryption_root_secret = changeme
[filter:encryption]
use = egg:swift#encryption
[filter:swift3]
use = egg:swift3#swift3
[filter:s3token]
use = egg:swift3#s3token
auth_uri = http://controller:35357/
[root@aio s3curl]# cd /etc/swift/
[root@aio swift]# swift-init restart proxy-server
Signal proxy-server pid: 9339 signal: 15
No proxy-server running
Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
File "/usr/bin/swift-proxy-server", line 23, in <module>
sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 895, in run_wsgi
error_msg = strategy.bind_ports()
File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 490, in bind_ports
self.sock = get_socket(self.conf)
File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 207, in get_socket
'timeout': bind_timeout})
Exception: Could not bind to 0.0.0.0:8080 after trying for 30 seconds
//////though it fialed ,but i can upload or download file from dashboard.

[root@aio swift]#

edit retag flag offensive close merge delete
0

回答 2017-03-15 10:29:29 -0600

james_wangjz 图像

[root@aio swift]# cat /etc/keystone/keystone-paste.ini |grep -i s3
[filter:s3_extension]
use = egg:keystone#s3_extension
pipeline = healthcheck cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id build_auth_context token_auth json_body ec2_extension s3_extension admin_service
pipeline = healthcheck cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id build_auth_context token_auth json_body ec2_extension_v3 s3_extension service_v3
[root@aio swift]#cd
[root@aio ~]# source admin-openrc
[root@aio ~]# openstack ec2 credentials list
+----------------------------------+----------------------------------+----------------------------------+----------------------------------+
| Access | Secret | Project ID | User ID |
+----------------------------------+----------------------------------+----------------------------------+----------------------------------+
| e63b3b2cf82d4ea2b5ff8d29a117040f | 0817826890824c2ab6432e579b7f4e6e | 2c4034b5bc39419f99bd0bbeb7b0ea89 | 45619b8c2664486f8250adb72f2c8b90 |
+----------------------------------+----------------------------------+----------------------------------+----------------------------------+
[root@aio ~]# cat .s3curl
%awsSecretAccessKeys = (
# personal account
personal => {
id => 'e63b3b2cf82d4ea2b5ff8d29a117040f',
key => '0817826890824c2ab6432e579b7f4e6e',
},

);
[root@aio ~]#

edit flag offensive delete link 更多

Comments

[root@aio s3curl]# ./s3curl.pl --id=personal -- http://172.24.4.100:8080

<html><h1>Not Found</h1><p>The resource could not be found.</p></html>[root@aio s3curl]#
james_wangjz 图像james_wangjz ( 2017-03-15 10:42:59 -0600 )edit

你的回答

Please start posting anonymously - your entry will be published after you log in or create a new account.

开始回答

提问工具

统计

已提问: 2017-03-13 09:35:36 -0600

已查看: 487 次

最后更新: Mar 15 '17