Questions tagged [systemctl]

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

Filter by
Sorted by
Tagged with
102 votes
3 answers
64k views

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 ...
Aidas Bendoraitis's user avatar
74 votes
4 answers
235k views

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 ...
Snowcrash's user avatar
  • 1,157
51 votes
3 answers
49k views

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 ...
ChromeHearts's user avatar
35 votes
2 answers
61k views

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 network.target [Service]...
kalise's user avatar
  • 453
21 votes
4 answers
64k views

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:...
xenoid's user avatar
  • 393
19 votes
5 answers
103k views

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 ...
munHunger's user avatar
  • 363
18 votes
9 answers
36k views

failed to run Kubelet: validate service connection: CRI v1 runtime API is not implemented for endpoint

I have installed kubelet 1.26.0 on Ubuntu 22.04 using apt install kubelet command, but when I try journalctl -xeu kubelet I get the following result: ░░ ░░ The unit kubelet.service has entered the '...
best_of_man's user avatar
17 votes
1 answer
51k views

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....
Priya R's user avatar
  • 273
16 votes
1 answer
15k views

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 ...
Sarthak Kumar's user avatar
14 votes
1 answer
76k views

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 ...
Gordon's user avatar
  • 161
13 votes
2 answers
39k views

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 ...
Zubin's user avatar
  • 509
13 votes
1 answer
8k views

How does systemd ask units to reload configuration?

I was reading the manpage for systemctl reload and found this sentence about reload. reload PATTERN... Asks all units listed on the command line to reload their configuration. http://man7....
425nesp's user avatar
  • 2,912
13 votes
1 answer
24k views

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....
Lerkes's user avatar
  • 191
12 votes
7 answers
62k views

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 ...
Saqib Ali's user avatar
  • 438
12 votes
4 answers
25k views

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 ...
T0M XeOn LuCiFeR's user avatar
12 votes
3 answers
15k views

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 ...
Adam Spiers's user avatar
11 votes
4 answers
29k views

systemctl start trafficserver wait for start

I have a script that installs and sets up traffic server: yum install -y trafficserver systemctl start trafficserver traffic_line -s proxy.config.url_remap.remap_required -v 0 traffic_line -s proxy....
BenMorel's user avatar
  • 4,557
11 votes
1 answer
35k views

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 network-online.target [Service] Type=...
ktopaz's user avatar
  • 111
9 votes
2 answers
39k views

systemctl complains about no installation config, but it exists

While following this tutorial on installing tomcat on CentOS I came across a problem executing the line sudo systemctl enable tomcat - it complains with the following error message: The unit files ...
corsiKa's user avatar
  • 393
9 votes
4 answers
38k views

How do I know if systemctl daemon-reload needs to be run

Is there a way to know the current running config is outdated? Is there a way to view the current running config and compare it to the file? It would be valuable for troubleshooting to know what the ...
red888's user avatar
  • 4,233
8 votes
1 answer
3k views

"systemctl start service" when service already started

I, what happen's precisely when you run systemctl start apache2 (or other service) while service already started ? Can it cause trouble to start several hundred times a day apache2 service? (to ...
user2267379's user avatar
8 votes
3 answers
45k views

systemctl shows service file not-found, even though .service file is present

I am running into a weird issue. I have a service file to start a custom application. systemctl command shows LOAD as not-found resource-service-prod-prod.service not-found active running ...
CVVR's user avatar
  • 81
7 votes
1 answer
19k views

How can I output logs to a file from the content of a service with systemd

Well, I have a service configured with systemctl. This is the config file: [Unit] Description=The description of the service (: After=network.target [Service] ExecStartPre=/bin/echo 'Starting ...
robe007's user avatar
  • 223
6 votes
1 answer
44k views

Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory

I have been following this tutorial: $ sudo systemctl start nagios Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory. What is the cause of problem? I ...
Mona Jalal's user avatar
6 votes
2 answers
7k views

Weird interaction with systemctl with Haproxy on CentOS 7

Running haproxy through systemctl is different than running it manually. on manual start, everything works. starting through systemctl, haproxy is not able to find the service it proxies, and answers ...
Magnar's user avatar
  • 1,047
6 votes
3 answers
24k views

systemctl stops Tomcat service immediately after start

I asked first this question on StackOverflow, but it seems that this site is a better fit. I am setting up a web app environment to run Java apps. The environment is supposed to be: AWS EC2 Ubuntu ...
yateam's user avatar
  • 101
6 votes
2 answers
9k views

clamav-daemon start condition failed, /var/lib/clamav/daily.{c[vl]d,inc} was not met

After installing Modoboa(Open Source Mail Hosting), I Tried to start clamav-daemon, but i faced start condition failed. systemctl status clamav-daemon.service clamav-daemon.service - Clam ...
Omid Estaji's user avatar
6 votes
2 answers
3k views

restarting all specific units on systemctl without for loop?

Is someone here able to start/stop/reload/... a list of units specified with a wildcard or similar method on systemctl? I try do do somethin like: systemctl restart openstack-nova-*.services or ...
Dr I's user avatar
  • 975
6 votes
2 answers
30k views

Unable to restart a systemctl service remotely as a non root user

I have a systemd.socket named gunicorn.socket which I would like to restart after updating some code on a remote server. I've followed the steps detailed in Allowing a non-root user to restart a ...
marcanuy's user avatar
  • 268
5 votes
2 answers
4k views

Parsable output from systemctl (for example list all units)

I am not happy with the output of systemctl I have a script which parses the output of systemctl list-units -t service --full --all The beginning of the output look like this: UNIT ...
guettli's user avatar
  • 3,703
5 votes
2 answers
836 views

sytemctl status log output

When I run systemctl status with multiple services at once like sudo systemctl status myservice1 myservice2 myservice3 I see the output, but in the end I see lines 1-48/48 (END) or if the output is ...
lamviec's user avatar
  • 51
5 votes
1 answer
44k views

where is systemctl command in redhat 6.6 64 bit OS?

I was trying to run status of network by following commands. sudo systemctl status network However the system says systemctl command not found.
DaeYoung's user avatar
  • 185
5 votes
1 answer
22k views

fail to enable mysqld service but after reboot the service is running on centos 7

After I installed, I run systemctl enable mysqld.service. Then, the output is: Failed to execute operation: Too many levels of symbolic links After this error, I reboot my service, and I check the ...
Tony's user avatar
  • 51
5 votes
1 answer
3k views

CentOS 7: Fresh Install Firewalld doesn't work at all (Fatal Error: No IPv4 and IPv6 firewall)

I have the following problem. I just did an DVD CenOS 7 installation. After I boot into the system I normally login as the root user. From there I'm trying to configure Firewall on my server. As I'm ...
patvax's user avatar
  • 151
5 votes
1 answer
1k views

gunicorn 19.2 fails to start with 18.0 configuration

I've got a dev server running gunicorn/Django behind nginx. As part of a wider server environment update, I attempted to upgrade gunicorn from 18.0 to 19.2.1, but the service would no longer start. (...
JK Laiho's user avatar
  • 197
5 votes
0 answers
2k views

`systemctl disable --now postgresql` doesn't stop the daemon

I'm running Debian Stretch and PostgreSQL 10 from apt.postgresql.org. When I do: postgresql disable --now postgresql the database server doesn't stop. It says: Synchronizing state of postgresql....
x-yuri's user avatar
  • 2,195
4 votes
1 answer
3k views

Why does `systemctl start myservice` not fork this service?

I have written a systemd service. When I run systemctl start foo.service, the service starts and runs correctly, but systemctl does not return immediately to the shell. After a while it exits with ...
spraff's user avatar
  • 549
4 votes
1 answer
18k views

Mongodb doesn't start using systemctl

When I try to start the mongo service(systemctl start mongodb) I get this error in journalctl: Mar 21 15:36:18 redhat7 systemd[1]: Started High-performance, schema-free document-oriented database. ...
Telen Stanley's user avatar
4 votes
2 answers
2k views

systemctl after dependency not listed (and probably not working)

I want to migrate gammu-smsd service to mariadb, so I have edited service systemctl edit --full gammu-smsd.service - I have added mariadb.service on After line. [Unit] Description=SMS daemon for ...
Tom HANAX's user avatar
  • 163
4 votes
1 answer
905 views

Show custom exit status in systemctl

I would like to show a custom message when someone runs systemctl status and the script has failed. Systemd seems to have a few built in. If I have a script that runs exit 200 systemctl status will ...
Matthew's user avatar
  • 183
4 votes
0 answers
764 views

`systemctl show` outputs incorrect MemoryCurrent value

on one box, systemctl show get an incorrect value for unit memory usage: $ systemctl show crond | grep MemoryCurrent MemoryCurrent=18446744073709551615 18446744073709551615 == UINT64_MAX, this must ...
georgexsh's user avatar
  • 143
4 votes
1 answer
4k views

Systemd service: Failed to issue method call: Unit service failed

I am trying to make a custom service in my VPS. However, it doesn't let me to run it. It says the following. I am not sure what is going on but when I run it on my Ubuntu laptop, it works properly. ...
kobbycoder's user avatar
4 votes
1 answer
2k views

CentOS7 systemctl calling ExecStop on reboot after my procceses are already killed

I have a systemd script which is as follows: [Unit] Description=My sites Before=shutdown.target reboot.target halt.target [Service] Type=oneshot ExecStart=/bin/bash -c '/etc/xxx/mySites start' ...
Mariano Martinez Peck's user avatar
3 votes
2 answers
41k views

Trouble creating PID file in systemd service script [duplicate]

I'm trying to get RipRight installed on Debian, for which there doesn't appear to be any pre-built package. I'm having difficulty getting a systemd script working to start/stop RipRight running as a ...
jia103's user avatar
  • 131
3 votes
1 answer
2k views

How to debug linux startup hang

My ubuntu system hangs on the startup. It hangs on [OK] items like usual on boot. Interestingly, I am able to ssh onto this machine, but the boot never finishes and login screen doesn't appear. What ...
Konstantin Solomatov's user avatar
3 votes
4 answers
36k views

systemctl shows inactive / dead, but service is running

I would like to manage a TeamSpeak 3 server with systemd (systemctl). When I start / stop / restart the TeamSpeak 3 server using systemctl command, systemctl is returning the correct status: $ ...
checker284's user avatar
3 votes
1 answer
8k views

Postfix doesn't start on reboot

I'm on CentOS 7 and as far as I understand, all that is needed for Postfix to start on reboot is to run systemctl enable postfix.service However, that doesn't work for me. After a reboot, systemctl ...
Amati's user avatar
  • 171
3 votes
1 answer
17k views

systemd failing enable with "service is transient or generated". What's wrong with this configuration?

In General I've been scouring the web looking for actually helpful documentation about systemd and this error, but the majority of it has been troubleshooting niche cases or goes into such extreme ...
noket's user avatar
  • 31
3 votes
1 answer
3k views

Systemd causing multiple supervisor processes

I'm having a problem narrowing down where the issue is for my supervisor configuration that causes a program to be duplicated. I'm running a Python Tornado Web Server through an Nginx reverse proxy. ...
OneCricketeer's user avatar
3 votes
0 answers
2k views

Ubuntu 16.04 Systemd not possible to use systemctl

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 ...
ghovat's user avatar
  • 131

1
2 3 4 5