无法启动OpenStack Newton Horizo​​n Dashboard IOError:[remote 192.168.245.1:40166] ImportError:无法导入名称security_group_rules

时间:2017-06-04 17:15:54

标签: ubuntu openstack

我通过以下2个链接在ubuntu 16.04上安装了OpenStack newton和Tacker https://docs.openstack.org/newton/install-guide-ubuntu/

https://docs.openstack.org/developer/tacker/install/manual_installation.html

当我打开GUI时,我收到以下错误

/var/log/apache2/error.log文件中的最后五行

[Sun Jun 04 16:47:19.607996 2017] [wsgi:error] [pid 31931:tid 140556571473664] [remote 192.168.245.1:40166]文件" / usr / share / openstack-dashboard / openstack_das hboard /wsgi/../../openstack_dashboard/api/cinder.py" ;,第38行,

[Sun Jun 04 16:47: 19.608013 2017] [wsgi:error] [pid 31931:tid 140556571473664] [remote 192.168.245.1:40166]来自openstack_dashboard.api import nova

[Sun Jun 04 16:47:19.608026 2017] [wsgi:error] [pid 31931:tid 140556571473664] [remote 192.168.245.1:40166] File" / usr / share / openstack-dashboard / openstack_das hboard /wsgi/../../openstack_dashboard/api/nova.py" ;,第34行,

[Sun Jun 04 16:47: 19.608065 2017] [wsgi:error] [pid 31931:tid 140556571473664] [remote 192.168.245.1:40166]来自novaclient.v2 import security_group_rules a nova_rules

[Sun Jun 04 16:47:19.608104 2017] [wsgi:error] [pid 31931:tid 140556571473664] [remote 192.168.245.1:40166] ImportError:无法导入名称security_group_rules

1 个答案:

答案 0 :(得分:1)

首先,使用find /usr -name "security_group_rules.py"检查文件是否存在,通常可能在路径/usr/lib/python2.7/dist-packages/novaclient/v2/

如果文件存在,请检查python2.7包搜索路径,如下所示 enter image description here

确保文件路径位于包搜索路径

其次,检查路径/usr/local/lib/python2.7/dist-packages/,此路径可能具有相同的目录novaclient/v2/,这可能是导致错误的根本原因,当python搜索包时,它首先检查这个目录

您可以mv /usr/local/lib/python2.7/dist-packages/novaclient /usr/local/lib/python2.7/dist-packages/novaclient-old,或者只删除/usr/local/lib/python2.7/dist-packages/novaclient目录

最后,casuse这个错误是apt installpip install已经在不同的路径中安装了类似的包。