linghaiyan 发表于 2017-12-5 12:40:23

[原]openstack-kilo--issue(十九) ImportError: Could not import settings 'openstack_d

  查看此问题的时候请先查看 这个问题包含在(十)中,此篇只是从(十)中分离出来

openstack-kilo--issue(十)ERROR: openstack Unable to establish connection to http://controller:35357/v3/auth/tokens
  ==========================      如果遇到下面这样的问题   请参考上面的网址的问题二的解决方案    ====================================
  ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named main





1 # systemctl status httpd.service
2 httpd.service - The Apache HTTP Server
3    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
4   Drop-In: /usr/lib/systemd/system/httpd.service.d
5            └─openstack-dashboard.conf
6    Active: failed (Result: exit-code) since Tue 2016-12-27 15:37:33 CST; 15min ago
7   Process: 8204 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=e
8
9 Dec 27 15:37:33 controller python: File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getat
10 Dec 27 15:37:33 controller python: self._setup(name)
11 Dec 27 15:37:33 controller python: File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
12 Dec 27 15:37:33 controller python: self._wrapped = Settings(settings_module)
13 Dec 27 15:37:33 controller python: File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init
14 Dec 27 15:37:33 controller python: % (self.SETTINGS_MODULE, e)
15 Dec 27 15:37:33 controller python: ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.
16 Dec 27 15:37:33 controller systemd: httpd.service: control process exited, code=exited status=1
17 Dec 27 15:37:33 controller systemd: Failed to start The Apache HTTP Server.
18 Dec 27 15:37:33 controller systemd: Unit httpd.service entered failed state.

  openstack-dashboard也出现了变化



# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                  active
openstack-nova-compute:               active
openstack-nova-network:               inactive(disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:            active
== Keystone service ==
openstack-keystone:                     active
== Horizon service ==
openstack-dashboard:                  uncontactable
== neutron services ==
neutron-server:                         active
页: [1]
查看完整版本: [原]openstack-kilo--issue(十九) ImportError: Could not import settings 'openstack_d