Workaround for issues starting services in centos-7 (and potentially other systemd based) infrastructure containers

Ryan -

If you run into the following errors attempting to start services via systemctl in centos-7 or other systemd based infrastructure containers:

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

 

Create a directory 

/etc/systemd/system/SERVICENAME.service.d/ 

in this case, for httpd, that would be 

/etc/systemd/system/httpd.service.d

Create a file named override.conf in that directory, i.e.:

/etc/systemd/system/httpd.service.d/override.conf

Edit that file to contain

[Service]
PrivateTmp=no

and run 

systemctl daemon-reload

The service should now start properly.

Have more questions? Submit a request

0 Comments

Article is closed for comments.