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
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
4 answers
2k views

How can I cause systemd to wait starting a unit until a certain condition is fullfilled

I'm still struggling to understand boot sequence dependency configuration in systemd unit files. I've read the manual (systemd.unit). I tried to add dependencies using the After= and Requires= lines ...
pefu's user avatar
  • 689
0 votes
1 answer
3k views

After= option not working in systemd service file

I have two shell scripts name first.sh and second.sh. The contents of first.sh and second.sh are given below: >>first.sh #!/bin/bash while true do echo The current time ...
Ajay Banstola's user avatar
1 vote
1 answer
805 views

amazon-cloudwatch-agent shuts down on every application reload

I have a Tomcat app on Elastic Beanstalk, and I want to send logs to Cloudwatch Logs. To that end, I set up log4j to write to file, and in .ebextension, amazon-cloudwatch-agent is installed and run. ...
f.khantsis's user avatar
0 votes
2 answers
1k views

systemd service reports "unknown port"

On a CentOS 7 server,I'm creating a new systemd service from scratch for a new service, prometheus-slurm-exporter. (It's an application that exports data from the SLURM scheduler on an HPC cluster.) ...
Dave_G's user avatar
  • 1
0 votes
1 answer
2k views

Cannot kill - nginx: master process nginx -g daemon off

I am setting up both Nginx and OpenRusty on my Ubuntu , one thing confuses me is , even after I quit OpenRusty and stop Nginx , I can still observe a nginx running , seems like this process cannot ...
Jia's user avatar
  • 101
0 votes
0 answers
4k views

Display service output on console using systemctl

I have following service file - [Unit] Description=Open VPN Agent After=syslog.target After=network.target [Service] Type=forking TTYPath=/dev/pts/0 KillMode=process PIDFile=/opt/openVPN/pids/...
user784524'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
  • 965
2 votes
0 answers
288 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
0 votes
1 answer
3k views

How do you kill all instances of a systemd service?

I want to kill all instances of a systemd service. This works fine: sudo systemctl stop 'custom-service@*' but it is slow since it runs my custom ExecStop which does extra work to safely shut down the ...
zzbomb's user avatar
  • 103
0 votes
1 answer
664 views

Cannot stop screen started with systemctl start [closed]

On ubuntu server 20.04 I created a service definition for a Minecraft server within a screen session like that [Unit] Description=Minecraft Server After=network.target [Service] User=minecraft Nice=...
Jan's user avatar
  • 111
1 vote
1 answer
2k views

How to use SIGHUP for reloading services?

I've installed Hachicorp Vault and did setup the TLS configuration. My goal now is to have the vault.service to do an automatic reload if the TLS certificates were renewed. The official documentation ...
Kingindanord's user avatar
1 vote
1 answer
686 views

Allow a user to restart a service

I am trying to restart a service without being root. Here is the code snippet where the command being used template { source = "{{vault_template_dir}}/agent.crt.tpl" destination = &...
Kingindanord's user avatar
1 vote
0 answers
392 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
0 votes
1 answer
3k views

simple systemd service and socket failing

I had a service I was trying to run this way but it was slightly a large python program. I took a step back and built a dead simple python program to see if I can get it to run. It fails when I try ...
Codejoy's user avatar
  • 149
1 vote
0 answers
351 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
3 votes
1 answer
19k views

systemd failing enable with "service is transient or generated". What's wrong with this configuration?

In General I've been scouring the web looking for actually helpful documentation about systemd and this error, but the majority of it has been troubleshooting niche cases or goes into such extreme ...
noket's user avatar
  • 31
0 votes
1 answer
35 views

Redhat 7.3 Sybase 16 (edge) issue with systemctl auto startup process

After installing Sybase 16 (Edge) and successfully upgrading a 15.7 instance to Edge, and then trying to add the sybase service with systemctl so that sybase starts up automatically when the Redhat 7 ...
Will Landstrom's user avatar
0 votes
0 answers
4k views

Can't restart MySQL, Start request repeated too quickly

I can't restart my MySQL server with systemctl or any other ways. On journalectl it says mysql.service: Start request repeated too quickly. mysql.service: Failed with result 'exit-code' Here the ...
Aren Hovsepyan's user avatar
0 votes
2 answers
886 views

How can I debug firewalld on CentOS 7 stopping running unexpectedly?

I have a brand new CentOS 7 server and am just performing the initial setup. I have started firewalld with sudo systemctl enable firewalld sudo systemctl start firewalld both commands appeared to run ...
Ambulare's user avatar
  • 141
1 vote
1 answer
2k views

systemctl and journalctl can't find charon-system.service

If I run with grep, service is present in output [root@maincore ~]# systemctl status --all | grep charon │ │ └─135060 grep --color=auto charon │ └─127087 /usr/sbin/charon-systemd ...
Hugo Stiglits's user avatar
7 votes
2 answers
10k views

clamav-daemon start condition failed, /var/lib/clamav/daily.{c[vl]d,inc} was not met

After installing Modoboa(Open Source Mail Hosting), I Tried to start clamav-daemon, but i faced start condition failed. systemctl status clamav-daemon.service clamav-daemon.service - Clam ...
Omid Estaji's user avatar
0 votes
0 answers
3k views

Docker systemctl Failed to get D-Bus connection bug

When I execute any systemctl command inside a CentOS 7 container I get the Failed to get D-Bus connection: Operation not permitted error message. The container is started with docker container run --...
Philipp's user avatar
  • 123
2 votes
1 answer
3k views

How to Set Up Time Synchronization with NTP on Ubuntu 20.04.1 LTS

After updating the base system with the latest available packages: apt-get update -y and root@localhost:~# timedatectl Local time: Wed 2021-01-06 08:03:11 UTC Universal time:...
Fèlix Boniquet Pelfort'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 votes
1 answer
967 views

Cannot get redis 5 to run with systemctl

Installed Redis 5 (have Redis 3 working on server) Modified various configurations in /etc/opt/rh/rh-redis5/redis.conf as necessary including setting supervised to "systemd" and setting ...
user avatar
1 vote
1 answer
827 views

How to install gmod server as system service on Ubuntu?

I have a GMod server on Ubuntu 18.04, and it runs fine when I run it via ./run_gmod.sh (as the "steam" user, who owns the folder/files), whose contents are #!/bin/sh /datadrive/srcds/gmod/...
ROODAY's user avatar
  • 215
0 votes
1 answer
616 views

Cron jobs stopped working

I have an issue almost identical to what is here: Cron jobs not working anymore However I can't seem to find any memory-related problems as per the accepted answer, so I thought I should open a new ...
Gábor Major's user avatar
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
0 votes
2 answers
1k views

gammu 1.42, gammu-smsd service error, LD_LIBRARY_PATH not found

I'm trying install Gammu 1.42 to serve my SMS gateway on Centos 8. make, make test, make install works fine. LD_LIBRARY_PATH configured in /etc/profile as: ...... LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/...
cidy.long's user avatar
  • 101
0 votes
1 answer
2k views

Enabling systemctl service does not load at boot

I have set up gunicorn to server two Django sites, as per this setup. This works well. If I run: # systemctl start gunicorn@my_website.service Then all is well and my website is being served as ...
user avatar
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
1 vote
1 answer
828 views

listing Systemd target unit's dependencies in a machine readable format

I have a complex systemd target unit with a number of dependency units. I would like to list and parse the status of these without falling back to a loop. the 'list-dependencies' sub-command only ...
THX's user avatar
  • 263
1 vote
1 answer
2k views

Cannot start services on CentOS 7

Suddenly, I cannot start services on my VPS(CentOS 7). For example, service httpd start Redirecting to /bin/systemctl start httpd.service Authorization not available. Check if polkit service is ...
William's user avatar
  • 109
0 votes
0 answers
404 views

Prevent to use systemctl poweroff and systemctl reboot for non-root users in CentOS

I have CentOS 7 server and there is one non-root level user named user1. That user1 only has the permissions to start, stop, enable and disable for Zabbix Services (allow these service in sudoers file)...
Mg Nyi Naing's user avatar
0 votes
1 answer
114 views

On Fexora Server 32, new cron jobs aren't showing up with systemctl list-timers --all

I've just brought a new server online and configured it the way the old one was regarding cron, but the jobs aren't running. So, I went through the configuration carefully and checked that the current ...
Richard T's user avatar
  • 1,242
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
0 votes
1 answer
663 views

Fedora28 - firewalld stopped working as it unable to communicate with ABRT daemon

We are currently running a Fedora 28 server. Due to the server being restarting multiple times, FirewallD has stopped working. Based on the error messages presented when we run the command systemctl ...
Ashish Prajapati's user avatar
0 votes
0 answers
759 views

Spring Boot and stop by systemctl not working

My application uses Spring Boot 2.3.1.RELEASE, it is an executable jar that uses an Embedded Tomcat and is listening on port 10605. I deployed on CentOS Linux release 7.6.1810 (Core). I took the ...
user3065205's user avatar
0 votes
1 answer
2k views

systemctl service + how to configure service for boot priority

we have rhel 7.2 machine server have the following service [root@server1 system]# more rc_build_infra.service [Unit] Description=infra Manager Server Requires=network.target remote-fs.target After=...
King David's user avatar
1 vote
1 answer
1k views

systemctl enable seems to succeed, but unit not intalled as a want per [Install] WantedBy

Pretty new to systemd, so likely (and hopefully) missing something trivial. Thanks in advance. I'm trying to enable a service (bees btrfs dedup; unit file below), but the enable/[Install] doesn't ...
some bits flipped's user avatar
1 vote
0 answers
177 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
0 votes
0 answers
399 views

Systemctl cannot run Script command on openvpn

It is weird that the /usr/lib/systemd/system/[email protected] is a simple task: [Unit] Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I After=network.target [Service] Type=...
George Y's user avatar
  • 560
0 votes
0 answers
153 views

Cannot access VM after running "systemctl isolate rescue.target"

I have a VM running on VMWare. OS is RHEL 7. I ran the following command and the ssh session also terminated. systemctl isolate rescue.target Now I cannot access the server. Even ping doesn't work. ...
Pradeep Sanjeewa's user avatar
16 votes
1 answer
16k views

mariadb.service start stuck at activating

I just installed the mariadb in my ubuntu 19.10 by sudo apt install mariadb-server mariadb-client after when I am trying to start the server by sudo systemctl start mariadb.service shell get freeze I ...
Sarthak Kumar'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
0 votes
1 answer
2k views

systemctl enable sidekiq: Failed to issue method call: Access denied

I am trying to implement Sidekiq using Systemd on Ubuntu 16. I am logged in as deployer. I navigated to the /lib/systemd/system directory and wanted there to create a file: nano sidekiq.service. ...
user984621's user avatar
1 vote
1 answer
863 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
0 votes
1 answer
93 views

Why is Docker services keep running without my consent

These docker services keep running without my consent, how to stop them: /usr/bin/docker-containerd-current /usr/bin/dockerd-current I don't want to uninstall Docker, just want to stop services to ...
Dan D.'s user avatar
  • 125
0 votes
0 answers
642 views

how changing openvpn default port on centos7

I am trying to change Openvpn default port from 1194 to 8080 I change port 1194 to port 8080 on server.conf at server and change the client config file like that remote 15.15.15.15 8080 then I ...
Ali Jafary's user avatar