Questions tagged [systemctl]

Questions about systemctl - the main tool to interact with systemd and the service manager.

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

Why is systemd service failing on Amazon Linux 2?

I have a Node.js application cloned on an AWS EC2 instance running Amazon Linux 2. I can execute the project's server.js file just fine: [ec2-user@ip-*********** portfolio_v3]$ nvm use 16 Now using ...
Aaron Parisi's user avatar
0 votes
1 answer
90 views

I'm curious about the difference between running a daemon with a systemctl command and running it directly [duplicate]

I had a question while dealing with the issue related to snmp in my project. If you enter the following command to execute snmpd with various options, snmpd will be executed without any problem. $ ...
monster-dev's user avatar
0 votes
1 answer
1k views

Systemd does not seem to be generating the Main PID properly

I modified the /lib/systemd/system/snmpd.service file as needed. Below is the contents of the snmpd.service file that I modified. [Unit] Description=Simple Network Management Protocol (SNMP) Daemon. ...
monster-dev's user avatar
2 votes
0 answers
2k views

systemctl shows Failed to get D-Bus connection: Operation not permitte

os:CentOS Linux release 7.5.1804 (Core),physical machine not docker ,not virtual machine I upgrade clickhouse first with yum localinstall ./clickhouse-*.rpm, and then I regreted, I downgrade ...
Hongwei Lu's user avatar
0 votes
1 answer
2k views

sysctl: permission denied on key "fs.inotify.max_user_instances"

I'm running a docker container, in the development environment. I'm trying to set the fs.inotify.max_user_instances value. Since inside the docker container I'm the root user, thus the sudo is not ...
Saeed Neamati's user avatar
1 vote
1 answer
156 views

Why this systemctl isn't starting?

It's on Debian 11. The file PwOn.service: [Unit] Description=Send a message with a telegram bot After=network.target Wants=network-online.target [Service] Type=simple ExecStart=/usr/bin/...
Obscuree's user avatar
1 vote
1 answer
1k views

How can a service daemon shut down normally without an ExecStop syntax?

I'm a systemd beginner. I wonder how the service can be terminated normally without the ExecStop= syntax in the systemd service unit file. For example, for mongod.service, there is no ExecStop=. [Unit]...
monster-dev's user avatar
1 vote
1 answer
217 views

Service cant find .sh file

I want to create service to host my bot. but my service cant find .sh file. i tried to create a new test service and it is the same. i have tried moving .sh file to easier access location but it still ...
Papop Lekhapanyaporn's user avatar
0 votes
1 answer
122 views

Why is systemd periodically reloading dnsmasq-dns service?

The dnsmask-dns process is reloading every 12 min (approx) on the device. This is a Centos device. grep Reloaded.Dnsm /var/log/systemd.log Feb 20 15:46:21 xxxx systemd[1]: Reloaded Dnsmasq DNS server....
Sriram's user avatar
  • 21
0 votes
1 answer
701 views

how do I handle a specific output from systemctl?

I am a beginner with bash/shell scripting and I am trying to handle a specific output that comes from systemctl when a specific service is not found. For example, when I run systemctl status xyz the ...
Sauce's user avatar
  • 3
1 vote
0 answers
122 views

yubikey-agent not running on login

According to man configuration.nix, enabling services.yubikey-agent should start yubikey-agent on login: services.yubikey-agent.enable Whether to start yubikey-agent when you log in. Also sets ...
rampion's user avatar
  • 1,659
3 votes
0 answers
211 views

Polkit Rule `systemctl enable`

How to write a rule so that an unprivileged user has the rights to execute the command systemctl enable my.service and only for my.service? I was able to give the rights to systemctl start/stop my....
Kolka V's user avatar
  • 31
2 votes
2 answers
2k views

Why is `systemctl --user` broken unless I run it using `su`?

In a recent Lubuntu 22.04 install, when running systemctl --user with user 1000 I get: ❯ systemctl status --user Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (...
Sebastian's user avatar
  • 143
0 votes
1 answer
1k views

systemd service unit Restart=on-failure doesn't restart daemon

I want to write a service unit file that'll start a daemon and restart it if it dies. I have: [Unit] Description=lmgrd [Service] User=flexlm Group=flexlm ExecStartPre=/usr/bin/cp /nfs/lmgrd/* /lm/ ...
Cavalcade's user avatar
1 vote
1 answer
7k views

How do I troubleshoot when systemctl will not restart the sshd service?

Long story short: I want to restart the sshd service because I think it might solve an issue I'm having using ssh on localhost. But I can't restart the sshd service; this is the problem that I am ...
carl13's user avatar
  • 13
0 votes
1 answer
2k views

how to limit the systemctl service in order to avoid memory leak

I want to share the following idea and understand if this is the right way to limit systemctl service to consume memory more than usual for example, let's say that we want to limit some service to not ...
yael's user avatar
  • 13.2k
0 votes
0 answers
28 views

Failed to activate custom made systemd.service file [duplicate]

I created a bash script scriptToCreateFilesWithSystemD.sh to create a file inside a directory dir4systemDfiles Both have read-write access for all and located in home directory I added this code ...
Raj Parayane's user avatar
0 votes
1 answer
130 views

making an init: how exactly does the reboot command work?

I'm trying to write an init, but can't figure out the reboot\poweroff thing. apparently reboot is just a link to systemctl? (I'm using arch) So how does this work? init poweroff works and stuff, but ...
sef sf's user avatar
  • 72
1 vote
1 answer
1k views

systemctl: unrecognized option '--value'

I am using the systemctl command to fetch only the value of a property. And executing the below command: systemctl show -p ActiveState --value servicename I'm getting this error: systemctl: ...
user8059388's user avatar
1 vote
1 answer
635 views

Where does "journalctl" read configurations from?

I have installed kubelet 1.26.0 on my Ubuntu 22.04 machine. Previously I had 1.25.2 version that I removed by apt remove kubelet command and reinstalled it with apt install kubelet command. Wherever I ...
best_of_man's user avatar
0 votes
0 answers
7k views

status=1/FAILURE starting kubelet

I've just installed kubeadm, kubelet, kubectl 1.26.0 using apt install command. When I try systemctl status kubelet, I get the following result: ● kubelet.service - kubelet: The Kubernetes Node Agent ...
best_of_man's user avatar
3 votes
0 answers
2k views

Why is my user manager not starting up correctly?

I am running Ubuntu 22.04 on WSL2 with systemd support enabled. My configuration worked fine until two days ago. I use TMUX and its plugins tmux-resurrect and tmux-continuum, the later one already ...
sebastianzander's user avatar
1 vote
1 answer
576 views

Run ts-node in systemd service

I'm trying to create a service to run a typescript file. This is what's in my service file so far: [Unit] Description=Service that runs the Parenti Bot After=network.target [Service] Type=simple User=...
Anthony Bias's user avatar
0 votes
1 answer
488 views

Systemd delaying restart of a failed service, appears to add a 30 sleep

(Originally posted this on stackoverflow but was asked to move it here.) I have a python daemon running as a service, sometimes several of them are running for different processes (p0, p1, etc.) that ...
Dave's user avatar
  • 103
1 vote
2 answers
1k views

How to get only the unit names using systemctl?

When I do systemctl list-units --all --state=loaded I get the output in of each unit with columns as UNIT LOAD ACTIVE SUB DESCRIPTION I need only the UNIT in output. I tried adding --...
Shivam Papat's user avatar
0 votes
0 answers
185 views

Iterating over mount points on startup with python script executed as a service with systemd

I want to iterate over mounting points with a Python script on a system startup. The script works fine on the fully booted system (even when called as sudo systemctl start launcher.service) but fails ...
Tony's user avatar
  • 1
0 votes
1 answer
177 views

systemd starts a service which has ordering after a disabled service

service B unit configuration (it is an oneshot service): [Unit] Description=Service B After=serviceA.service service A is disabled by default (it is a simple service) ● serviceA.service - service A ...
Chandrasekhar Raman's user avatar
0 votes
1 answer
110 views

Cryfs automount using service

I want to mount a cryfs Filesystem automatically after startup. I installed a new service: [Unit] After=network.target media-SB01_Cloud.mount [Service] ExecStart=/root/scripts/...
user154501's user avatar
0 votes
1 answer
58 views

Systemctl view targets names

Is there is any way I can view systemd target's names only. I know I can use: systemctl --type=target but its giving me other information as well like "load active", I only want name of ...
Harpreet's user avatar
0 votes
1 answer
153 views

systemctl through python

Is there is any way I can use systemctl status API through python? I'm looking for another method that running this command in sub process as than I need to parse output (that might cause issue if ...
Harpreet's user avatar
2 votes
1 answer
522 views

how to know that a template systemctl has been stopped

I think my question is similar to this one: https://askubuntu.com/questions/941775/stopped-custom-services-controlled-by-systemd-do-not-appear-in-systemctl-list-un But it didn't get any useful answer, ...
Julien Greard's user avatar
1 vote
1 answer
1k views

How to automatically restart systemd service if file is changed?

I have a systemd service which uses a custom file to start a program on a embedded-Linux device. I want to start this service automatically when the file is modified/changed. While reading systemd ...
Preeti 's user avatar
  • 223
0 votes
1 answer
578 views

Can't start service manually after `sudo systemctl disable`

I have a service that starts at boot, but I want to control it manually. Everywhere I go it says sudo systemctl disable service should do what I need, but it seems to remove the service entirely so I ...
splaytreez's user avatar
0 votes
0 answers
1k views

i created service, but it shows inactive (dead)

this is not the same problem as other topics have. i was trying to create a service on my ubuntu but it keep saying this service is inactive (dead). my OS: my service (at /etc/systemd/system/resume....
jamsh's user avatar
  • 1
2 votes
0 answers
2k views

Start ngrok via systemctl services on Ubuntu Server

I am running a Ubuntu Server 22.04.1 and trying to run ngrok at startup using systemd, to create a ssh tunnel. Current state: BWS_ngrok.service under /etc/systemd/system/BWS_ngrok.service ngrok.yml ...
Jannis's user avatar
  • 21
1 vote
1 answer
719 views

sys-kernel-debug, and logind service fail causing noticeable delay on logging in

Background/Context Im running a Debian GNU/Linux 11 (bullseye) x86_64(5.4.174-2-pve) virtualized server on a LVC container(proxmox stuff). Im really new to both debian(i tipically use arch linux which ...
Imeguras's user avatar
  • 133
6 votes
2 answers
1k views

What are these > at the right of unterminated lines, when I do a systemctl status or a journalctl for example?

When I do a sudo systemctl status elasticsearch.service or a journalctl -xe on Debian 11 I have this output: many lines are ended with > characters and I don't know how to handle these lines to ...
Marc Le Bihan's user avatar
0 votes
1 answer
187 views

Missing shutdown entries in wtmp despite graceful reboots

Linux system with kernel 4.14.76 and last from util-linux 2.35.1. I am using last -x reboot shutdown to detect abrupt shutdowns and power loss. To my understanding, a clean reboot should show as a ...
Neal Eastwood's user avatar
2 votes
0 answers
1k views

configure ngrok as service > permission denied

I have a permissions error while attempting to setup ngrok as a service. $ sudo ngrok service install --config /home/m/snap/ngrok/79/.config/ngrok/ngrok.yml INFO[08-12|19:11:50] open config file ...
CodingMatters's user avatar
6 votes
2 answers
15k views

Warning: some journal files were not opened due to insufficient permissions

I receive this warning when running systemctl status <servicename>.service after manually stopping my newly installed servce. "Warning: some journal files were not opened due to ...
Stormholt's user avatar
0 votes
0 answers
1k views

Unit Not Found after daemon-reload

My service is running as expected, I can start, top, restart, status. But if I run systemctl daemon-reload, running systemctl start, stop, and status for my services results in the error: Failed to ...
Timothy C. Quinn's user avatar
0 votes
1 answer
889 views

How to use Systemd user services without Desktop session[No D-Bus]

I'm trying to setup user level Services(Python/Java/Node JS Processes) which need to run all the time, until I stop explicitly. The service need to be start/stopped as non root user. I've created ...
Zeus's user avatar
  • 101
0 votes
0 answers
999 views

Can't enable/disable multi-user.target or graphical.target on CentOS stream 9

I was trying the command systemctl enable multi-user.target but I got the following: The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section,...
noname's user avatar
  • 1
1 vote
1 answer
992 views

How to make libvirtd service to start at boot in Centos 9

I would like to start the service libvirtd.service is enabled but do not active at startup [root@GTS ~]# systemctl enable libvirtd.service [root@GTS ~]# systemctl status libvirtd.service ○ libvirtd....
user1993416's user avatar
0 votes
1 answer
924 views

systemctl status postgresql.service not working as intended

System: Ubuntu 20/WSL Check status. sudo service postgresql status or sudo pg_ctlcluster status 15 main Now I am pretty sure the status is online. But even if postgresql is online, if i do ...
jian's user avatar
  • 567
0 votes
2 answers
11k views

“systemctl start dhcpd.service” command not working for PXE server setup virtual

I am trying to setup a PXE server on my laptop on CentOS 7 to connect to a physical test client, following the tutorial on: https://www.linuxtechi.com/configure-pxe-installation-server-centos-7/#...
akayoshi1's user avatar
-1 votes
2 answers
746 views

running systemctl via ssh without asking for password [closed]

I want to run ssh without asking for a password and invoke systemctl without a password I tried doing the following: ssh -t <user>@<host> "echo <password> | sudo -S systemctl ...
Daniel's user avatar
  • 50
1 vote
0 answers
2k views

Why is libvirtd (KVM) not starting at boot

I have a brand new Fedora Server 36 minimal install and all it will run is KVM. Did the install with dnf group install "Headless Virtualization" and restarted the server. systemctl status ...
Thomas Meier's user avatar
1 vote
0 answers
467 views

systemd/cgroup resource limits -- different behaviour between hosts

I'm heavily confused. I have a physical server running Ubuntu 20.04 and a vagrant (VirtualBox) virtual machine also running Ubuntu 20.04. Both are running with hwe 5.13 kernel and systemd 245 (245.4-...
Kamil's user avatar
  • 1,461
1 vote
1 answer
3k views

Tomcat catalina.sh starts correctly but starting tomcat.service gives Permission denied

Background On RHEL 8 I have Apache Tomcat v8.5.78 installed under /opt/tomcat/. User & group of the directory is set to tomcat:tomcat, so is the directory's content. I can start Tomcat with $ ...
halloleo's user avatar
  • 567

1
2
3 4 5
7