在我更改00-nova-placement-api.conf
,
我想重新启动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
然后我得到了以下信息:
[root@controller1 ~]# 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-placement-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
我不知道错误在哪里。
答案 0 :(得分:0)
要使用IfVersion
指令,需要从httpd.conf(或其中一个包含的public ArrayList<Patient> getPatientsForLoggedUser() {
final Realm realmDB =
Realm.getInstance(RealmManager.getDefaultInstance();
try {
ArrayList<Patient> patients = new ArrayList<>(realmDB.where(Patient.class).equalTo("user.email", loggedUser().getEmail()).findAllSorted("firstName", Sort.ASCENDING));
return patients;
} finally {
if(realmDB != null)
realmDB.close();
}
}
文件)加载mod_version:
conf.d/*.conf
其次,指令的格式是:
LoadModule version_module modules/mod_version.so
指令与所需版本之间没有空格
<IfVersion [[!]operator] version>
要求2.4或更高,应该看起来像:
<IfVersion>=2.4>
答案 1 :(得分:0)
请使用此:
ErrorLog syslog
而不是这个
ErrorLog /var/log/nova/nova-placement-api.log
这对我有用。更多信息:http://httpd.apache.org/docs/1.3/mod/core.html#errorlog