Questions tagged [systemctl]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
22 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
0 votes
1 answer
130 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
1 answer
54 views

How do I get systemctl to run mysql after installing with dnf?

I installed mysql using sudo dnf install community-mysql When I type which mysql I get /user/bin/mysql When I try to run it using systemctl start mysql or mysqld or mysql80 it doesn't recognize any of ...
mcadio's user avatar
  • 101
1 vote
2 answers
115 views

Can a service managed by systemd send its logs somewhere other than /var/log/messages?

We have a RHEL 8 server where we have a few python applications installed for data management and analysis, notably JupyterHub and Airflow. We have these set up with systemd unit files so we can start,...
raphael's user avatar
  • 169
0 votes
0 answers
44 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
1 vote
1 answer
608 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
0 votes
0 answers
111 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
25 views

How do I manually unmask a service in linux? [duplicate]

When systemctl unmask name.service responds that it has succeeded but it didn't actually succeed, what do you do?! You can see my serious but surface-level problem here. So far as I've found so far, ...
Richard T's user avatar
  • 1,242
0 votes
1 answer
253 views

Postfix service WAS working, after reboot says "Failed to start postfix.service: Unit var.mount is masked."

On this server system we have been offloading the ssd system "disk" of high-write loads for reliability / longevity reasons and following one strategy, we went to a new one and everything ...
Richard T's user avatar
  • 1,242
0 votes
1 answer
72 views

Script is not taking systemctl commands

I have created a custom service to {start|stop|restart|reload|force-reload|status} for StoneDb(A MySQL modified version), but when checking the status then I get this error: Which is clearly means ...
H Aßdøµ's user avatar
0 votes
0 answers
77 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
75 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
140 views

Debian - How to prevent file corruption on power loss?

I have a Debian based OS, and I am creating a program that have support for upgrading itself. The program is ran on system-level as a systemd service. I have a problem when I update the software, ...
ml_kalju's user avatar
0 votes
1 answer
103 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
2 answers
887 views

Unable to initialize Kubernetes cluster upon sudo kubeadm init line command

Trying to deploy Kubernetes on AWS EC2 instance. I'm seeing the following errors/warning when running sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=all Errors: [WARNING ...
Rajesh Mappu's user avatar
0 votes
0 answers
513 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
1 vote
1 answer
1k views

dockerd does not start debian

Linux OS: debian11 Everything worked, but I think today after sudo apt upgrade I installed new version of docker. Then docker daemon does not start: $ sudo systemctl start docker Job for docker....
K.I.'s user avatar
  • 133
0 votes
1 answer
1k views

Sudoers NOPASSWD not working for specified commands

I have the following entries in the sudoers file: christian ALL=(root)NOPASSWD: /usr/sbin/shutdown christian ALL=(root)NOPASSWD: /usr/bin/systemctl start mc When running sudo shutdown -h now or sudo ...
Apollo's user avatar
  • 113
0 votes
1 answer
846 views

systemd not able to run some bash scripts

(Update with more info May 16, see end of post for journalctl messages) I've created a systemd timer and service with the purpose of running a handful of bash scripts. In particular I'm aimed at ...
David's user avatar
  • 1
0 votes
1 answer
69 views

Unit shutdown.service could not be found

I'm trying to set up in a Redhat server, 2 services that start a database at startup, and stop it at shutdown, so I have put 2 files under /etc/systemd/system as follows: shutdown.service: [Unit] ...
Souad's user avatar
  • 246
0 votes
1 answer
137 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
388 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
66 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
2 votes
2 answers
677 views

systemd file not pickuping environment values

Systemd file for filebeat doesn't pickup env variables and throw as below ExecStart=/usr/share/filebeat/bin/filebeat -environment systemd $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS (code=exited, ...
Sudharsan Punniyakotti's user avatar
1 vote
1 answer
315 views

systemctl list-units for type target not behaving as expected

Summary: 'systemctl list-units --type=target --all' does not always list targets that I've added Detail: I have a project that consists of several related daemons; let's call this project 'Foo.' The ...
Kevin Powell's user avatar
0 votes
1 answer
175 views

Can't connect to mysql after managing systemctl (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock')

I needed to run a program (just a compiled c++ program, not script, i.e., like /var/programname) on startup on CentOS 7. I followed this guide https://www.howtogeek.com/687970/how-to-run-a-linux-...
Stdugnd4ikbd's user avatar
0 votes
1 answer
533 views

Nginx sometimes crash

Sometimes nginx randomly crashes (once every few months) Here's the log I got when I ran systemctl status nginx nginx.service - A high performance web server and a reverse proxy server Loaded:...
Nicolas B.'s user avatar
0 votes
0 answers
1k views

failed to create bus connection: no such file or directory

Virtualbox with ubuntu 22.04 [root@container www]# systemctl start NetworkManager Failed to get D-Bus connection: No such file or directory Virtualbox with ubuntu 20.04 docker run --privileged -d -...
Rajsekar Reddy's user avatar
2 votes
1 answer
2k views

How to give partial user access to systemctl without sudo/su/root

I'm a bit new to this, so I'm not sure where to look. I have access to a server that as a command that executes a limited version of systemctl, and I want to expand it. The command acts as follows: It ...
Gabriel Grinspan's user avatar
2 votes
1 answer
2k views

Cannot kill redis server. It restarts every time I kill it

I cannot kill redis-server no matter how many times I've tried. ps -ef | grep redis-server gives root 10592 1 0 01:10 ? 00:00:00 /snap/redis/658/usr/bin/redis-server *:6379 root ...
Shaundavin13's user avatar
0 votes
1 answer
344 views

What is the easiest way to shut down Kubeadm on Ubuntu?

I have just installed kubeadm, kubelet, kubectl, docker, docker-ce on Ubuntu 22.04 and they all are working fine. I am wondering how I shut them all down without making them corrupted? Also how can I ...
best_of_man's user avatar
19 votes
10 answers
39k 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 '...
best_of_man's user avatar
0 votes
0 answers
1k views

kube-apiserver.service failing after complete reinstall of kubernetes and kubectl plugins

I'm having an issue where kube-apiserver.service will always fail on my local Fedora 36. Getting the namespaces from a context I was experiencing certificate issues that prevented me from succeeding. ...
WildWilyWilly's user avatar
1 vote
0 answers
136 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
0 votes
0 answers
1k views

Jboss as a service failing on OS Reboot RHEL8

0 I am facing some issues while running Jboss as a service on RHEL8 servers. The setup of service is done in a standard way as per the RHEL guidelines https://access.redhat.com/documentation/en-us/...
Amiy's user avatar
  • 1
1 vote
0 answers
225 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
138 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
0 votes
0 answers
3k views

rsyslog: action suspended, next retry is

I'm trying to configure rsyslog to receive logs sent from other devices on port 3100 (my manager chose that port and I will get him to change it to 514 later), and save (append) those logs in local ...
Michael NGV's user avatar
0 votes
0 answers
416 views

Redirect systemd service logs to /dev/kmsg for all running services

Currently systemd service files will redirect the logs to journal buffer by default. But I need to get all the userspace services logs as part of /dev/kmsg buffer. I was able to add StandardOutput=...
Rckzz's user avatar
  • 1
0 votes
1 answer
267 views

Dynamic NVM node path for service unit file

I recently migrated from using node installed on my Ubuntu server to using NVM to manage my node, but the issue is the application I use on this server uses a .service file that executes with the path ...
cphill's user avatar
  • 197
0 votes
0 answers
2k views

How to I setup default php-fpm service if I have two versions of php

I am having two versions of PHP on an ubuntu server that is 8.1 and 7.4 I installed both PHP-fpm extensions and I have this in /var/run/php php7.4-fpm.pid php7.4-fpm.sock php8.1-fpm.pid php8.1-fpm....
novapack's user avatar
  • 101
1 vote
1 answer
652 views

Restart rspamd.service as non-root user

I have webpage with button, when user clicks on button, script restart.sh on server is executed. This script contains: #!/bin/bash systemctl restart rspamd.service After clicking on the button, ...
MTC11's user avatar
  • 11
0 votes
1 answer
477 views

How to avoid ExecStop status in systemctl status

systemctl status command shows the ExecStop Failure message. Even though my service is up and running. testDB.service - the testDB service Loaded: loaded (/usr/lib/systemd/system/testDB.service; ...
user1631072's user avatar
1 vote
1 answer
5k views

How to list systemd unit files with descriptions

The command systemctl list-units only displays instances of units, such that are currently loaded into the memory. The command systemctl list-unit-files on the other hand lists all unit ...
reign's user avatar
  • 125
0 votes
1 answer
863 views

Ansible - No such file error when activating systemctl Podman user socket

I am running an Ansible playbook on a fresh Oracle Linux 8 system. It includes a step where it asks systemctl to activate a user Podman socket like so: - name: Enable podman socket vars: userid:...
hpy's user avatar
  • 855
0 votes
0 answers
194 views

RHEL 7 systemctl: Combine multiple services into one. start the service independently

I have followed the steps from RedHat to start the multiple services into one service. https://access.redhat.com/solutions/3097871 /etc/systemd/system/myapps.target [Unit] Description=App Service Unit ...
user1631072's user avatar
0 votes
1 answer
74 views

Possible attack on my vserver - outgoing tcp/ip connection

I have a suspicious situation on my vServer (Centos 7). An unknown bash script is consuming all the memory from the server. There is a noticeable connection to the "outside". Unfortunately ...
ChaosSpeeder's user avatar
0 votes
1 answer
1k views

Starting a Systemctl Service - Setting up uWSGI

I'm trying to set up uWSGI on Ubuntu 20.04, I'm trying to create a systemctld unit file but I'm struggling to start the service. The commands: sudo systemctl start myproject sudo systemctl status ...
DumbMathBoy's user avatar
0 votes
2 answers
2k views

systemd ExecStartPost is executed too fast

We have a unit file which: uses ExecStartPre which generates a config file ExecStart uses the config file to start a service ExecStartPost which deletes the file created by ExecStartPre. (the file has ...
danidar's user avatar
  • 53
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
2 3 4 5