Ask Your Question
0

Job for httpd.service failed because the control process exited with error code

asked 2017-05-31 05:28:32 -0500

liaodalin19903 gravatar image

I am studying openstack, in the virtual machine, after I change the 00-nova-placement-api.conf,

I want to restart httpd:

systemctl restart httpd

But I get failed:

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

So I execute the:

systemctl status httpd.service

I get below information:

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.

I execute the order below:

journalctl -xn

then I got the below information:

[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 ...
(more)
edit retag flag offensive close merge delete

Comments

Did you investigate the syntax errors on lines 16 and 353 of /etc/httpd/conf/httpd.conf?

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-31 19:30:34 -0500 )edit

@Berbd Bausch There is no problem, see my answer I found the reason.

liaodalin19903 gravatar imageliaodalin19903 ( 2017-05-31 22:25:43 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2017-05-31 22:25:04 -0500

liaodalin19903 gravatar image

In the end I find there is issue in my nova.conf:

The correct config:

cp /etc/nova/nova.conf /etc/nova/nova.conf.bak /etc/nova/nova.conf openstack-config —set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata
openstack-config —set /etc/nova/nova.conf DEFAULT auth_strategy keystone
openstack-config —set /etc/nova/nova.conf DEFAULT my_ip 10.1.1.120
openstack-config —set /etc/nova/nova.conf DEFAULT use_neutron True
openstack-config —set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
openstack-config —set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:123456@controller1
openstack-config —set /etc/nova/nova.conf database connection mysql+pymysql://nova:123456@controller1/nova openstack-config —set /etc/nova/nova.conf api_database connection
mysql+pymysql://nova:123456@controller1/nova_api
openstack-config —set /etc/nova/nova.conf scheduler discover_hosts_in_cells_interval -1
openstack-config —set /etc/nova/nova.conf keystone_authtoken auth_uri http://controller1:5000
openstack-config —set /etc/nova/nova.conf keystone_authtoken auth_url http://controller1:35357
openstack-config —set /etc/nova/nova.conf keystone_authtoken memcached_servers http://controller1:11211
openstack-config —set /etc/nova/nova.conf keystone_authtoken auth_type password
openstack-config —set /etc/nova/nova.conf keystone_authtoken project_domain_name default
openstack-config —set /etc/nova/nova.conf keystone_authtoken user_domain_name default
openstack-config —set /etc/nova/nova.conf keystone_authtoken project_name service
openstack-config —set /etc/nova/nova.conf keystone_authtoken username nova
openstack-config —set /etc/nova/nova.conf keystone_authtoken password 123456
openstack-config —set /etc/nova/nova.conf keystone_authtoken service_token_roles_required True
openstack-config —set /etc/nova/nova.conf vnc vncserver_listen 10.1.1.120
openstack-config —set /etc/nova/nova.conf vnc vncserver_proxyclient_address 10.1.1.120
openstack-config —set /etc/nova/nova.conf glance api_servers http://controller1:9292
openstack-config —set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp

I written this line incorrect:

openstack-config —set /etc/nova/nova.conf keystone_authtoken auth_uri http://controller1:35357

I compiled the auth_url to the auth_uri mistakenly.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-05-31 05:28:32 -0500

Seen: 7,215 times

Last updated: May 31 '17