|
Swift错误 |
|
|
Swift错误
错误:
root@cloud-30:~#swift-V2-Ahttp://192.168.0.30:5000/v2.0-Uadmin:admin-Kcloudstat
[Errno1]_ssl.c:504:error:140770FC:SSLroutines:SSL23_GET_SERVER_HELLO:unknownprotocol
解决方法:
这是因为在创建为swift创建endpoint的时候有问题,产生冲突,此时进入keystone数据库,将endpoint表中对应的id号那一列删了,例如下面的d8b2f0bb690d4c3986163697b4a1f257
root@cloud-30:~#keystoneendpoint-create--regionRegionOne--service_idaa47c203020c4daeac76d404c8cb2cf9--publicurlhttps://192.168.0.30:8080/v1/AUTH_8332b7c173b64ec2bac521336c5de995--adminurlhttps://192.168.0.30:8080--internalurlhttps://192.168.0.30:8080/v1/AUTH_8332b7c173b64ec2bac521336c5de995
+-------------+--------------------------------------------------------------------+
|Property|Value|
+-------------+--------------------------------------------------------------------+
|adminurl|https://192.168.0.30:8080|
|id|d8b2f0bb690d4c3986163697b4a1f257|
|internalurl|https://192.168.0.30:8080/v1/AUTH_8332b7c173b64ec2bac521336c5de995|
|publicurl|https://192.168.0.30:8080/v1/AUTH_8332b7c173b64ec2bac521336c5de995|
|region|RegionOne|
|service_id|aa47c203020c4daeac76d404c8cb2cf9|
错误:
root@cloud-30:~#swift-V2-Ahttp://192.168.0.30:5000/v2.0-Utenant:admin-Kcloudstat
Thereisnoobject-storeendpointonthisauthserver.
解决方法:
这是因为没有在keystone里面创建对应的endpoint,此时你需要创建它,创建方法在swift安装文档里有。
解决启动失败:
第一步:确保驱动没有被unmount,
安装swift多节点错误:
原来是
这个被注释掉了。
解决方法:
进入cd/etc/swift休改一下proxy-server.conf文件,将
注释去掉即可。
网络:
记录Openstackswift使用相关内容,备忘。
版本Ubuntu12.04Openstackessex
controller节点、computer节点、swift存储
1、安装swift时,执行swift-initmainstart
ImportError:Nomodulenamedkeystone.middleware.auth_token
由于swift原来是独立的项目,所以Swift安装后需要keystone的相应模块,如果没有就会报这个错误,解决方法如下
apt-getinstallpython-keystonepython-keystoneclient
2、验证swift时错误,错误信息如下
[Errno111]ECONNREFUSEDor503ServiceUnavailable
解决方式
因swift作为Openstack子项目后,认证采用keystone验证。安装keystone时,创建过Tenant、user、role,以及object-store的服务。通过如下命令可以查看
keystonetenant-list
keystonerole-list
keystoneuser-list
keystoneservice-list
swift的配置proxy-server.conf文件下filter:authtoken和filter:keystone那部分与keystone关联。
[filter:authtoken]
paste.filter_factory=keystone.middleware.auth_token:filter_factory
auth_protocol=http
#auth_host=127.0.0.1
auth_host=192.168.3.97#controll(keystone)ip
auth_port=35357
auth_token=admin
service_protocol=http
#service_host=127.0.0.1
service_host=192.168.3.97#controll(keystone)ip
service_port=5000
admin_token=admin#shouldbethesamevaluewithwhat''sin/etc/keystone/keystone.confinthe(controller、keystone)
admin_tenant_name=service#show:keystonetenant-list
#admin_tenant_name=admin
admin_user=swift#show:keystoneuser-list
admin_password=swift
delay_auth_decision=0
[filter:keystone]
paste.filter_factory=keystone.middleware.swift_auth:filter_factory
operator_roles=admin,swiftoperator
is_admin=true
keystone创建endpoint也会配置proxy的url
查看:keystoneendpoint-list,如果不对更改相关的信息,更改命令参考:
example:keystoneendpoint-create--regionregion_name--service_idservice_id--publicurlpublic_url--adminurladmin_url--internalurlinternal_url
如下:service_id是swift过来认证用户的id,urlip是swiftproxyserverip和tenant的id号。
keystoneendpoint-create--regionmyregion--service_id50ab784afa0e4583ad78578d089678e9--publicurl''http://192.168.3.99:8080/v1/AUTH_9b154b36eba44e6faa243cbe31cd505e''--adminurl''http://192.168.3.99:8080/v1''--internalurl''http://192.168.3.99:8080/v1/AUTH_9b154b36eba44e6faa243cbe31cd505e''
验证:
$swift-v-V2.0-Ahttp://192.168.3.97:5000/v2.0/-Uservice:swift-Kswiftstat
StorageURL:http://192.168.3.99:8080/v1/AUTH_9b154b36eba44e6faa243cbe31cd505e
AuthToken:a6c4ca3c6b084cdb8aceac43eb9a371b
Account:AUTH_9b154b36eba44e6faa243cbe31cd505e
Containers:0
Objects:0
Bytes:0
Accept-Ranges:bytes
X-Trans-Id:tx8fb4ad956fd3461ebb12d39ea1082b6b
ip为认证keystone服务端ip,-K为密码。已经不会在出现上述错误
错误:
重启swift-initallrestart时出现:
解决:
这是在account-server.conf、container-server.conf、object-server.conf里的bind_ip有问题,改成bind_ip=0.0.0.0就行了。
错误:
所有的服务proxy和存储服务多正常起来了可是还是出现这个问题
解决:这是keystone认证有问题,可能是在创建endpoint时有问题,或者是在创建user-role-add
时有问题,这两个地方时需要注意的地方。
除此之外还有可能是因为在proxy-server.conf配置文件中的
[app:proxy-server]
use=egg:swift#proxy
account_autocreate=false(作用:自动为swift创建amdin:admin)
所以必须将false改为true才能过实现此功能。
还有另外一个原因是:在swift的account-server.conf、container-server.conf、object-server.conf
这三个配置文件里的默认配置中的mount_check应该等于false。
错误:
mount:Structureneedscleaning
解决:
在未挂载状态下#xfs_repairloop3如果提示log什么的有问题,则使用-L参数,这会重建log,然后再使用上面一条命令进行修复。#xfs_repair-L
|
|
|
|
|
|
|
|
|
|
|