Questions tagged [systemctl]
The systemctl tag has no usage guidance.
116
questions
1
vote
1
answer
43
views
How do I re-time a periodic MD RAID check to get it started sometime else?
I've got an MD RAID (level 10) on my SOHO server (running OpenSuSE 15.5), which undergoes a lengthy check (> 3 hours for some 1 TB net) every Sunday at 1:00 AM local time. As the server does not ...
0
votes
1
answer
36
views
High CPU usage when starting process with systemd
I have this service file:
[Unit]
Description=MyService
[Service]
User=root
WorkingDirectory=/path/to/workingdir
ExecStart=/path/to/myservice
[Install]
WantedBy=multi-user.target
When I start ...
-3
votes
1
answer
136
views
bind9 dont start On Kali Linux
when I install bind9 on Kali Linux,cant start or stop it. when use systemctl status bind9.service for view status it, I see message that say Unit bind9.service could not be found.
root@sarvdata:~# ...
1
vote
1
answer
20
views
How to define command line options in my sql systemctl service
I have a mysql install on Digital ocean cloud.
And by default it's working with system ctl service.
I need to run the server with those options :
That have taken from here.
So I've tried to edit this ...
1
vote
1
answer
57
views
fail2ban on xcp-ng (xen server on an centos) keeps dying
I can't get the fail2ban.service to run. It gets killed constantly
I tried to install fail2ban on an xcp-ng (8.3 alpha2). I installed it from source because the default REHL repos are turned off and I ...
1
vote
1
answer
2k
views
Why k3s install failed? Job for k3s.service failed because the control process exited with error code
I installed k3s on Ubuntu 22.04
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --flannel-backend none" K3S_TOKEN=prokupljejbb sh -s -
[INFO] Installing k3s to /usr/local/bin/k3s
[...
0
votes
0
answers
92
views
mount and systemctl not executing inside crontab
Under root, i run crontab -e and write :
0 21 * * * systemctl stop transmission-daemon && umount /mnt/WD5 && hdparm -y /dev/sda
I also tried
0 21 * * * mount /mnt/WD5
None of them ...
0
votes
1
answer
439
views
systemctl start service command is not working in userdata of ec2
I am trying to run systemctl service in ec2 instance on launching of ec2 instance.
So for to run my script on start of ec2 instance i am running my script using user data of ec2 instance.
So my script ...
0
votes
1
answer
771
views
How to debug: Failed to connect to bus: No such file or directory (systemctl --user status)?
I am trying to run systemctl --user status from a user account in order to not run services from root.
The way I do it is as follows:
loginctl enable-linger $USER
export XDG_RUNTIME_DIR="/run/...
1
vote
1
answer
155
views
REDHAT machine + rsyslogd eating up 10+ GB
we notice about this problem recently
we found that rsyslog service is eating memory and some times its up to 10G
we have different kind of redhat machines as version 7.6 and 7.9
is it possible to ...
0
votes
0
answers
31
views
Config for all systemd services
I would like to add a few config options either as defaults or overrides (preferrably the latter) to all systemd services on a system. Is that possible?
Background:
I have a server where sometimes ...
0
votes
1
answer
123
views
Cleaning/Debugging services
I have a shell environment library where I maintain all types of checks and helpers functions for my bash/zsh environments (Linux and macOS). I like that periodic checks automatically inspect my OS' ...
1
vote
3
answers
95
views
How systemctl scheduler works and where it stores running services data?
I'm not asking about the files in the filesystem that configures the services, but about the internal database of systemctl itself, or perhaps the files that systemctl creates.
Questions:
How does ...
0
votes
1
answer
3k
views
how totally remove unexistent service from systemd/systemctl?
No files, no symlinks, service does not exist.
systemctl unit not listed, unit-file not listed.
systemctl daemon-reload
systemctl reset-failed
systemctl reboot
0 loaded units listed.
log entry cycle:
...
1
vote
1
answer
1k
views
systemd -- very unclear error msg/warning, "Refusing to accept PID outside of service control group..."
When doing systemctl-status on an old application, we are now seeing this error/warning:
"systemd[1]: Refusing to accept PID outside of service control group, acquired through unsafe symlink ...
0
votes
0
answers
1k
views
sudo systemctl start [email protected] doesn't want to work
I have a problem with the OpenVPN service.
I've already changed the server.conf, sysctl.conf and before.rules settings,
specifically these changes,
tls-auth ta.key 0 # This file is secret
cipher AES-...
1
vote
2
answers
2k
views
systemctl commands under WSL
I am running Ubuntu inside Windows using WSL.
I receive the following errors when I run scripts with systemctl command:
System has not been booted with systemd as init system (PID 1). Can't operate.
...
0
votes
0
answers
366
views
hwclock synchronization failed
After suspend/resume the system time is wrong (Set system time after Suspend) Not giving up. It was alluded (in answers) that it might be connected with the CMOS clock malfunction. Tried to ...
0
votes
0
answers
6k
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
...
1
vote
1
answer
2k
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-...
1
vote
1
answer
207
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 ...
2
votes
0
answers
294
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 ...
1
vote
0
answers
298
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 ...
0
votes
0
answers
595
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 ...
1
vote
0
answers
3k
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 ...
1
vote
1
answer
11k
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/[email protected] to make the service start on start-up, using the following configuration:
[Unit]
...
2
votes
2
answers
4k
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 ...
3
votes
3
answers
2k
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 ...
2
votes
1
answer
2k
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 ...
0
votes
1
answer
2k
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 "/...
0
votes
1
answer
167
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 ...
0
votes
0
answers
74
views
Can't start openvpn server..? Does anybody have an idea where issue lies?
root@debian:/etc/openvpn/server# systemctl status openvpn@server
● [email protected] - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset:...
3
votes
0
answers
8k
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@...
0
votes
0
answers
253
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 ...
5
votes
3
answers
4k
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 ...
0
votes
1
answer
565
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]
...
0
votes
1
answer
75
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 ...
1
vote
1
answer
1k
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: ...
0
votes
1
answer
155
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 ...
1
vote
0
answers
578
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 -...
1
vote
1
answer
64
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 ...
0
votes
1
answer
639
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'...
6
votes
2
answers
65k
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 ...
0
votes
0
answers
309
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 ...
1
vote
0
answers
59
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 ...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
37
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/...
17
votes
4
answers
66k
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 ...
2
votes
1
answer
4k
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) ...
1
vote
1
answer
6k
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. ...