我學習的OpenStack,在虛擬機中退出,我改變後的00-nova-placement-api.conf
,工作的httpd.service失敗,因爲控制過程,錯誤代碼爲
我要重新啓動httpd
:
systemctl restart httpd
但我失敗了:
httpd.service的作業失敗,因爲控制進程退出並顯示錯誤代碼。有關詳細信息,請參閱「systemctl status httpd.service」和「journalctl -xe」。
所以我執行
systemctl status httpd.service
我得到以下信息:
x— httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-05-31 16:50:51 CST; 24s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 34969 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 34967 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 34967 (code=exited, status=1/FAILURE)
May 31 16:50:51 controller1 systemd[1]: Starting The Apache HTTP Server...
May 31 16:50:51 controller1 httpd[34967]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 16 of /etc/httpd/con...fVersion>
May 31 16:50:51 controller1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 31 16:50:51 controller1 kill[34969]: kill: cannot find process ""
May 31 16:50:51 controller1 systemd[1]: httpd.service: control process exited, code=exited status=1
May 31 16:50:51 controller1 systemd[1]: Failed to start The Apache HTTP Server.
May 31 16:50:51 controller1 systemd[1]: Unit httpd.service entered failed state.
May 31 16:50:51 controller1 systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
我的執行順序如下:
journalctl -xn
然後我得到了下面的信息:
[[email protected] ~]# journalctl -xn
-- Logs begin at Tue 2017-05-30 19:27:19 CST, end at Wed 2017-05-31 17:58:53 CST. --
May 31 17:58:48 controller1 systemd[1]: Unit openstack-nova-api.service entered failed state.
May 31 17:58:48 controller1 systemd[1]: openstack-nova-api.service failed.
May 31 17:58:49 controller1 systemd[1]: openstack-nova-api.service holdoff time over, scheduling restart.
May 31 17:58:49 controller1 systemd[1]: Starting OpenStack Nova API Server...
-- Subject: Unit openstack-nova-api.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit openstack-nova-api.service has begun starting up.
May 31 17:58:53 controller1 systemd[1]: openstack-nova-api.service: main process exited, code=exited, status=1/FAILURE
May 31 17:58:53 controller1 systemd[1]: Failed to start OpenStack Nova API Server.
-- Subject: Unit openstack-nova-api.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit openstack-nova-api.service has failed.
--
-- The result is failed.
May 31 17:58:53 controller1 systemd[1]: Unit openstack-nova-api.service entered failed state.
May 31 17:58:53 controller1 systemd[1]: openstack-nova-api.service failed.
May 31 17:58:53 controller1 systemd[1]: openstack-nova-api.service holdoff time over, scheduling restart.
May 31 17:58:53 controller1 systemd[1]: Starting OpenStack Nova API Server...
-- Subject: Unit openstack-nova-api.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit openstack-nova-api.service has begun starting up.
我的00-NOVA-投放api.conf低於:
Listen 8778
<VirtualHost *:8778>
WSGIProcessGroup nova-placement-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGDaemonProcess nova-placement-api processes=3 threads=1 user=nova group=nova
WSGIScriptAlias //usr/bin/nova-placement-api
<Directory "/">
Order allow,deny
Allow from all
Require all granted
</Directory>
<IfVersion>=2.4>
ErrorLogFormat "%M"
</IfVersion>
ErrorLog /var/log/nova/nova-placement-api.log
</VirtualHost>
Alias /nova-placement-api /usr/bin/nova-placement-api
<Location /nova-placement-api>
SetHandler wsgi-script
Options + ExecCGI
WSGIProcessGroup nova-placemnet-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>
~
Atteention
我發現在信息提示:
:httpd:/etc/httpd/conf/httpd.conf的第353行的語法錯誤:/ etc/httpd/con ...數字的第14行的語法錯誤。
屏幕射擊低於:
353線低於: IncludeOptional conf.d/*.conf
我不知道哪裏是錯誤。
'systemctl status httpd.service'顯示有用的*「**提示:**一些行被省略了,使用'-l'顯示完整。」*這將防止像「/etc/httpd/con ... fVersion>的第16行的語法錯誤被截斷,允許您找到正確的配置文件。 – HBruijn