Questions tagged [systemctl]
systemctl is the main command to control and introspect the systemd Linux init system.
231
questions
102
votes
3
answers
63k
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 ...
74
votes
4
answers
232k
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 ...
50
votes
3
answers
48k
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 ...
35
votes
2
answers
60k
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]...
21
votes
4
answers
63k
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:...
19
votes
5
answers
102k
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 ...
17
votes
1
answer
50k
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....
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 ...
16
votes
9
answers
34k
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 '...
14
votes
1
answer
75k
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 ...
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 ...
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....
13
votes
1
answer
23k
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....
12
votes
7
answers
61k
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
...
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 ...
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 ...
11
votes
4
answers
28k
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....
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=...
9
votes
4
answers
37k
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 ...
8
votes
2
answers
37k
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 ...
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 ...
8
votes
3
answers
43k
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 ...
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 ...
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 ...
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 ...
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 ...
6
votes
2
answers
8k
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 ...
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 ...
6
votes
2
answers
29k
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 ...
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 ...
5
votes
2
answers
761
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 ...
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.
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 ...
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 ...
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. (...
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....
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
...
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 ...
4
votes
1
answer
883
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 ...
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.
...
4
votes
0
answers
743
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 ...
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. ...
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'
...
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 ...
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 ...
3
votes
4
answers
35k
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:
$ ...
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 ...
3
votes
1
answer
16k
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 ...
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. ...
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
...