Questions tagged [systemctl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
2k 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 ...
0
votes
0answers
17 views

How to restart / sleep my computer from command line using Emacs and systemctl?

Normally to restart my machine I open a terminal and type sudo systemctl suspend and it works. When I try to do the same thing from a graphical Emacs application, I get: Failed to set wall message, ...
0
votes
0answers
23 views

why systemctl failed state after many restart of service + rhel services

In some cases, when performing numerous systemctl restart commands, services will enter the failed state. Is it possible in systemctl's configuration to configure the service in a way that service ...
0
votes
0answers
15 views

Systemd Not Running Via Cron

I have this cron.hourly script: #!/bin/sh echo "test" >> /root/test systemctl --global restart dnscrypt-proxy While the echo command runs perfectly, the systemctl ones not running at all. The ...
0
votes
0answers
29 views

Can't start ZNC bouncer “Opening config …, No such file” on ubuntu 18.04

I compiled a bouncer from source and installed via apt on Ubuntu 18.04. I also created a config for it and launched it through systemctl start & systemctl enable. But with root rights, i checked ...
1
vote
1answer
43 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
1answer
229 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. ...
2
votes
2answers
985 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 ...
1
vote
0answers
8k views

System has not been booted with systemd as init system (PID 1). Can't operate (Ubuntu app on Windows 10)

My environment is Windows 10, ubuntu app (fresh install and update in last 24hrs) python3.6.9 Working through the tutorial/demo below. Cannot start my service. I have previously been able to start ...
1
vote
0answers
230 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 ...
1
vote
1answer
32 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 ...
0
votes
1answer
113 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/...
0
votes
1answer
814 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-...
0
votes
0answers
24 views

Killing a daemon with systemctl commands doesn’t show the service as stopped

I am trying to kill a daemon process that is multithreaded. After hitting the command: systemctl kill daemon.service Again when I am trying to get the status of that service it is getting stuck but ...
1
vote
2answers
672 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 ...
0
votes
0answers
21 views

I stopped the process minidlna. Why is it still showing up on my dlna client?

I did sudo systemctl stop minidlna on my Raspberry Pi with Raspian Buster and sudo systemctl status minidlna shows it stopped: ● minidlna.service - LSB: minidlna server Loaded: loaded (/etc/init.d/...
1
vote
1answer
155 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 ...
0
votes
0answers
55 views

How to keep a oneshot service running

I've a service A of type oneshot, which triggers another service B of type forking. Service A BindsTo service B and Service A runs before Service B. When I start the service A, the status of service ...
0
votes
1answer
23 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 "...
0
votes
1answer
640 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
336 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 ...
0
votes
1answer
3k 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] ...
0
votes
1answer
14 views

systemctl and where programs are installed

I am on an amazon linux instance that is based afaict on centos : e.g. I have used sudo yum install -y mysql and sudo yum install -y postgresql While these did install without errors I do not ...
2
votes
0answers
28 views

auto mount by service + service not mount the folder automatically

we create the following service on redhat version 7.2 more nfsshare.mount [Unit] Description=nfs mount script Requires=network-online.target After=network-online.service [Mount] What=...
1
vote
0answers
248 views

Why does systemctl show high memory usage when top and htop show much less?

I'm running an apache2.4 web server, and noticed that when I run systemctl status apache2 or run service apache2 status, it says it is using 4.2GiB of RAM, which isn't a problem for the amount of RAM ...
0
votes
0answers
383 views

On Linux Solus Budgie, hibernate shuts down instead of hibernating

I have 16GB RAM laptop equipped with an SSD drive with three partitions: a 20GB linux swap partition a bootable standard linux partition (hosting in my case Solus Budgie 4.0) a bootable standard ...
0
votes
1answer
432 views

What are the service running for mssql server on linux, and how to check if they are running

On microsoft's site I can see the mssql-server on linux has following components Mssql server (database engine) SSIS (integration services) full text service High Availability I can only see if ...
1
vote
1answer
126 views

systemctl service doesn't start

I have made a service for my RaspBerryPi project. When I start it nothing happens. systemctl status sb.service returns this: Failed to start RPI-sound board. Unit entered failed state. Failed with ...
1
vote
1answer
112 views

Translating sysV init script to systemd

I have init script which works fine. On a good day It will do all the following; /etc/init.d/my-good-script.sh {start|stop|status|info|check|config|timetravel} Now since systemd is the new norm, I ...
0
votes
1answer
99 views

Verify autofs is not enabled in Slackware 14.2 - Disabling Automount

I want to disable automounting in Slackware. With this goal I want to verify if autofs is enabled. Below are the commands that I saw which is applicable in other Linux Distributions : chkconfig --...
0
votes
1answer
124 views

systemctl input method setting

I want to input Korean language on Ubuntu 18.04, electron application. When the electron application is started on terminal by using yarn start, Korean language input works well via ibus. But, when ...
5
votes
1answer
4k views

setting environment variables from command line inside unit files

I am trying to set a date inside the unit file for logging my unit file look like this: [Unit] Description=Jetty service After=multiuser.target [Service] Environment=MAIN_CLASS="com.candorgrc....
0
votes
1answer
854 views

Can't start Minecraft server in tmux with systemctl

I'm trying to automate my Minecraft server because having to manually wrangle tmux sessions gets really old after a while. Here's the systemd service file I wrote to help me with that: [Unit] ...
0
votes
1answer
55 views

CentOS won't boot when disk is removed

In my system I have a boot drive (xfs) and a RAID (ext4). The RAID is /dev/sda so I have added that in fstab to auto-mount at startup. /dev/sda /mnt/RAID ext4 defaults 0 0 Today ...
0
votes
1answer
396 views

systemctl set-property user-1009.slice CPUQuota=50% Failed to set unit properties on user-1009.slice: Unit user-1009.slice is not loaded

I'm trying to set per-user limits on processes, most of them are run with sudo --user. Why do user-1001 and user-1008 on my system have the slice files, but I can't get it on 1009? # systemctl set-...
0
votes
0answers
706 views

SLES 12 Service start and stop order doesnt work

my system runs on suse enterprise 12 sp2. I have two services sapinit and sapcontrol. At startup the service sapinit has to be started before the sapcontrol service can start and at shutdown or stop ...
0
votes
0answers
27 views

Create another instance of a service that won't be closed with systemctl stop

I want to create another instance of sshd on another port which won't be closed with systemctl stop, but I don't know how to go about doing it. I don't know much about Linux, so I have only tried ...
1
vote
3answers
17k views

systemctl Failed to start service, Invalid argument

I need to run a Qt application on startup with root permission , below is the script I created using systemctl named QtApp.service [Unit] Description=QtApp [Service] ExecStart= exec su -l user -c '...
11
votes
1answer
62k views

“sudo: systemctl: command not found” when run on CentOS 6.6

I am using CentOS 6.6. When I try running the command sudo systemctl start elasticsearch I get an error like this: sudo: systemctl: command not found As per my understanding systemctl is not ...
0
votes
1answer
681 views

How to track all child processes spawned by a systemctl service

I have a system service [Unit] Description=dynsock server After=network.target [Service] EnvironmentFile=/etc/dynsock.env ExecStart=/usr/local/bin/dynctl.sh $SERVER $COUNT $BASEPORT $AUTH ExecStop=/...
0
votes
2answers
691 views

launch systemd service within OCI container (runc)

Currently, I am trying to launch systemd service (avahi-daemon) within RUNC container and all of my attempts were failed. I faced several articles for the same task but for the docker solution and one ...
0
votes
0answers
40 views

OpenVPN config file not started automatically, works when running manually

On my Ubuntu 16.04 server, I have three different openvpn conf files in /etc/openvpn: server_tcp.conf, server_udp.conf and server_ptp.conf. All work when starting manually, e.g.: sudo openvpn ...
0
votes
1answer
151 views

How to configure systemd services to start/stop processes with predefined order and timeouts between their starts?

I use systemd to start/stop 4 services in sequential order by using Requires/After/Before/BindsTo fields. systemctl start service01 initiat such start order: service01 -> service02 -> service03 -> ...
0
votes
1answer
1k views

systemd: launch user (with no password) specific service that keepalive after logout

I am trying to run a user specific service with systemd. I am not an admin by profession but more a developer. I am currently testing my solution on an Ubuntu 16.04 but plan to deploy the solution on ...
0
votes
1answer
4k views

cannot re-enable sshd after systemd mask

After disabling sshd, I'm having issues re-enabling/starting it via systemctl. I'm sure I've hosed something, but this is what I did: ~fresh xubuntu 16.04.2 install apt install openssh-server ...
0
votes
1answer
187 views

Point systemctl to use variables from a file

I'm using systemctl to launch and keep my app alive. Below is my .service file. Notice the Environment='METEOR_SETTINGS={"privateKey": "ohnoyouseemyprivatekey!"}'. This is where I will be storing ...
5
votes
2answers
18k views

InfluxDB failed to start as a service

I'm trying to configure InfluxDB for Automatic start-up on a RHEL7 machine. if I do: sudo systemctl start influxdb the service fails [dadmin@localhost dashboard]$ sudo systemctl start influxdb [...
1
vote
0answers
6k views

Can't start services, probably policykit error

I can't restart services as root on CentOS. Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any ...
10
votes
1answer
8k views

A start job is running for sys-subsystem-net-devices

So a while back I was unable to get my wifi to automatically connect in Arch Linux, I looked up some videos and found one that made me do the command sudo systemctl enable with something like netctl-...