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
10
votes
2 answers

Servers fail to bind to addresses at boot

I'm dealing with a known issue in RHEL 7 whereby services that specify an address to bind to will not start correctly. I've found a number of similar reports, many say they have been resolved with updates to systemd but I still face this problem.…
miken32
  • 942
  • 1
  • 13
  • 35
10
votes
7 answers

Start service after AWS user-data has run

I am building an AMI based off of an Ubuntu 16.04 AMI. When I start an instance from my AMI, I would like to pass in a user-data script that runs before the service start up on the AMI. It looks like the user-data is run in cloud-final.service. If I…
Bryan
  • 203
  • 1
  • 2
  • 5
10
votes
4 answers

Interface will not rename under systemd

I'm trying to rename a network interface on an Ubuntu 16.04 VPS, but am unable to do so. Systemd names my primary network interface enp0s3. I want to rename this interface to eth0. According to the systemd.link documentation I created a file called…
Oldskool
  • 2,025
  • 1
  • 16
  • 27
10
votes
1 answer

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 diving too much into into the tutorials because i…
sgt-hartman
  • 201
  • 2
  • 4
10
votes
2 answers

Start and stop one systemd unit with another

I have two services A.service and B.service. I want B to be stopped when A exits/get killed/is stopped. Also, I want B to get restarted when A gets restarted. I tried out the answer given in How to start and stop a systemd unit with another? and set…
Bug Killer
  • 243
  • 2
  • 8
10
votes
1 answer

Systemd does not restart service, although Restart=always

Here is my unit file of a systemd service: [Unit] Description=Tunnel For %i After=network.target [Service] User=autossh ExecStart=/usr/bin/autossh -M 0 -N -o "ExitOnForwardFailure yes" -o "ConnectTimeout=1" -o "ServerAliveInterval 60" -o…
guettli
  • 3,591
  • 17
  • 72
  • 123
10
votes
3 answers

Starting docker-compose with systemd on ubuntu 15.04

I have a docker-compose project that I would like to control through systemd. In upstart, I would use a script that looks like this: description "Start/Stop server" author "Jim Cortez" start on filesystem and started docker stop on runlevel…
Jim Cortez
  • 201
  • 1
  • 2
  • 6
10
votes
3 answers

OpenVPN and systemd-resolved

How does one use the dns pushed via an openvpn server with systemd-resolved ? Before I decide to 'upgrade' to systemd-networkd. I could use some variant of openvpn-resolv-conf script to call resolvconf to manage entries in /etc/resolv.conf on…
sw1nn
  • 161
  • 1
  • 2
  • 7
10
votes
2 answers

How does this variable escaping work in a systemd unit file?

I have a fairly simple unit file for a discovery sidekick service for a server instance I'm running on CoreOS. The unit file looks like this: [Unit] Description=Discovery for frontend server (instance…
10
votes
2 answers

Reset / Ingnore non-zero exit code with fleet / systemd

I have a backup.service called every hour by a backup.timer. Unfortunately the backup script running inside the container can complete successful but with warnings returning a non-zero exit code. So although everything may have worked, the container…
Julian Kaffke
  • 213
  • 1
  • 2
  • 5
10
votes
1 answer

How to combine output of several journals by journalctl?

I need to see all postgresql logs. I try: $ journalctl -f -u postgresql.service SYSLOG_IDENTIFIER=postgres -- Logs begin at Ср 2013-03-06 00:57:40 KRAT. -- авг 11 23:41:07 nuzzflonk postgres[2432]: LOG: database system was interrupted; last known…
Vladislav
  • 201
  • 2
  • 5
9
votes
2 answers

Can Journalctl and syslog be used in paralled?

I'm having a hard time understanding how logging works on linux. Since the inclusion of systemd, it seems a bit easier, but I still have a couple of concepts that still can't fully understand. Given a system with journalctl, I want to send some log…
RedNano
  • 333
  • 1
  • 7
  • 10
9
votes
1 answer

Debian 9 server no sshd in auth.log

On one of my servers, Debian 9, there is no output from sshd in /var/log/auth.log. In fact, if I do ag sshd in /var/log, it just doesn't appear. The only thing in auth.log is systemd-logind. In fact, it's suspicous that almost all log messages are…
Halfgaar
  • 8,084
  • 6
  • 45
  • 86
9
votes
3 answers

How to determine "Predictable Name" of network interface

I am setting up a new server and installed Ubuntu Bionic, which uses Predictable Network Interface Names. The installer is running on a rescue system, which still uses old interface names like eth0, eth1, but the newly installed system has…
pymkin
  • 255
  • 3
  • 8
9
votes
1 answer

How to find out which systemd services/units are part of a target unit?

So if I run systemctl list-units --type=target I can see all of the target units on my machine. But if I wanted to find a list of services and other units that are under each of these "umbrella" target units, how could I do that? In other words, if…
a5le6t891
  • 91
  • 1
  • 2