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.

486 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
1 answer
3k views

Is it possible to do multiseat the systemd way with one graphic card / two heads?

I would like to setup a multi-seat configuration using Ubuntu Xenial 16.04. After some researches, it seems the way to do now is by systemd through "loginctl" calls. (saw here for example). Before ...
8 votes
0 answers
2k views

DHCP interface never transitions to configured state in systemd

I have a server running CoreOS, and my main network interface that gets configured via DHCP gains a carrier and is routable, but never leaves the configuring state. This causes systemd-networkd-wait-...
  • 205
7 votes
0 answers
6k views

cryptsetup cannot close mapped device

When I run: LANG=C cryptsetup --debug luksClose /dev/mapper/Pool-A it fails as follows: device-mapper: remove ioctl on Pool-A failed: Device or resource busy Device /dev/mapper/Pool-A is still ...
  • 652
6 votes
0 answers
587 views

How to make RabbitMQ start and stop faster

On Debian 10, service rabbitmq-server start takes 10 seconds; service rabbitmq-server stop takes 5 seconds. This is for a Docker development environment where load is extremely low and start/stop ...
6 votes
2 answers
27k views

Unable to restart a systemctl service remotely as a non root user

I have a systemd.socket named gunicorn.socket which I would like to restart after updating some code on a remote server. I've followed the steps detailed in Allowing a non-root user to restart a ...
  • 268
6 votes
1 answer
1k views

Systemd vs init.d Specify systemd dependencies in LSB headers

I have a systemd based system which contains one System V style init.d script with LSB headers. The init.d script must only be started after all filesystems in fstab are mounted. How can I specify ...
  • 536
5 votes
0 answers
1k views

Applying systemd control group resource limits automatically to specific user applications in a gnome-shell session

Having seen that GNOME now launches apps under systemd scopes I've been looking at a way to get systemd to apply some cgroup resource and memory limits to my browser. I want to apply a MemoryMax and ...
  • 10.8k
5 votes
0 answers
883 views

Implications of a service not conflicting with the shutdown.target

<TL;DR> I am tuning an NFSv4-only file server based on the current Debian 10 Buster and the kernel ntfsd; systemd v241. The nfs-kernel-server package's systemd scripting from the distribution ...
  • 285
5 votes
0 answers
3k views

journald memory usage on CentOS 7

I have an AWS EC2 instance running a CentOS 7.7.1908 (systemd 219) with a server application. The server logs quite a lot of information to the system logs (using syslog). I have recently enabled ...
  • 51
5 votes
1 answer
784 views

Debian Buster: How to start ZFS after open-iscsi in systemd

I have Debian 10 (Buster) installed and have added ZFS from Backports. I have 4 iSCSI-LUNs that I use as disks for ZFS. Each LUN holds a separate zpool. So far the ZFS setup works. But the system is ...
5 votes
0 answers
3k views

Ensure systemd wait for IPv6 before start service unit

When I have a service listening on a specific IPv6 address, it fails on boot, claiming that the address is still not available. This happens to every service that is listening on specific addresses. ...
4 votes
1 answer
4k views

systemd process stdout/stderr

When I run the service manually, it logs something when it starts. But I cannot find this log anywhere when it starts as systemd process. journalctl -u <service> only shows the records about the ...
  • 141
4 votes
0 answers
1k views

systemd-udevd spams systemd-udevd[1523120]: veth20996a5: Failed to get link config: No such device

I have setup my server logging with graylog and now I see that my logs are being spamed by level: 3 errors like these: systemd-udevd[1523120]: veth20996a5: Failed to get link config: No such device I ...
4 votes
1 answer
4k views

What controls the cleanup of the /tmp/systemd-private* directories?

It doesn't seem like the systemd-tmpfiles service cleans up these folders because I have files in /tmp/systemd-private-*-httpd.service-*/tmp/ that are 27ish days old (the last time httpd was restarted)...
  • 41
4 votes
0 answers
523 views

systemd-gpt-auto-generator doesn't mount EFI system partition

according to the documentation, the systemd-gpt-auto-generator should automatically find the EFI system partition and generate a mount unit to mount it on /efi. However this does not appear to work on ...
4 votes
0 answers
4k views

How exactly to use systemd private temporary directory feature?

Systemd has a nice feature that is private temporary directory (/tmp). But it is not clear from the dense manual what are the correct ways to use it and implementation gotchas (get the feeling the ...
  • 263
4 votes
1 answer
8k views

Adding a new DNS server with systemd-resolved

To access other machines on my network by their name, I have to add the following two lines to my /etc/resolv.conf: search foo.local nameserver 192.168.X.Y But any changes I make do not persist ...
  • 141
4 votes
0 answers
1k views

How to make systemd monitor processes started using a shell script in the service file?

I have written a service file in Linux that calls a script which starts multiple processes with one as primary and others as secondary. SERVICE FILE: [Unit] Description=TEST service Requires=abc....
  • 41
4 votes
0 answers
2k views

`systemctl disable --now postgresql` doesn't stop the daemon

I'm running Debian Stretch and PostgreSQL 10 from apt.postgresql.org. When I do: postgresql disable --now postgresql the database server doesn't stop. It says: Synchronizing state of postgresql....
  • 1,985
4 votes
0 answers
650 views

`systemctl show` outputs incorrect MemoryCurrent value

on one box, systemctl show get an incorrect value for unit memory usage: $ systemctl show crond | grep MemoryCurrent MemoryCurrent=18446744073709551615 18446744073709551615 == UINT64_MAX, this must ...
  • 143
4 votes
2 answers
3k views

systemd: setting dependencies between templated timer units?

I am using some templated timer units to run sets of templated services. There are backup jobs and associated maintenance tasks that require an exclusive lock on the backup repository and cannot run ...
  • 42.8k
4 votes
0 answers
179 views

Single partition mounted to multiple directories with different files

I have a systemd mount for a single partition which results in three different directories being mounted. The file /etc/systemd/system/var-lib-docker.mount [Unit] Description=Mount LSSD Volume at ...
4 votes
1 answer
13k views

x11vnc on Ubuntu 16.04 Gnome with systemd

I am having troubles to start x11vnc service on Ubuntu server 16.04 Gnome. It used to work just fine under 14.04. Not sure if related to x11vnc itself or the systemd. Here is the systemd service file ...
  • 1,316
4 votes
1 answer
4k views

Systemd service: Failed to issue method call: Unit service failed

I am trying to make a custom service in my VPS. However, it doesn't let me to run it. It says the following. I am not sure what is going on but when I run it on my Ubuntu laptop, it works properly. ...
4 votes
0 answers
1k views

How to view cgroups resource control heritage between parents and childs process

Taking for example this hierarchy from systemd-cgls: └─user.slice ├─user-1000.slice │ ├─user@1000.service │ │ └─init.scope │ │ ├─3262 /lib/systemd/systemd --user │ │ └─3263 (sd-pam) ...
  • 714
4 votes
3 answers
3k views

Need help converting init.d service scripts to systemd (CentOS)

I have spent several days on an issue that's incredibly frustrating and I'm straight out of options. I am currently using a CentOS 6.8 server at work for our website. CentOS 6 (Enterprise Linux 6 or ...
4 votes
0 answers
1k views

systemd unit template for instances running from separate directories

I am trying to create a new systemd unit template file that will be used to start several instances of a server program, each running out of a different directory. i.e. I need the ExecStart parameter ...
  • 141
4 votes
0 answers
469 views

How do I go about creating a systemd selinux policy domain?

How can I create an selinux policy to govern my systemd unit? I am creating a daemon that will be managed by systemd and I'd like to create an appropriate selinux policy to go with it. I've tried ...
  • 311
4 votes
0 answers
509 views

journalctl prints the entire system log when following

[root@utility ~]# uname -rv 2.6.32-042stab093.5 #1 SMP Wed Sep 10 17:39:49 MSK 2014 [root@utility ~]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) [root@utility ~]# journalctl --...
  • 151
4 votes
1 answer
1k views

ZFS on LUKS not recognized at boot

I've got 6 physical drives in RAID-Z2, which I intend to one-by-one convert to dm-crypt devices. My process was roughly: dd if=/dev/zero of=/dev/sdf Create keyfile /etc/crypttab.d/crypt-1.key ...
4 votes
1 answer
2k views

CentOS7 systemctl calling ExecStop on reboot after my procceses are already killed

I have a systemd script which is as follows: [Unit] Description=My sites Before=shutdown.target reboot.target halt.target [Service] Type=oneshot ExecStart=/bin/bash -c '/etc/xxx/mySites start' ...
3 votes
0 answers
346 views

How can I ask journalctl to show records for all units except one?

journalctl -u ssh prints all records associated with the ssh unit. But how can I get all records not associated with the ssh unit? Things that don't work: journalctl -u '!ssh'; journalctl '!...
  • 437
3 votes
1 answer
1k views

use a service to start a new, shared, tmux session (and detach)

I'm trying to use systemctl to launch a process in a new, shared, tmux session. I'm pretty sure my tmux command is all set: I have the socket path set with a shared group. the service is executing ...
  • 145
3 votes
0 answers
682 views

Unable to interact with docker service

I'm having trouble with a docker container of mine, specifically, the laradock/laravel-horizon container, I'm not sure if that's relevant or not. The issue I'm having is that I am unable to solve my ...
  • 161
3 votes
0 answers
107 views

Stay Logged Into Headless Server

I have a headless Linux server running some services without root access (username leo), via systemd --user. I ssh into my server (as leo), start the services, and then exit. The problem is, systemd ...
  • 131
3 votes
2 answers
3k views

AWS instance Stop and Terminate don't execute systemd stop script

I have a shutdown script that executes just fine after cli reboot or shutdown, but never executes when an instance is stopped or terminated from aws console. [Unit] Description=Gracefully shut down ...
3 votes
0 answers
2k views

Obscure systemd-logind message on Centos 7 running on OpenVZ 7

I am seeing the message below appear several times at random times on a Centos 7 64-bit virtual private server running on OpenVZ 7. I have no idea what it means, how to fix it or if it can be safely ...
  • 35
3 votes
1 answer
2k views

Run Systemd Service Unit After AWS EBS Volume Mount

I launch m5.large (nitro-based) EC2 instance from Ubuntu AMI and attach EBS volume. There is systemd as a default init system. As AWS documentation "Making an Amazon EBS Volume Available for Use on ...
  • 131
3 votes
0 answers
543 views

How to achieve rolling restart with systemd?

I have 2 servers started as independent systemd units. They are listening on port 3001 and 3002 respectively. I want to achieve a rolling restart (also known as rolling update or ramped update, more ...
  • 135
3 votes
0 answers
105 views

Run a systemd timer only when network traffic is low

I would like to run a systemd timer daily, with lax time accuracy. However, I would want the timer to run only if the network is continuous idle/low load (for at least 2 minutes). Is there any way to ...
  • 113
3 votes
0 answers
446 views

Hide a systemd service for non-root users

I have a custom service entry in systemd on Ubuntu 18.04. The main executable is a script which creates some processes: foor@bar:~$ systemctl status XXXXXX.service ● XXXXXX.service - XXXXXX Loaded:...
3 votes
0 answers
516 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 ...
  • 3,993
3 votes
0 answers
3k views

How to setup logrotate properly for multiple systemd services, which sends their stdout, stderr to rsyslog

Suppose I have many systemd service units on ubuntu 16.04 which looks like this: [Unit] Description=Do something script After=default.target [Service] ExecStart=/usr/local/sbin/some-script-x.sh Type=...
  • 676
3 votes
0 answers
4k views

Systemd timer not disabled

I noticed today that a systemd timer I disabled several days ago is still running. And disabling it again appears to have no effect. I'm probably missing something fundamental here (I'm quite new to ...
  • 269
3 votes
0 answers
297 views

Enable cgroups on Beowulf compute nodes

We are running a Beowulf cluster using the Scyld distribution from Penguin Computing, and it looks like cgroups are configured on the head node, but not the compute nodes. I'm trying to configure ...
  • 1,274
3 votes
0 answers
1k views

Restarting a systemd service upon a network 'up' event

My system requires the use of a vpn, of which I use expressvpn which is based upon OpenVpn but uses its own systemd daemon. All connect/disconnect commands must go through the provided binary. In ...
  • 141
3 votes
0 answers
318 views

The strangest docker fault I've ever seen

I am using Docker with docker-mailserver on one of my servers. Very strange trouble appeared after migrating some services from legacy Debian Jessie server to Ubuntu 16.04 LTS server. Parameters of ...
3 votes
2 answers
3k views

Turn off buffering in systemd unit-file?

When I write my unit-file I want all output from Exec*-options (ExecStartPre=, ExecStartPost=, ExecStart=, and ExecStopPost=) to be sent to the journal. But apparently the output is buffered in some ...
  • 327
3 votes
0 answers
909 views

OpenVSwitch with Libvirt

Here's my situation: I'm running CentOS 7 with Openvswitch and Libvirt/Qemu. My domains are configured to use the virtualport type openvswitch, so when I start a VM it creates a port in the ovs bridge....
3 votes
0 answers
864 views

Why is my CUPS scheduler repeatedly being restarted?

In my /var/log/syslog, I see (filtered irrelevant parts out): Dec 30 15:00:10 myhost systemd[1]: Started CUPS Scheduler. Dec 30 15:13:11 myhost systemd[1]: Started CUPS Scheduler. Dec 30 15:26:11 ...
  • 1,632

1
2 3 4 5
10