Questions tagged [systemctl]

systemctl is the main command to control and introspect the systemd Linux init system.

systemd is a system and service manager in Linux. More information about switches and arguments can be found here.

205 questions
91
votes
3 answers

What is the difference between service and systemctl?

Maybe this is a trivial question, but it is not totally clear to me. On one of our servers we have some background processes running which were started with service and some others which were started with systemctl, like this: $ service nginx…
Aidas Bendoraitis
  • 1,345
  • 1
  • 12
  • 17
68
votes
4 answers

failed to get D-Bus connection: Operation not permitted

I'm trying to list services on my CentOS image running in Docker using systemctl list-units but I get this error message: Failed to get D-Bus connection: Operation not permitted Any suggestions what the problem might be?
Snowcrash
  • 1,087
  • 2
  • 16
  • 19
39
votes
2 answers

How to allow a user to use journalctl to see user-specific systemd service logs?

I am running user-level services in Ubuntu 16.04 LTS. For example, I have my test.service located at ~/.config/systemd/user/test.service. I was able to run the service by doing systemctl --user start test.target However, when I try to read its log…
ChromeHearts
  • 510
  • 1
  • 4
  • 8
31
votes
2 answers

Services remain in failed state after stopped with systemctl

we have a simple systemd script to start a MineCraft server in a service fashion. The SO is CentOS 7. Here the script: [Unit] Description=Minecraft Server After=syslog.target…
kalise
  • 413
  • 1
  • 4
  • 5
17
votes
3 answers

Redis not starting with systemctl

I have installed redis on an ubuntu 16.04 machine and if I run /usr/local/bin/redis-server /etc/redis/cluster/7000/redis.conf it starts up and I can connect to it without issues. However I want to start it using systemctl start redis, so I have…
munHunger
  • 323
  • 1
  • 3
  • 9
17
votes
1 answer

What is the meaning of holdoff time over in systemd services?

I have installed Puppet Enterprise on CentOS 7. I can see that several Puppet services fail to start saying holdoff time over. What does this mean? Sep 03 20:50:16 l-pm1 systemd[1]: pe-puppetdb.service holdoff time over, scheduling restart. Sep 03…
Priya R
  • 273
  • 1
  • 2
  • 4
15
votes
1 answer

mariadb.service start stuck at activating

I just installed the mariadb in my ubuntu 19.10 by sudo apt install mariadb-server mariadb-client after when I am trying to start the server by sudo systemctl start mariadb.service shell get freeze I have to use Ctl+c to get shell running. In the…
Sarthak Kumar
  • 253
  • 2
  • 5
13
votes
2 answers

Why isn't systemctl starting redis-server on CentOS 7?

I've installed redis on a new CentOS 7 box but can't start it using systemctl. It was installed like this: rpm -i http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm yum install redis Attempting to start it like this…
Zubin
  • 509
  • 1
  • 4
  • 9
12
votes
1 answer

Killing systemd service with and without systemctl

What is the difference between killing an running daemon systemd service like this : kill -SIGKILL 3645 and systemctl -s kill -SIGKILL 3645 where 3645 is the pid of the systemd service.Also are there any drawbacks of using the first method?
Gordon
  • 141
  • 1
  • 1
  • 4
12
votes
3 answers

How can I predict systemd's shutdown order?

Is there a way to get systemd to tell me the rough order in which it will shutdown services when I cleanly shut the whole system down? Since systemd will shut things down in parallel, I appreciate there is no way to know the exact order, but it…
Adam Spiers
  • 570
  • 1
  • 4
  • 13
12
votes
4 answers

Nginx hangs using "service nginx start"

I've compiled nginx with custom paths for my production server and when I try to start/restart the service using: service nginx start or service nginx restart It enters a new line without returning the shell: So the problem is that I can't…
T0M XeOn LuCiFeR
  • 121
  • 1
  • 1
  • 6
12
votes
1 answer

Systemctl: find out which commands are applicable for a service

How do I find out which commands are applicable for a service with systemctl? # systemctl reload nagios.service failed to reload nagios.service: Job type reload is not applicable for unit nagios.service. With init.d you could run the script without…
Lerkes
  • 181
  • 1
  • 1
  • 7
11
votes
3 answers

Cannot use `systemctl --user` due to "Failed to get D-bus connection: permission denied"

I'm trying to set up user-level services, using this answer to a similar question. I have create the required files and rebooted. I'm making progress because I now get "Failed to get D-bus connection: permission denied" when it was "Failed to get…
xenoid
  • 233
  • 1
  • 2
  • 10
11
votes
7 answers

How to enable systemd on Amazon Linux AMI

I started using Amazon Linux AMIs. It seems to have the /etc/systemd/system/ folder, but I am not able to use systemctl to start stop a service I added to the /etc/systemd/system/ folder. $ systemctl bash: systemctl: command not found
Saqib Ali
  • 410
  • 2
  • 7
  • 19
11
votes
1 answer

Systemd: Supervising process XXXX which is not our child. We'll most likely not notice when it exits

I've created a custom service file which looks like this: cat /etc/systemd/system/aaa.service [Unit] Description=aaa main application After=syslog.target…
ktopaz
  • 111
  • 1
  • 1
  • 4
1
2 3
13 14