[原]openstack-kilo--issue(十二)openstack-keystone和httpd服務同時占用35357和5000


本博客已經添加"打賞"功能,"打賞"位置位於右邊欄紅色框中,感謝您贊助的咖啡.


== Keystone service == openstack-keystone: inactive

如上面顯示的狀態:如果啟動了httpd就不能很好的啟動openstack-keystone服務,在官方文檔中看到這樣一段話:

This guide uses the Apache HTTP server with mod_wsgi to serve keystone requests
on ports 5000 and 35357. By default, the keystone service still listens on ports
5000 and 35357. Therefore, this guide disables the keystone service.

意思是說httpd和openstack-keystone服務都會用的同樣的兩個端口35357和5000.所以文檔選擇的是使用httpd,不過這樣一來,剛裝上的時候是沒有問題,時間久了就會發現很多問題:

因此google一番,發現一個solution:

I have resolved the "openstack service create" problem following this steps :

HTTP and KEYSTONE service sharing the same port, so stop httpd and start openstack-keystone.service. Edit /etc/keystone/keystone.conf and replace "hostname or ip" to "localhost":

connection = mysql://keystone:openstack@localhost/keystone

Remember to stop service httpd and enable start service keystone: - systemctl stop httpd.service - systemctl enable openstack-keystone.service => systemctl start openstack-keystone.service

And finally, exec "openstack service create --name keystone --description "OpenStack Identity" identity" command.

Most important to remember, the dashboard horizon use apache so that keystone and apache service must be running. Into keystone.conf and wsgi-keystone.conf occur bind a single interface on ports 5000 and 35357 instead of all interface "*" or "0.0.0.0":

edit /etc/keystone/keystone.conf => set admin_bind_host = <ip_mgmt> => set public_bind_host = <ip_mgmt>
edit /etc/httpd/conf.d/wsgi-keystone.conf => set Listen 127.0.0.1:5000 => Listen 127.0.0.1:35357 => same for VirtualHost 127.0.0.1:5000 & 35357
After service openstack-keystone.service and httpd.service restart, both process will be running in the same time.

這樣一來就解決了不能同時開啟httpd和openstack-keystone的情況

[root@controller ~]# openstack-status
......
== Keystone service == openstack-keystone: active == Horizon service == openstack-dashboard: active
......

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM