4

I have a Ubuntu 16.04 server, since the last restart, systemctl doesn't work anymore.

For example if I want to start the nginx, I get the following error:

root@SERVER:/# systemctl start nginx
Failed to start nginx.service: Unknown unit: nginx.service

The same result for every other service. Just systemctl gives the following result:

root@SERVER:/# systemctl
Failed to list units: No such method 'ListUnitsFiltered'

Thanks

3
  • I don't know if it's specifically changed in your distro, but do you have a reason for not calling it with service nginx start or via /system.d?
    – user657451
    Nov 13, 2016 at 3:22
  • Or has the nginx.service been moved, renamed, or unlinked?
    – user657451
    Nov 13, 2016 at 3:23
  • No the nginx.Service still exists and I got the Same result for any other Service
    – ghovat
    Nov 13, 2016 at 13:11

2 Answers 2

1

Looks like something is seriously messed up with your OS. Perhaps you accidentally moved or deleted files or something.

Simply invoking systemctl on its own should produce output like:

UNIT                                                                     LOAD   ACTIVE SUB       DESCRIPTION
proc-sys-fs-binfmt_misc.automount                                        loaded active running   Arbitrary Executable File Formats File System Automount Point
sys-devices-pci0000:00-0000:00:07.1-ata2-host1-target1:0:0-1:0:0:0-block-sr0.device loaded active plugged   VMware_Virtual_IDE_CDROM_Drive

It seems like something is broken and suspect it will affect more than systemctl. Could you start services using service or init.d style startup?

If you can't then I imagine your unfortunately better off with a fresh re-install.

1

I had similar issues after upgrading my 14.04 Ubuntu to 16.04. Somehow, the systemd packages did not install properly and I had the same problems as described in this question. The solution was to reinstall the relevant packages:

apt-get install --reinstall systemd-sysv ubuntu-standard

See https://wiki.ubuntu.com/SystemdForUpstartUsers for more info.

1
  • Fixed it, had to restart as well. Problem was that I installed upstart
    – Skarlinski
    Oct 30, 2017 at 11:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .