当前位置: 代码迷 >> 综合 >> openstack ERROR neutron.common.config [-] Unable to load neutron from configuration file /usr/shar
  详细解决方案

openstack ERROR neutron.common.config [-] Unable to load neutron from configuration file /usr/shar

热度:43   发布时间:2024-01-21 06:31:44.0

搭建openstack真的是遇到了很多坑,然后各种找资料什么的,尝试去解决,好多时候就是不知道问题导致的,这个时候就应该看看是不是配置文件敲错了。

遇到的这个坑就是我的配置文件敲了。很是痛苦。。

2017-04-24 10:28:00.835 91529 WARNING neutron.agent.securitygroups_rpc [-] Driver configuration doesn't match with enable_security_group
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config [-] Unable to load neutron from configuration file /usr/share/neutron/api-paste.ini.
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config Traceback (most recent call last):
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/common/config.py", line 252, in load_paste_app
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     return loadobj(APP, uri, name=name, **kw)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     return context.create()
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     return self.object_type.invoke(self)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     **context.local_conf)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     val = callable(*args, **kw)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 25, in urlmap_factory
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     app = loader.get_app(app_name, global_conf=global_conf)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     name=name, global_conf=global_conf).create()
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     return self.object_type.invoke(self)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     **context.local_conf)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     val = callable(*args, **kw)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/neutron/auth.py", line 71, in pipeline_factory
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     app = loader.get_app(pipeline[-1])
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     name=name, global_conf=global_conf).create()
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create

2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 56, in __init__
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     self._init_plugins(extensions)
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 112, in _init_plugins
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     self.extensions = [self[n] for n in self._names]
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 283, in __getitem__
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config     return self._extensions_by_name[name]
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config KeyError: 'openswitch'  其实就是这货被我写错了  少了一个v
2017-04-24 10:28:00.835 91529 ERROR neutron.common.config 
2017-04-24 10:28:00.837 91529 ERROR neutron.service [-] Unrecoverable error: please check log for details.
2017-04-24 10:28:00.837 91529 ERROR neutron.service Traceback (most recent call last):
2017-04-24 10:28:00.837 91529 ERROR neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 103, in serve_wsgi
2017-04-24 10:28:00.837 91529 ERROR neutron.service     service.start()
2017-04-24 10:28:00.837 91529 ERROR neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 76, in start
2017-04-24 10:28:00.837 91529 ERROR neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2017-04-24 10:28:00.837 91529 ERROR neutron.service   File "/usr/lib/python2.7/site-packages/neutron/service.py", line 218, in _run_wsgi
2017-04-24 10:28:00.837 91529 ERROR neutron.service     app = config.load_paste_app(app_name)
2017-04-24 10:28:00.837 91529 ERROR neutron.service   File "/usr/lib/python2.7/site-packages/neutron/common/config.py", line 259, in load_paste_app
2017-04-24 10:28:00.837 91529 ERROR neutron.service     raise RuntimeError(msg)
2017-04-24 10:28:00.837 91529 ERROR neutron.service RuntimeError: Unable to load neutron from configuration file /usr/share/neutron/api-paste.ini.
2017-04-24 10:28:00.837 91529 ERROR neutron.service 


然后一直以为是/usr/share/neutron/api-paste.ini的错   导致neutron一直起不来。

关于ml2配置文件如下:

[root@linux-node1 neutron]# grep '^[a-z]'  /etc/neutron/plugins/ml2/ml2_conf.ini
type_drivers = local,flat,vlan,gre,vxlan
tenant_network_types = vlan,gre,vxlan
mechanism_drivers = openvswitch,linuxbridge   ###这个openvswitch之前被我少了一个v   太粗心了 
extension_drivers =  port_security
flat_networks = physnet1
enable_ipset = True


所以当遇到问题解决不了的时候 看看是不是配置文件错了 。

  相关解决方案