Questions tagged [systemctl]

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

94 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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
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,298
4 votes
0 answers
809 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
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
3 votes
1 answer
7k views

Failed to get properties: Activation of org.freedesktop.systemd1 timed out

Getting the below error while running systemctl status commands in my RHEL 7 linux server. # systemctl status docker.service Failed to get properties: Activation of org.freedesktop.systemd1 timed out ...
Nithin Satheesan's user avatar
2 votes
0 answers
289 views

Debian 10: sendmail service stops constantly

Whenever I start sendmail service, it reports May 01 00:51:43 systemd[1]: Starting LSB: powerful, efficient, and scalable Mail Transport Agent... May 01 00:51:43 su[6784]: (to smmsp) root on none May ...
Kaper365's user avatar
  • 121
2 votes
3 answers
4k views

systemctl --user cannot start docker containers on Ubuntu 20.04

I am in the process of migrating some services from Ubuntu 18.04 to 20.04. In 18.04 I run these services under a non-root user. All these services start a docker container, and they're working just ...
ovidiu's user avatar
  • 121
2 votes
1 answer
1k views

How does SystemMaxUse on journalctl work?

I'm using journalctl for system logging. I want to have a log file to check what is happening with the process I'm running at anytime. So I'm configuring the journald.conf file like this: [Journal] ...
carlosabcs's user avatar
2 votes
0 answers
3k views

systemd service in pacemaker for high availability

I came to know about the pacemaker for high availability. I have one simple service running on linux VM. I have started that using systemctl start <service name> command. I want to make this ...
ajay_t's user avatar
  • 121
2 votes
0 answers
2k views

Failed to get properties: No such interface ''

i try to start my new service : /etc/systemd/system/myservice.service [Unit] Description=My Desc... After=network.target [Service] User=webXX Group=clientXX ExecStart=/var/www/xxx/xxx/xxx/golang-...
eclaude's user avatar
  • 121
2 votes
1 answer
12k views

How to run clamd by systemd as daemon on Centos 7

# rpm -q centos-release centos-release-7-5.1804.el7.centos.2.x86_64 # rpm -qa clam clamav-filesystem-0.100.0-2.el7.noarch clamav-data-0.100.0-2.el7.noarch clamav-lib-0.100.0-2.el7.x86_64 clamav-...
vczm's user avatar
  • 121
2 votes
0 answers
5k views

vsftpd failing to start

I have tried solutions presented in the following posts: https://unix.stackexchange.com/questions/364529/centos-vsftpd-not-starting/364555 https://superuser.com/questions/987912/why-my-vsftp-service-...
Naltroc's user avatar
  • 121
2 votes
0 answers
509 views

How can I troubleshoot a systemctl maintained daemon, on Oracle Linux 7, when it dies immediately after being spawned?

I'm trying to run jenkins, via systemctl, and it keeps dying immediately after being started. There is nothing in the "systemctl status" nor in "journalctl". Jenkins logs also show nothing. I've ...
wsaxton's user avatar
  • 195
2 votes
2 answers
2k views

syslog-ng working as foreground process but not as daemon

I'm working to implement syslog-ng OSE in my environment. Eventually I'd like to setup a central logging server, but in order to get my feet wet, I'm starting with a simple configuration. I've ...
NevDull's user avatar
  • 21
2 votes
0 answers
2k views

CentOS 7: Nginx systemctl hangs on start, why?

I compiled nginx with pagespeed and made the nginx.service file in /usr/lib/systemd/system/nginx.service but when i try to do systemctl start nginx it just hangs, nginx does start but systemctl hangs. ...
therealssj's user avatar
1 vote
0 answers
30 views

Support Multiple Service Dependencies in Requires Directive in RedHat 8.9

Thank You for looking into the question. I have a Systemd service lets call it main-application.service which needs service testA.service and testB.service started before start of itself. Following is ...
Pulkit Agarwal's user avatar
1 vote
1 answer
1k views

Issue with sshd logfile using fail2ban on minimal Ubuntu server 22.04

I am working on trying to get fail2ban set up and enabled for sshd on my VPS with Ionos. I am using a minimal Ubuntu 22.04 server install. fail2ban has installed fine, but getting it to run seems a ...
Sorin Orii's user avatar
1 vote
0 answers
141 views

OpenVPN restart systemd service if TLS error occured

I have a systemctl service which starts openvpn command with given config file. openvpn *filename* But if somebody uses same certificate to open VPN from another device - service logs TLS errors and ...
Dmitry's user avatar
  • 21
1 vote
0 answers
235 views

systemd-nspawn can't auto login

I'm trying to config auto login for my nspawn container and I created /etc/systemd/system/[email protected]/autologin.conf and inside of that I wrote this config: [Service] ExecStart= ...
Jessica's user avatar
  • 11
1 vote
0 answers
157 views

What is the best process to install a node based service/daemon/unit on Debian 11?

In this post: [Other serverfault post][1] [1]: https://serverfault.com/questions/1018676/how-to-configure-systemd-service-unit-to-start-node-app-with-npm-start-instead I found that it's possible to ...
gwhiz's user avatar
  • 57
1 vote
0 answers
2k views

systemd fails to restart even after calling reset-failed

We have a need for restarting a service frequently in certain special scenarios. So when it fails with start-limit, the suggested solution is to call "reset-failed". What we found is that, ...
Renuka Manavalan's user avatar
1 vote
0 answers
2k views

`bad-setting (Reason: Unit nftables.service has a bad unit file...` when add `/etc/systemd/system` conf to nftables

System is debian 10 with nftables. I plan to make nftalbes auto restart when failed,script as below: cat << EOF >> /etc/systemd/system/nftables.service.d/override.conf [Service] Restart=on-...
kittygirl's user avatar
  • 975
1 vote
0 answers
396 views

How to troubleshoot a systemd timer on Ubuntu 16.04 that won't re-schedule every minute as expected?

I have an existing systemctl target that was originally (by default installation) scheduled to run everyday, almost continuosly with just a pause of 30 seconds between the end and beginning of each ...
develox's user avatar
  • 41
1 vote
0 answers
352 views

Mongo Authentication when mongod started as a service

System specs: OS: Debian 10 Mongo Shell: v4.4.4 Mongod: v4.4.4 I successfully created a user administrator for MongoDB with the privileges below (output from show users in Mongo Shell). { "...
walkmitch's user avatar
1 vote
0 answers
4k views

Warning: The unit file, source configuration file or drop-ins of X changed on disk. Run 'systemctl daemon-reload' to reload units

I am running Debian 10.4 on kernel 4.19.66+. It seems that my unit files are changing on their own (It sounds crazy, I know), with no interaction from me, the only user of the system. I found this ...
Brandon's user avatar
  • 11
1 vote
0 answers
3k views

Systemd unit not found on start but exists on status

A service exists and succesfully found via status command >sudo systemd status my-service ● my-service.service - My service description Loaded: loaded (/usr/lib/systemd/system/my-service.service;...
TEXHIK's user avatar
  • 111
1 vote
0 answers
2k views

Postgresql: can't start service database system was shut down

I install Postgresql using sudo apt install postgresql postgresql-contrib then I run sudo systemctl restart postgresql then I run sudo systemctl status postgresql It says Active: active (exited) ...
parsecer's user avatar
  • 163
1 vote
0 answers
179 views

View systemctl service process

I have a minecraft server running as a system service and wish to check up on it. I know I can do systemctl status minecraft.service but that doesn't let me see the java process's output and/or input ...
ChildishGiant's user avatar
1 vote
0 answers
30 views

pre launching systemd user processes

I've configs in place to start resque-first.target, then resque-metro.target and finally resque-prisma.target, but for some reason they all start at the same time systemctl --user cat resque-worker....
luisgarcia's user avatar
1 vote
1 answer
876 views

How does systemctl variable escaping work in a shell?

I want do a batch job with systemctl, something like: systemctl status v2ray-haproxy@{1..5} That's fine. But when i change 5 to a variable: n=5;systemctl status v2ray-haproxy@{1..$n} It's not ...
Rampage's user avatar
  • 11
1 vote
0 answers
794 views

Maldet having problems with systemctl

Trying to start maldet daemon. Following shows up: "Job for maldet.service failed because the service did not take the steps required by its unit configuration." I have configured the 'maldetect/...
n - s - m's user avatar
1 vote
1 answer
1k views

autossh working fine from terminal, bot causing permission denied from systemctl

I'm trying to integrate autossh on a raspberry pi. if I launch the command by itself autossh -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -N -R 22002:localhost:22 user@myserver everything ...
Dany Y's user avatar
  • 125
1 vote
1 answer
4k views

Preview or debug (dry-run or trace) systemctl actions (start, stop, restart, etc.)

Without having to manually trace dependencies, e.g. with systemctl show or systemctl cat, and manually inspect the state of the system with systemctl status and systemctl list-units, is there a way to ...
Amir's user avatar
  • 883
1 vote
0 answers
859 views

Failed to start open network operating system using command systemctl

i follow the admin guide to install onos and when i issue the following command: sudo systemctl status onos.service it output a error message that show failed to start open network operating system. ...
Max You's user avatar
  • 21
1 vote
0 answers
2k views

How to run a docker image as a systemctl service?

I'm following the instructions here, using 'docker run'. I came up with the following. The container starts, and then stops. What am I missing? For that matter, systemctl status shows me the tail of ...
bmargulies's user avatar
  • 2,403
1 vote
0 answers
8k views

systemd killing process on start after timeout period

I got a daemon in centos 7 that I'm trying to setup for execution on boot via systemd. The daemon is a binary (c source) that does a fork and change of id/group. The trouble I'm having is systemd ...
user44021's user avatar
1 vote
1 answer
2k views

How to pass arguments to systemd-nspawn via systemctl?

I am testing systemd-nspawn and launch a base system testcont (previously created with debootstrap) either via # systemd-nspawn -bD testcont --network-bridge=br1 or # systemctl start systemd-...
WoJ's user avatar
  • 3,657
1 vote
0 answers
996 views

dovecot, postfix, systemctl start never completes, mystery dependency

I've installed Xubuntu 15.04 and right away I was forced to dive right into the gritty details of systemd, systemctl, systemd-analyze. Right out of the box, postfix hangs on apt-get on the configuring ...
Mike's user avatar
  • 111
0 votes
1 answer
391 views

Tomcat9 used environments variables on server.xml

I try to insert environments var on conf/server.xml file I follow the tomcat documentation : https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/digester/EnvironmentPropertySource.html ...
toto rrro's user avatar
0 votes
0 answers
74 views

Linux service constantly restarting

I have a service file mmctrl.service with the following contents [Unit] Description=MosquitoMax Controller Service After=network.target [Service] User=mm Group=mm WorkingDirectory=/home/mm/ ...
Daniel Watrous's user avatar
0 votes
0 answers
172 views

On Ubuntu, systemctl (show|status) with wildcards does not work with inactive(dead) processes even with "--all" flag

Although this https://serverfault.com/a/915634/1060236 suggests all services should be listed, when I run: sudo systemctl status "prefix.*" --all or sudo systemctl show "prefix.*" -...
qwer's user avatar
  • 101
0 votes
0 answers
82 views

How can I start a disabled service@ in Fedora 38?

I have 2 openvpn-client@ services (openvpn-client@df and openvpn-client@sp) configured in my machine. I don't want them automatically started at boot. But I want to be able to manually start them ...
Rsevero's user avatar
  • 11
0 votes
0 answers
119 views

Systemd sequencial stop of template unit instances

I have a template unit that that I have to created in order to start/stop some services running an a given port. something like [email protected], [email protected]. [Unit] After=network.target ...
thiebaut fischer's user avatar
0 votes
1 answer
126 views

Ignore ExecStartPre sleep for ad-hoc systemctl starts

I have a PDF Rendering custom application, I have successfully created a systemctl service for it. I have successfully configured the ExecStartPre=/bin/sleep 30 to delay the start by 30 seconds. ...
user1031053's user avatar
0 votes
0 answers
770 views

Environment Variable set in systemd service file not set

I have the problem than when I start my service a environment variable I have set in the service file is not set. The Service file is as follows [Unit] Description=<DESCRPITON> After=podman....
Lars Nielsen's user avatar
0 votes
1 answer
168 views

StartExecPost calling the service itself

I have a service defined as bellow: Unit] Description=My Service After=network.target [Service] ExecStart=/usr/local/bin/myservice KillMode=process Restart=on-failure ExecStartPost=/usr/local/bin/...
iAmoric's user avatar
  • 121
0 votes
1 answer
498 views

SELinux policys keeping Tomcat from starting

On a newly built Oracle Linux 8 server i added a drive and file system, then put put Apache Tomcat on that file system via the tarball. Now when starting Tomcat via a services file, I get an error ...
Eric W's user avatar
  • 59
0 votes
0 answers
69 views

Trouble starting by service: Linux 3.10.0-1160.62.1.el7.x86_64 #1 SMP Wed Mar 23 09:04:02 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Linux XXXXXXXX 3.10.0-1160.62.1.el7.x86_64 #1 SMP Wed Mar 23 09:04:02 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux cat -vetn rc.service 1 [Unit]$ 2 Description=Script Daemon$ 3 $ 4 ...
Arati Jagadeesan's user avatar