Questions tagged [systemctl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Job for service failed because the control process exited with error

I'm trying to run a service manually, and everytime I get the folling messages: user1@machine:~/Tools/systemd_tools$ sudo systemctl status tool_fd.service ● tool_fd.service - automatic tool service ...
user avatar
  • 1
1 vote
1 answer
11 views

code=exited, status=1/FAILURE on mkfs.ext4 in Ubuntu

I stopped this service and now when I attempt to start it I get the following error: Is there a way I can find out why the first process is failing? systemctl status crmpicco-admin.service ● crmpicco-...
user avatar
  • 315
1 vote
1 answer
24 views

`systemctl --host root@pc2` not working but `ssh root@pc2 systemctl` is?

systemctl has a --host option that is meant to execute the named systemctl command on the name host. The man page suggests that this uses ssh under the hood, so it is all the more confusing to me that ...
user avatar
2 votes
0 answers
42 views

Set system time after Suspend

After waking up (after Power Off/Log Out > Suspend) the system time is wrong (either in the future or past). $ systemctl restart systemd-timesyncd.service makes it right again. Is there a way to ...
user avatar
0 votes
0 answers
22 views

Failure In Name Resolution On Startup After Incorrect VPN Uninstall

I uninstalled OpenVPN Server after not being able to set it up correctly and finding a working alternative solution. However, I think I uninstalled it incorrectly. Every time I restart my machine, I ...
user avatar
  • 123
0 votes
0 answers
17 views

What is CPUQuota PerSec and PerPeriod in systemd?

The manpage for systemd.resource-control says nothing about CPUQuotaPerSecUSec and little about CPUQuotaPeriodUSec. It says nothing either about being set with the value 'infinity', as it is in the ...
user avatar
  • 155
0 votes
0 answers
23 views

How list only systemd service names, and loop over them?

I would like to loop over systemd service names, but can find no option to output just the service names, and have tried using cut, but without success. ._. systemctl list-units | cut -f 1 -d= UNIT ...
user avatar
  • 155
0 votes
0 answers
19 views

linux + how to capture the exception before running any systemctl command

Some times we get the following expiation when using systemctl restart XXXX.service ( XXXX – is the service name ) Error getting authority: Error initializing authority: Could not connect: Resource ...
user avatar
0 votes
0 answers
19 views

LINUX + find the root cause for exception - failed to create bus connection: Resource temporarily unavailable

here is a strange exception for timedatectl command , on our RHEL server version 7.6 timedatectl set-timezone UTC Failed to create bus connection: Resource temporarily unavailable based on that ...
user avatar
0 votes
0 answers
239 views

Docker with systemd and systemctl

I want to make a docker container that can run systemctl and systemd commands. I am new to docker and never have I ever learnt about docker. I have a docker file but dont know where should i place ...
user avatar
0 votes
1 answer
464 views

TigerVNC server not working within systemctl but works fine separately

I've set up TigerVNC server on Ubuntu 22.04LTS. I've created a file at /etc/systemd/system/vncserver@.service to make the service start on start-up, using the following configuration: [Unit] ...
user avatar
1 vote
2 answers
288 views

Why is my PostgreSQL startup service not working properly until I restart it manually after reboot?

I have PostgreSQL running on my Linux server. PostgreSQL is enabled and is active after reboot. In the config file from PostgreSQL I enabled remote access. But every time after I reboot my device, the ...
user avatar
  • 11
1 vote
2 answers
263 views

Issues starting Nessus in Kali Linux from WSL2

I am trying to install nessus for a vulnerability study in Kali linux. Kali is running as a Win-Kex instance from WSL2 on windows 11. I have downloaded Nessus and trying to install with: sudo dpkg -i ...
user avatar
1 vote
1 answer
386 views

Linux: how to automatically restart service if there is error in log?

Hello in the sudo systemctl status <service> I sometimes see an error in text like [info] asio async_shutdown error: asio.system:32 (Broken pipe), yet it is still marked as [info] and status of ...
user avatar
  • 57
0 votes
1 answer
193 views

How can I start/stop/disable all VNC servers on Rocky Linux/Centos 8 with one command? (TigerVNC)

Previously, wildcards were supported. E.g. sudo systemctl stop 'vncserver@*' sudo systemctl disable 'vncserver@*' Now in Rocky Linux (and Centos-8 should be the same), the users are listed in "/...
user avatar
0 votes
0 answers
21 views

Passing customized parameter to systemctl

We have one service in CentOS 6, for that service we can pass parameters like service XXXX start, service XXXX stop, service XXXX minimalstart. We have all these start, stop, minimalstart functions in ...
user avatar
0 votes
1 answer
44 views

Systemctl Socket Talking to the Wrong Process

I'm trying to run a Minecraft server on VM running Debian 10. I've set up the server to run as a service and am attempting to use a socket listening to a FIFO based on this question that last saw ...
user avatar
0 votes
0 answers
29 views

Can't start openvpn server..? Does anybody have an idea where issue lies?

root@debian:/etc/openvpn/server# systemctl status openvpn@server ● openvpn@server.service - OpenVPN connection to server Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled; vendor preset:...
user avatar
0 votes
0 answers
164 views

How to automatically start and stop a systemd unit based on a file PathChanged option?

I need to be able to automatically start and stop a service based on if a specific file's path is changed. If I just use a .service and .path file, enable, and start both, this will restrict the unit ...
user avatar
  • 101
3 votes
0 answers
2k views

Failed to connect to bus: Connection refused

I am using Nas server, Netgear Readynas. This is my uname root@nas316:~# uname -a Linux nas316 4.4.190.x86_64.1 #1 SMP Mon Oct 28 01:55:46 UTC 2019 x86_64 GNU/Linux Somehow can't restart server. root@...
user avatar
  • 467
0 votes
0 answers
77 views

systemctl minecraft server failing with no error log

Question was originally asked here but was moved when it was suggested that I post on superuser instead. I'm running a Minecraft server off a VPS running Ubuntu. The server is run through systemctl ...
user avatar
  • 101
0 votes
1 answer
523 views

`systemctl --user` results in "Failed to connect to bus" in google compute instance

I'm connected to a google compute instance via ssh with Debian 9. When I try any systemctl --user ... command (systemctl --user status for instance) I get an error: "Failed to connect to bus: No ...
user avatar
  • 11
0 votes
0 answers
55 views

fapolicyd, adding a program

I'm trying to decipher my audit logs. I'm the only user of the folder but there are several accounts. My server is set up as a webserver with Webmin/Virtualmin. I have several unprivileged accounts ...
user avatar
  • 227
0 votes
1 answer
54 views

Trouble with a bash script running as a systemd service restarting another systemd service the first time

I've written a bash loop and named it freud.sh. freud.sh #!/bin/bash set -x while : do sleep 30 systemctl stop pacemaker sleep 30 systemctl start pacemaker done Here is my unit file: [Unit] ...
user avatar
0 votes
1 answer
35 views

Always run Mongo Service

I need to start mongo database for my NodeJs app on my VPS, I did : sudo systemctl start mongod So if I want to start it a boot I did : sudo systemctl enable mongod Buf what if mongod crash how can ...
user avatar
  • 141
1 vote
1 answer
360 views

What causes systemctl to show or hide memory or CPU usage of services?

Today morning: # systemctl status udev ? systemd-udevd.service - udev Kernel Device Manager Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static; vendor preset: enabled) Active: ...
user avatar
  • 408
0 votes
1 answer
47 views

How to correctly enable a service on a CentOs 7 machine using systemctl enable command?

I am not a sysadministrator (I am a software developer) but this time I have to install some agents on some CentOS machines that have to be monitored by Wazuh (a SIEM software) and I have the ...
user avatar
  • 6,569
1 vote
0 answers
233 views

systemd-networkd resets my static eth0.network configuration

I am running a custom Yocto based Linux with kernel version 5.4.41. I am using systemd-network to manage my networks. root@box:~# systemctl --version systemd 244 (244.3+) +PAM -AUDIT -SELINUX +IMA -...
user avatar
  • 121
1 vote
1 answer
40 views

unable to make it so docker starts up automatically

Per https://docs.docker.com/engine/install/linux-postinstall/#configure-docker-to-start-on-boot I tried sudo systemctl enable docker. I then restarted and typed in sudo docker ps and... nothing. When ...
user avatar
  • 5,960
0 votes
1 answer
246 views

MX Linux - can't shutdown/ reboot - /usr/bin/systemctl: Syntax error: Unterminated quoted string

Today i tried to install snapd, I found that it's not so easy on MX Linux as on different distributions. I found this (also this ) link where I had to add some script to my /usr/bin/systemctl. It didn'...
user avatar
  • 3
4 votes
1 answer
27k views

Ubuntu systemctl service fails with: Main process exited, code=exited, status=1/FAILURE

I am writing a python script that subscribes to some MQTT topics to localhost MQTT broker and when a message is pushed, the script will call a function in another script on the same directory to load ...
user avatar
  • 101
0 votes
0 answers
124 views

How to create a systemd service for Rails

I need to create a systemd service for starting rails on my machine. Usually for running it I give the command rails s. But now I'd like and need to create a service for it. How could I do? Thank you ...
user avatar
  • 1
1 vote
0 answers
34 views

Take dektop screenshot from macOS launch agent

I have the following script to take a screenshot programmatically $ cat /Users/bamboo/capture/capture #!/bin/bash screencapture -o "$(dirname "$0")/screenshot.png" When I run ...
user avatar
  • 113
0 votes
1 answer
491 views

systemctl --user doesn't load on startup, even though manual 'start' works well

I have systemctl --user set up, that doesn't activate the service on startup. $ cat .config/systemd/user/syncthing.service [Unit] Description=Syncthing - Open Source Continuous File Synchronization ...
user avatar
0 votes
1 answer
36 views

What is the order in which the bootup tasks are run?

I have a Debian 10 server and I'm running a systemctl service on it. I am using systemctl enable myservice to run it at startup. Also, I have a few lines of bash script, which help set up networking/...
user avatar
13 votes
3 answers
53k views

How to enable systemd on WSL2: Ubuntu 20 and CentOS 8

I'm on WSL2 (Windows Subsystem for Linux, v2) and got the CentOS 8 WSL from: https://github.com/yuk7/CentWSL And the Ubuntu 20 WSL downloaded from Windows Store has no systemd enabled too. Got it ...
user avatar
  • 521
2 votes
1 answer
1k views

Shorter output from systemctl status

Is there a way to get shorter/custom output from systemctl status? I really only need the active line prepended with the name of the service. So something like this: apache2: active (running) ...
user avatar
  • 131
1 vote
1 answer
4k views

systemd service not executing script?

I'm using a Debian 9.11 system. I ran into a problem where systemd service runs my script but does not produce the desired result. I created a script named my_autossh.sh and put it under /usr/bin. ...
user avatar
2 votes
2 answers
5k views

Loading configurations failed while starting prometheus service in Ubuntu 18.04

I have an Ubuntu 18.04 OS and I have installed prometheus on it following steps here (I just changed links and versions). But when I tried to start the service with sudo systemctl start prometheus, I ...
user avatar
2 votes
0 answers
897 views

systemctl hibernate gives error not enough swap space for hibernation although the swap space in use is four times the RAM size

I already know that in Linux systems systemctl hibernate will not allow hibernation if there is not enough swap space for hibernation. But in my case the swap space was set to 32 GiB while the RAM ...
user avatar
1 vote
1 answer
69 views

Which file to add systemctl startup paramaters to?

I am running transmission through systemctl start/stop transmission-daemon. I want to add some logging paramaters to transmission when it starts but I am not sure which file to add them to. I have ...
user avatar
  • 11
0 votes
1 answer
2k views

Rhel 7 : systemd fails to start a process if background option is given

I have a systemd unit file (serv_unit.service): [Unit] Description=My service [Service] Type=simple Restart=always RestartSec=60 StartLimitInterval=400 StartLimitBurst=3 ExecStart=/etc/init.d/...
user avatar
2 votes
1 answer
6k views

systemd failed at step user spawning no such process

I am trying to run my custom service using systemctl, but it alwasy gave me error: Oct 29 14:09:30 ip-10-0-0-215.ap-southeast-1.compute.internal systemd[12402]: Failed at step USER spawning /home/ec2-...
user avatar
1 vote
2 answers
683 views

Similar commands with find are not outputting the same

I'm trying to run a find command on a directory which contains unit files: find /home/pi/units -type f -name "*.service" which returns /home/pi/units/manager.service I then want to pipe that ...
user avatar
  • 13
1 vote
1 answer
391 views

Can't start Apache in chroot with systemctl but can run it manually on my own from Bash with no issue

How to keep my Apache webserver running (prevent from being killed off for some unknown reason) in chroot when launched with systemctl at boot? My setup requires multiple scripts and when I start the ...
user avatar
0 votes
1 answer
26 views

Perform a command when a specific text occurs in a log file

Is there any way to achieve something like this? Whenever some specific word (or combination of them) occurs in log file, I want to perform specific action. For example: whenever there occurs a word "...
user avatar
0 votes
1 answer
2k views

Restart OpenVPN systemctl service when inactive

I've got a problem, with systemctl service restart. I setup an OpenVPN service, starting with the system, with [Unit] # HTPC Guides - www.htpcguides.com Description=OpenVPN connection to %i ...
user avatar
  • 1
0 votes
1 answer
2k views

CentOS 6.9 systemctl not found

To list all running or stopped or failed services, systemctl (soon to become systemd in CentOS 7) is just so nice. I just type systemtcl with nothing after it. service --status-all gives much fewer ...
user avatar
0 votes
1 answer
464 views

Failed to get D-Bus connection: Opération non permise

I'm using a centos 7 OS, I have removed /var/run/dbus/system_bus_socket after i accidently removed the /var/run folder. Now when i'm trying to use systemctl command i'm getting the error mentioned ...
user avatar
1 vote
2 answers
8k views

systemctl cannot start service (code=exited status =0/success)

I installed Shadowsocks-r in my CentOS 7 server, and I want to use systemd to manage it. So I created a file in /etc/systemd/system called shadowsocks-r.service. shadowsocks-r.service: [Unit] ...
user avatar
  • 13