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
0
votes
1 answer

Logging to /var/log/messages stopped. How to turn it back on?

while frantically trying to resolve a time sync issue, I somehow must have turned off some (but not all journalling). /var/log/messages ends last eventing, and journalctl -eu chronyd doesn't show any new entries althogh the service is running. This…
musbur
  • 193
  • 12
0
votes
2 answers

Why most services use non-root account could create logfile in /var/log?

I want to write a service putting log in /var/log, then I edit a xxx.service under systemd. [Service] User=xxx Group=xxx But the service throw a error that open /var/log/xxx.log the permission denied. How do they implement write log in /var/log and…
fido han
  • 11
  • 1
0
votes
1 answer

How do you kill all instances of a systemd service?

I want to kill all instances of a systemd service. This works fine: sudo systemctl stop 'custom-service@*' but it is slow since it runs my custom ExecStop which does extra work to safely shut down the process. In certain cases, I'd rather just kill…
zzbomb
  • 103
  • 3
0
votes
2 answers

Execution of ExecStop when script in ExecStart exits

I am a little confused with the behavior of systemd services. I have the above systemd service. [Unit] After=libvirtd.service [Service] Type=simple Environment=VM_XML=xxxxxxx ExecStartPre=/usr/bin/bash /usr/local/lib/common/createQcowImage.sh…
0
votes
0 answers

Best practice for configuring a complex virtual network with multple links and multiple virtual machines

I have a somewhat complex virtual network setup with multiple virtual machines and the links between them. There are perhaps 40 ip commands to set it up which (if I read the docs correctly) need to be translated into appropriate interface…
RabidMutant
  • 123
  • 5
0
votes
1 answer

Log systemd service stderr to different file using rsyslog

I have the following config in a systemd service: StandardOutput=syslog StandardError=syslog SyslogIdentifier=udocit And this rsyslog conf file: if $programname == 'udocit' and $syslogseverity > 5 then { action( type="omfile" …
HomeIsWhereThePcIs
  • 144
  • 1
  • 2
  • 9
0
votes
1 answer

simple systemd service and socket failing

I had a service I was trying to run this way but it was slightly a large python program. I took a step back and built a dead simple python program to see if I can get it to run. It fails when I try to connect via telnet to this socket running. …
Codejoy
  • 107
  • 5
  • 17
0
votes
1 answer

Simple code running in systemd exits to fast?

I had this old code base running in xinet d. It was basically a simple python script that waited for standard in to come in on a socket, it would do something with it and respond on standard out. So I heard xinetd is no longer used, so I tried to…
Codejoy
  • 107
  • 5
  • 17
0
votes
1 answer

systemd-networkd: how to elegantly switch between creating a wireless access point and connecting to a wifi network

I'm working on a headless IoT device that creates its own access point so that the user can access its web UI and do necessary configuration. The system uses networkd but I'm not very attached to it and may change to NetworkManager if it's better…
0
votes
0 answers

Nginx and secondary IP addresses on EC2 instance running Debian Buster

I have an EC2 instance running Nginx on Debian Buster. I added multiple private IPs to the instance (to allow nginx to host multiple websites) using the AWS web console. I then created the script…
Jim Walker
  • 321
  • 1
  • 3
  • 10
0
votes
0 answers

Why is my ubuntu service timing out when I can clearly see it started properly?

Here is my log : Feb 10 10:19:25 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service... Feb 10 10:19:26 ip-172-31-47-29 tnr-photos[67938]: Server running on port 2200 Feb 10 10:20:56 ip-172-31-47-29 systemd[1]: tnr-photos.service: start…
Chapo
  • 71
  • 1
  • 8
0
votes
0 answers

Libvirt VM Networking fails to start up after upgrading host from Ubuntu 18.04 to 20.04

I upgraded a server from 18.04 to 20.04. I am using libvirt/kvm to host a number of VMs. Some of the VMs failed to reconnect to the network after the upgrade. Two VMs in question run Ubuntu 18.04 and Centos 7 and both fail to start up networking…
Ries
  • 153
  • 1
  • 2
  • 6
0
votes
2 answers

Can't initialize Redis as a systemd service (supervised systemd) on Ubuntu Server 20.04.2

On Ubuntu Server 20.04, Redis (5.0.7) doesn't start after setting supervised systemd on /etc/redis/redis.conf, but no error is printed when running it manually with /usr/bin/redis-server /etc/redis/redis.conf. Also, when running manually, its…
Paulo Coghi
  • 598
  • 2
  • 11
  • 22
0
votes
2 answers

How to control start and stop of libvirtd and virtlockd in pacemaker cluster?

Using indirect locks of virtlockd (which is used by libvirtd) requires to use a cluster-wide shared filesystem like OCFS2. In turn this means that virtlockd must be started after the shared filesystem is mounted (otherwise the locks created would be…
U. Windl
  • 366
  • 3
  • 17
0
votes
1 answer

Executing a command before starting a systemd service

I want to execute a script before starting a service every time the service is started. I know that I can use ExecStartPre inside the service definition file, but I wonder if it's possible to achieve without editing a file which comes from the…
Capt. Crunch
  • 839
  • 2
  • 12
  • 25