systemctl throwing errors on start/enable after package instal

21,412

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

Share:
21,412

Related videos on Youtube

Acyclic Tau
Author by

Acyclic Tau

By Day: Networky, DevOpsy, Cloudy Nerd By Night: Gamerly, Fatherly Nerd

Updated on September 18, 2022

Comments

  • Acyclic Tau
    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
      Vasili Syrakis about 9 years
      Is there a reason you are using iptables instead of firewalld?
    • Acyclic Tau
      Acyclic Tau about 9 years
      yes. I don't need any of the complexity at all
    • Bratchley
      Bratchley over 8 years
      Often 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.