Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [systemd]

systemd is a modern replacement for the traditional Linux init. Its main features include the ability to express dependencies between services and aggressive parallelization of service startup.

1
vote
1answer
31 views

Can you send console commands to a node-based systemd service?

I have a simple node.js script that accepts console commands using readline. I've set it up to run as a systemd service (on Debian 9): [Unit] Description=Web Game Server [Service] ExecStart=/usr/bin/...
1
vote
0answers
7 views

What could cause a systemd service stop to end with job being canceled?

Occasionally when stopping a systemd service with systemctl stop test-server it will fail mentioning that the job was canceled: Unable to stop service test-server: Job for test-server.service ...
-2
votes
1answer
25 views

Killing systemd service with and without systemctl

What is the difference between killing an running daemon systemd service like this : kill -SIGKILL 3645 and systemctl -s kill -SIGKILL 3645 where 3645 is the pid of the systemd service.Also are ...
0
votes
1answer
10 views

`journalctl -f -m` does not interleave remote and local

I currently have a 2-server setup (3 servers in total, one still to be configured for this) with one server using systemd-journal-remote (.socket & .service) to collect all log entries from the ...
0
votes
2answers
39 views

centOs : system time getting reset back to UTC after changing it using timedatectl

I have a Centos machine with version 7. I am trying to change the system time using the timedatectl command. The time gets changed but after a few seconds it gets reset back to it's original time. [...
0
votes
0answers
19 views

Systemd docker mongo error: cgroup is empty

Trying to run mongodb in docker using systemd mongod.servivce file for systemd: [Unit] Description=mongodb in docker After=network.target docker.service Requires=docker.service [Service] User=root ...
0
votes
0answers
10 views

systemd running process via scl, my process does not recieve SIGTERM

I have a systemd service called sitesdb-job-runner.service with the following config: [Unit] Description=SitesDB Background Job Runner After=network.target mariadb.service [Service] Type=simple ...
0
votes
1answer
31 views

unable to update systemd from 232-25+deb9u2 to 232-25+deb9u4 on raspbian device

My real goal is to run systemd-journal-remote so I can send logs from this device to the remote journal sink. apt-get update/upgrade show no packages needing upgrades $ sudo apt-get install systemd-...
0
votes
1answer
17 views

Using cgroups to limit CPU and I/O by process name under CentOS7 / systemd

I am currently using cgroups (via /sbin/cgrulesengd) on CentOS 6 to limit CPU usage for processes with process names zip, unzip and gpg. I'm achieving this via this in /etc/cgconfig.conf to define ...
1
vote
0answers
53 views

How to monitor systemd service with snmp?

So I have a Gunicorn service on my Ubuntu server. First I added proc gunicorn to this file: /etc/snmp/snmpd.conf. But I'm not sure how to get the right values. I've seen this question (How to ...
0
votes
1answer
37 views

systemd script segfaulting when using systemctl

I have a startup script, that generates a segfaul when run under systemctl. I can't tell where, as journal and status just tell me it's exiting. dmesg tells me it generated a segfaults I can run this ...
0
votes
1answer
8 views

PHP 7 FPM checkconf is throwing invalid user: ‘www-data:www-data’, but I'm not using a www-data user

I'm using a different user for my web services. Screw convention. I don't have www-data set in any php config files: $ grep -rnw /etc -e 'www-data' $ But I'm still getting this error: $ ...
-1
votes
0answers
21 views

loginctl enable-linger $USER does nothing

I can't see any change in /etc/ or /var/ if I execute this command: loginctl enable-linger foo-user This is the linux version: suse-server:~ # cat /etc/os-release NAME="SLES" VERSION="12-SP3" ...
0
votes
2answers
40 views

Improvments for this scipt to restart each running systemd service?

I have Centos 7+ systems, and they all use systemd. Sometimes the best way to proceed after an important system change is to restart each currently running service. If I restart each service one-at-a-...
0
votes
0answers
27 views

split-horizon with systemd-resolved

I am on an Ubuntu box that uses systemd-resolved to resolve host names. I would like to configure it, systemd-resolved, to use a DNS server, different than the main ones, just for some particular ...
2
votes
0answers
38 views

Should I use systemd or docker-compose to keep Docker containers running on my systems?

We are talking about Docker containers as sysdig, consul, fluentd, mesos-slave, etc. that we are running on almost all machines. Currently we are using Ubuntu's Upstart and CoreOS's Fleetctl. We're ...
-1
votes
1answer
27 views

How to create failure log file owned by syslog while running systemd service?

I am running Go binary as a service on ubuntu 16.04,and not able to create log file which is owned by syslog. I have created a services for myapp.service and it looks like as follows: [Unit] ...
0
votes
2answers
29 views

Cron hourly after boot time

Is there anyway to execute cron hourly after boot time and not at a specific time every hour? I am working with CentOS6 and CentOS 7 machines. E.G.: When my computer boots at 00:42 I want it to be ...
0
votes
0answers
32 views

Issue in systemd service activation for uwsgi, flask in raspbian

I am creating a systemd service for uwsgi using a non root user and virtualenv in raspbian. In this process I am facing some issues - labapp.service file - [Unit] Description=uWSGI ...
1
vote
0answers
47 views

systemd service ignoring ExecStop on shutdown but works when run by hand

G'day, trying to get an expect script that runs a telnet session to run on shutdown of a VM running in vmware player in a VNC session. It runs just fine when I run systemctl stop by hand, but when I ...
0
votes
1answer
160 views

How to bypass systemd “start request repeated too quickly”

I'm playing around with CHEF in a CentOS7 VM, and the script failed due to the issue: systemd[1]: start request repeated too quickly for fail2ban.service I know this is configurable in systemd, but ...
0
votes
1answer
104 views

apache2.service: Failed to run 'start' task: No such file or directory

I can't restart my apache server on debian 9. I tried reinstall : sudo apt-get autoremove --purge apache2 && sudo apt-get install apache2 but no change... Job for apache2.service failed ...
2
votes
1answer
30 views

Systemd service file for assp

I'm running ASSP on CentOS 7 which uses systemd. The only pre-made service file I could find (howtoforge.com) uses oneshot type which I'm not sure is right. More importantly, the stop command seems ...
1
vote
1answer
163 views

systemd not shutting down MariaDB properly?

We are running a LAMP stack on CentOS 7. We have SCL enabled but only PHP and Apache are using it. We were not able to get MariaDB to successfully cutover on a test machine so we never attempted a ...
16
votes
1answer
506 views

Configure buggy systemd service to terminate via SIGKILL

Background I've been asked to create a systemd script for a new service, foo_daemon, that sometimes gets into a "bad state", and won't die via SIGTERM (likely due to custom signal handler). This is ...
1
vote
0answers
29 views

system freeze after systemd-tmpfiles-clean executed

recently i got a problem, i run mysql on docker with k8s , the system load getting high in 2 days from 1->500+, the /var/log/messages infomation: Aug 17 19:50:07 SVR5798HW1288 dockerd[1890]: time="...
0
votes
1answer
51 views

Linux systemd: remove slice

Out of curiosity, is there any way to remove a systemd slice that you've created? I'm running on Fedora 28 with systemd-238-9 and kernel 4.17.12-200.fc28.x86_64 . I performed: systemd-run --unit=...
0
votes
1answer
76 views

fsck on boot leads to systemd dependency failure and subsequent boot failure

If a fsck takes longer than 90 seconds during boot, the systemd unit times out and the system falls into emergency mode. This is obviously very unfortunate with headless devices without KVM, as the ...
4
votes
1answer
144 views
+50

iptables-restore sometimes fails on reboot

Today and yesterday, my server automatically rebooted and failed to bring up the network device during boot. If I reboot the machine again, then it starts up fine, I've also not encountered any issues ...
0
votes
0answers
107 views

Daemon service made with systemd that runs a PHP script is stopped but keep running

I made a daemon with PHP based on this answer I stopped it but I'm logging it and I can see is still running. I found this behavior in a searh of a bug, because I can see some updates to the DB that ...
0
votes
1answer
71 views

mariadb service script doesn't create /var/run/mysqld

I have issues starting a MariaDB service on a Centos 7 server, because the directory /var/run/mysqld/ is not created by default, as well as the /var/log/mysqld.log file. Creating this directory and ...
1
vote
0answers
31 views

Why is systemd's default target is graphical on AWS stock image

I noticed that on stock AWS Debian image (both Stretch and Jessie), the default target as reported by systemctl get-default is graphical.target. AFAIK, systemd's graphical.target is equivalent to ...
0
votes
1answer
14 views

upgrading systemd from backpor 215-230 [closed]

Hi i have been tasked with little resarch so apart of testing via VM i also ask: I need to upgrade systemd 215 to 230 on live server on which services are running, its per say streaming server. One of ...
0
votes
1answer
69 views

systemd-networkd fails to run DHCPServer on trunk port with multiple VLAN interfaces

I'm trying to configure a Linux host running systemd-networkd on a switch trunk port. The host has a single interface, enp4s0. There are only a couple VLAN ports in the switch, others are untagged. I ...
0
votes
2answers
51 views

Can I alter the After= of an active systemd unit?

I have an NFS filesystem that contains ext4 filesystem images. A Linux box mounts one of those, via an implicit /dev/loop<n>. But when systemd reboots, it apparently shuts down NFS before ...
0
votes
0answers
15 views

How do I start an ssh server on a remote machine even if some (other) service failed to start during boot?

I have a personal server running Ubuntu in a location where I don't have physical access for long periods of time. I start the server on demand via a magic WOL packet from another computer on the ...
2
votes
3answers
93 views

Systemd: Tell if script was run by systemd or by user

How can I tell if a script was called from systemd or from a user? I created a service for an old school daemon. We just switched to systemd and some of my admin like to call the rc-script directly. ...
0
votes
0answers
36 views

systemd[1]: Failed to reset devices.list on /system.slice: Invalid argument

I get this strange failed-message every night after systemd stops and starts certain services: Aug 13 03:36:04 systemd[1]: Stopping Zabbix Agent... Aug 13 03:36:04 systemd[1]: Starting Zabbix Agent......
0
votes
1answer
52 views

Do I need a dovecot.socket?

My email server with dovecot works fine. I turned off IPv6 and encountered the following error in syslog: systemd[1]: [/lib/systemd/system/dovecot.socket:8] \ Failed to parse address value, ...
1
vote
1answer
30 views

One Dbus message triggers multiple systemd services

How can I trigger multiple systemd services when a dbus signal is lauched. I'm trying to do so for org.freedesktop.hostname1 by creating a service like: [Unit] Description=Set host name [Service] ...
0
votes
1answer
23 views

Starting Redis in systemd with Auth

Does anyone know how to pass the auth to redis "when it is started in systemd." You have to use a custom init script here. Mine is the following: [Unit] Description = Redis In-Memory Store After = ...
0
votes
1answer
55 views

Get systemd actual state

How can we know if systemd has finished to boot the system ? I don't want to execute on cron job if the system is actually on boot process because of missing network connectivity. My script launched ...
0
votes
1answer
56 views

How to set umask for Apache on Amazon Linux 2 AMI

I want to set umask 0002 for Apache httpd so that certain files that it creates will be writable by other users. The traditional solutions don't seem to work on Amazon Linux 2 AMI.
0
votes
1answer
83 views

systemd trying to start MariaDB twice (mariadb@multi-user.service vs mariadb.service)

systemd on my system seems to be trying to start MariaDB twice. This first try succeeds, so my system has no real problems, but the second try creates spurious error messages since all the relevant ...
2
votes
1answer
244 views

OpenVPN on Debian is rejecting connections and systemd just runs /bin/true?

I'm extremely confused by this, and it seems completely wrong but I have no idea how so I'll start from the beginning. I configured openvpn on my Debian server using this guide. After I copied the ...
0
votes
1answer
41 views

How to restart ntopng systemd?

There used to be a file in the /etc/init.d/ folder to restart ntopng. The command that I used to use is: sudo /etc/init.d/ntopng restart But now with Ubuntu 18.04, that file is gone. How do ...
0
votes
0answers
41 views

Staggered services with StopWhenUnneeded

I am using a combination of WantedBy and StopWhenUnneeded to control a number of services via a target. I've drawn up a parallel example using iperf: iperf-copy01.service [Unit] Description=iPerf3 ...
0
votes
0answers
20 views

managing a process with supervisord instead of sytemctl

I have a VPN service that I would like to manage through supervisord. When the VPN service installs itself, it makes an entry in /etc/systemd/system/pgateway.service. Contents below: [Unit] ...
0
votes
1answer
28 views

reverse ssh using systemd-cron is not connecting [closed]

I have a script that checks my home rpi2 for a file using ssh, pk auth, if the file exists it deletes it (again ssh pk auth) and opens a reverse ssh with: ssh -fN -R xxxx:localhost:22 user@...
1
vote
1answer
107 views

What's the difference between poweroff.target, halt.target, reboot.target, shutdown.target and a bunch of others?

Systemd defines a bunch of special targets that all relate to shutting down a system, like the ones listed in the title of this post. There seem to be more. man systemd.special gives definitions for ...