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.

systemd, created by Lennart Poettering and Kay Sievers, is a modern replacement for the traditional Linux init, whether System-V or BSD-style initscripts. Its main features include the ability to express dependencies between services and aggressive parallelization of service startup.

1471 questions
29
votes
1 answer

Allowing a non-root user to restart a service

Background : I created an app called myapp with Spring-boot. It consists of a self-executable jar and is compatible with systemd services. Now, I am trying to integrate it with jenkins. What I want: I want jenkins to be able to : stop the…
Arnaud Denoyelle
  • 413
  • 1
  • 5
  • 6
28
votes
4 answers

systemctl doesn't recognize my service: Default-Start contains no runlevels, aborting

I want to define a simple service to be started at boot, being on Ubuntu server 16.10. So I have created a /etc/init.d/mydaemon I somehow messed up between upstart and systemd: at first I thought I had to setup an upstart service. So after…
CharlesB
  • 545
  • 1
  • 4
  • 20
25
votes
4 answers

Systemd: Restart all instances of an Instantiated Service at once

I use the nice feature of systemd: Instantiated Services. Is there a simple way to reload all instantiated services with one call? Example: I don't want to run all like this: systemctl restart autossh@foo systemctl restart autossh@bar systemctl…
guettli
  • 3,591
  • 17
  • 72
  • 123
24
votes
1 answer

What does the systemd-resolved service do and does it need to listen on all interfaces?

I am working on a project that involves an IOT device (the now deprecated Intel Galileo). I am looking at hardening these devices and I noticed that the systemd-resolved service is listening on all interfaces (0.0.0.0). root@hostname:~# netstat…
jeeves
  • 351
  • 1
  • 2
  • 7
24
votes
2 answers

How to set systemd service dependencies?

During CentOS 7 system boot nginx start fails with the following error: 2014/08/04 17:27:34 [emerg] 790#0: bind() to a.b.c.d:443 failed (99: Cannot assign requested address) I suspect this is happening due to the network interfaces not being up yet…
user99559
24
votes
4 answers

Systemd dependencies and boot order

I need to specify a boot order for processes to start. I have 389 Directory Server and Samba running on Fedora 18. How can I have the network services boot, then 389 DS, then Samba? Is there a GUI to manage this in Fedora? I have enabled Samba to…
Dylan Klomparens
  • 634
  • 2
  • 9
  • 22
23
votes
2 answers

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 problematic for developers, as they are instructed…
Cloud
  • 425
  • 3
  • 13
23
votes
6 answers

Systemd fails to run in a docker container when using cgroupv2 (--cgroupns=private)

I will attach the minimized test case below. However, it is a simple Dockerfile that has these lines: VOLUME ["/sys/fs/cgroup"] CMD ["/lib/systemd/systemd"] It is Debian:buster-slim based image, and runs systemd inside the container. Effectively, I…
Stephen
  • 343
  • 1
  • 2
  • 4
22
votes
1 answer

systemd service with multiple After

Is it possible to create a service that depends on several other services? What is the right syntax? Such as: [Unit] Description=service…
22
votes
1 answer

Starting systemd services sharing a session D-Bus on headless system

I need help starting services that communicate via a session (not system) D-Bus on a headless Linux system. The key is that no-one will be logged in on the headless system. So far I've been able to start a D-Bus daemon and test the D-Bus…
Ole Wolf
  • 440
  • 1
  • 5
  • 13
22
votes
3 answers

How to debug systemd unit ExecStart

I am curious whether I can print out fully expanded ExecStart/ExecStop command line. Consider following example: ExecStart=/usr/bin/java $OPTS_COMMON $OPTS $OPTS_LOG $OPTS_DEBUG some.class.Start --param1 ${PARAM1} --param2 ${PARAM2} I am having…
pystole
  • 355
  • 2
  • 3
  • 8
22
votes
4 answers

Systemd: start a unit after another unit REALLY starts

In my particular case I want to start remote-fs unit after all glusterfs completely starts. My systemd files: glusterfs target: node04:/usr/lib/systemd/system # cat glusterfsd.service [Unit] Description=GlusterFS brick processes (stopping…
Sergey
  • 611
  • 2
  • 6
  • 11
21
votes
6 answers

Why am I missing /var/run/sshd after every boot?

I'm running a Ubuntu 16.04 container under Proxmox 5.2-11. After applying the latest round of patches1 I'm unable to login at the console or over ssh. I mounted the container root FS on the hypervisor and added pts/0 to /etc/security/access.conf…
Server Fault
  • 3,714
  • 12
  • 54
  • 89
21
votes
2 answers

Start systemd service conditionally?

At my organization we have a number of simple-to-use base AMIs for different services such as ECS and Docker. Since many of our projects involve CloudFormation, we're using cfn-bootstrap, which consists of a couple of scripts and a service which run…
Naftuli Kay
  • 1,708
  • 6
  • 24
  • 44
21
votes
1 answer

How to start and stop a systemd unit with another?

I am using CoreOS to schedule systemd units with fleet. I have two units (firehose.service and firehose-announce.service. I am trying to get the firehose-announce.service to start and stop along with the firehose.service. Here is the unit file for…
Andy Shinn
  • 4,211
  • 8
  • 40
  • 55
1 2
3
98 99