systemctl throwing errors on start/enable after package instal
You may need to reload systemd after adding\updating services ("units" on systemd language).
See
daemon-reload
Reload systemd manager configuration. This will rerun all generators (see systemd.generator(7)), reload all unit files, and recreate the entire dependency tree. While the daemon is being reloaded, all sockets systemd listens on behalf of user configuration will stay accessible.
http://www.freedesktop.org/software/systemd/man/systemctl.html
Related videos on Youtube
![Acyclic Tau](https://i.stack.imgur.com/XRLb5.jpg?s=256&g=1)
Acyclic Tau
By Day: Networky, DevOpsy, Cloudy Nerd By Night: Gamerly, Fatherly Nerd
Updated on September 18, 2022Comments
-
Acyclic Tau almost 2 years
In the effort to lock down a new Centos box I am building I am installing iptables. I would like to be able to put this in a script so I can do this to other boxes but I am getting some odd errors and the roll back requires a reboot? Installing with
yum install iptables
which works fine, but before reboot:
[root@ip-10-0-0-132 ~]# systemctl start iptables Failed to issue method call: Unit iptables.service failed to load: No such file or directory. [root@ip-10-0-0-132 ~]# systemctl enable iptables Failed to issue method call: Access denied [root@ip-10-0-0-132 ~]#
and after
[root@ip-10-0-0-132 ~]# systemctl enable iptables ln -s '/usr/lib/systemd/system/iptables.service' '/etc/systemd/system/basic.target.wants/iptables.service' [root@ip-10-0-0-132 ~]# systemctl start iptables [root@ip-10-0-0-132 ~]#
I am new to systemd and if this is completely trivial please point me to a man page/guide/wiki so I can research this. I just haven't found anything obvious as yet.
-
Vasili Syrakis about 9 yearsIs there a reason you are using
iptables
instead offirewalld
? -
Acyclic Tau about 9 yearsyes. I don't need any of the complexity at all
-
Bratchley over 8 yearsOften times uniformity is the ideal. I know we're disabling
firewalld
for RHEL7 and going with iptables just because we also have a lot of RHEL5 and RHEL6. Once we start deploying RHEL 8 we'll probably re-visit using firewalld in production. Until then it's an idiosyncrasy we can just disable to make RHEL7 look as much like RHEL6 as possible.
-