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.

Filter by
Sorted by
Tagged with
5 votes
2 answers
450 views

Why is my Systemd service not passing parameters from my EnvironmentFile?

I'm new-ish to systemd. I've got a service that's been working fine with the ExecStart command line hard-coded. Now I'm trying to parameterize it, and I found EnvironmentFile written up online. So I ...
0 votes
1 answer
19 views

two network interfaces in LXC → Systemd is blocked for 5min (services dead)

I use proxmox to virtualize some LXCs. Recently I wanted to add a second interface on a Debian 11 LXC build of Turnkey ... but there is a weird problem with systemd. When I configure two static ...
0 votes
0 answers
20 views

Why are tmp files in /var/tmp/systemd-private-* excluded from automatic deletion?

I'm running a CGI application on an Apache instance, and lately I've been noticing errors like the following, which appear to be causing some issues: ERR012: Unable to create temporary file "/var/...
  • 131
0 votes
0 answers
18 views

systemd-socket-proxyd[1076]: Failed to connect to remote host: Permission denied

I have a RHEL 6 running a rdp forward service. And now I would like to migrate to RHEL 9. But xinetd is no longer available in RHEL 9. I try to setup using systemd but failed with: systemd-socket-...
  • 1
2 votes
1 answer
145 views

sourcing environment variable in bashrc: directly vs export from file yields different result - why

I am running systemd via user (i.e. enable-linger $USER) and I interact with services via systemctl --user I noticed a strange issue. Sourcing Type 1 In order for the above systemd to work for a user, ...
0 votes
0 answers
10 views

How to bind mount /sys/kernel/debug with systemd-nspawn?

--bind /home bind mounts /home, but --bind /sys/kernel/debug only leads to an empty directory. Any other options needed? Thank you!
  • 1
0 votes
1 answer
34 views

hardening fail2ban using systemd sandbox

I've been trying to follow the ArchWiki instructions on hardening Fail2Ban: https://wiki.archlinux.org/title/Fail2ban#Service_hardening Specifically I've created a drop-in file as described and ...
  • 173
1 vote
0 answers
37 views

Swap disk devices in RHEL 8

I need to swap a couple of disk devices around on a RHEL 8 server because it's unfortunately going to be problematic to rebuild it and I need the devices in a specific order. I think the following ...
  • 11
0 votes
0 answers
22 views

nginx autostart fails systemd

I compiled nginx from source and installed it. Also I made the systemd service for nginx (https://www.nginx.com/resources/wiki/start/topics/examples/systemd/). But it won't start automatically in boot....
  • 1
0 votes
1 answer
61 views

Linux server loses network connectivity after an OOM event

We have a server runnnig Linux 5.15 and we've had multiple verified situations where a process is killed by OOM and that leaves the whole system inaccessible on the network, both for inbound and ...
2 votes
2 answers
57 views

systemd file not pickuping environment values

Systemd file for filebeat doesn't pickup env variables and throw as below ExecStart=/usr/share/filebeat/bin/filebeat -environment systemd $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS (code=exited, ...
0 votes
0 answers
70 views

Debian Failed at step EXEC spawning - Systems Service - Permission Denied

I'm following this tutorial exactly line by line: https://docs.meilisearch.com/learn/cookbooks/running_production.html#step-4-run-meilisearch-as-a-service It has a step to setup the Meilisearch as a ...
  • 269
1 vote
1 answer
37 views

Systemd doesn't seem to respect After= dependency?

I have a PostgreSQL server (postgresql.service) and a basic shell script (mobilizon-postgresql.service that is run to provide some assertions on the database to a third service (Mobilizon). So ...
  • 113
0 votes
0 answers
24 views

Allow a systemd service access to /sys/…/energy_uj - udev rule changing owner having no effect?

I'd like to collect the my CPU power usage on some "plain" linux boxes (i.e. no fancy things like VMs or let alone K8s) via scaphandre or prometheus_node_exporter, running as systemd service ...
  • 111
1 vote
1 answer
47 views

Masking systemd service

I am installing a few third party rpms in my system, and one of those rpm packages a systemd service file, and a preset file to enable the service. I want to keep the service disabled and masked. For ...
1 vote
1 answer
37 views

How do I make systemd wait for a service to finish shutdown before shutting down another one?

I have two services: mysql and liferay. Liferay start depends on mysql but liferay's shutdwon also depends on mysql. The problem is that systemd will shutdown mysql before liferay's shutdown is over. ...
  • 41
0 votes
1 answer
66 views

Systemd: why are files in /tmp or /run deleted after a few seconds?

I am using systemd to mount a Windows share using Kerberos. To make this work, I first run kinit in a .service file to create a Kerberos credential cache (ccache). The .service runs as root as the ...
0 votes
1 answer
21 views

Why python-journald-rsyslog seems to batch/dely log write?

I intend to log a python script output. Here what it looks like : arm@stackoverflow > cat test.py #!/usr/bin/python from time import sleep while True: print("Hello") sleep(...
  • 498
0 votes
1 answer
51 views

NFS server not starting at boot time (Can be started manually)

Problem: I have an NFS server that fails to export directories on boot. Once booted I can ssh in and start the server manually. I have set all owner:group and permissions to be very "permissive, ...
  • 3
1 vote
1 answer
40 views

systemctl list-units for type target not behaving as expected

Summary: 'systemctl list-units --type=target --all' does not always list targets that I've added Detail: I have a project that consists of several related daemons; let's call this project 'Foo.' The ...
0 votes
2 answers
97 views

How to debug Linux server reboots?

I have a Debian 10 server that keeps rebooting. journalctl offers possibility to list last boots: journalctl --list-boots -6 1ee519dc5bc24e88af75cc609ee32093 Mon 2023-02-06 21:02:02 UTC—Sun 2023-02-12 ...
  • 2,103
0 votes
1 answer
142 views

Strongswan, Ubuntu 22.04: Can't start connection after reboot, although configuration is loaded

I am using two LXD-Containers (on both servers) for connecting between them. Everything runs fine, using iptables for NATing ports. But there is one problem: When restarting one of the servers (just a ...
0 votes
0 answers
104 views

Apache2 won't start even with unit file update post reboot

Issue : after server reboot apache2 won't automatically start (have to manually ssh and start via systemctl which starts without any issue) Error message: Feb 08 05:53:46 domain1_test.com systemd[1]: ...
  • 1
0 votes
0 answers
41 views

how to hide or set the frequency of dbus-org.freedesktop.timedate1 messages

I constantly get messages in syslog like these: Feb 6 18:03:40 user systemd[1]: systemd-timedated.service: Deactivated successfully. Feb 6 18:04:10 user dbus-daemon[1220]: [system] Activating via ...
  • 344
1 vote
2 answers
63 views

Build a debian package which includes a template myservice@.service

I need to build a package for a program that should be deployed as a service. I have added a debian/helloworld.service and my package is built, installed and works correctly, i have a /lib/systemd/...
  • 111
0 votes
1 answer
50 views

How to monitor systemd?

I am looking for a way to monitor systemd services: Basic things such as whether they are running or not is a good start (and anything else on top is a bonus). I tried using node_exporter, but since I ...
1 vote
1 answer
541 views

Rootless docker fails with `systemd error: Interactive authentication required`

I followed the guide on https://docs.docker.com/engine/security/rootless/ for running Docker on a Debian (testing) machine. After stumbling across some paths that are apparently not configured ...
1 vote
1 answer
38 views

Why can't I attach custom fields to the journal with systemd-run --user?

I want to run a program in a transient unit with systemd-run, using the user-level service manager (--user), with some custom fields attached to the journal. According to the docs I can use ...
0 votes
1 answer
131 views

Start Apache on-demand using systemd socket activation

I have a local website on Debian 11 which is rarely used so I thought I might want to start Apache using systemd socket activation when visiting the site and then shut down after few minutes of ...
  • 101
0 votes
1 answer
80 views

Enabling user linger causes Rocky Linux 9 to hang on shut down until power button is pressed

Rebooting Rocky Linux 9 is very fast until I enable user linger: loginctl enable-linger foo I haven't added any new services to run under the foo user. After this change, reboot, shutdown, poweroff ...
  • 186
0 votes
0 answers
87 views

Contents of /etc/systemd/network/10-eth0.network gets overwritten on reboot

I am using a VMware photon OS VM. I want to configure a secondary IP address for my eth0 interface. And following the lead in : How to configure interface aliases using Systemd-Networkd? I added an ...
  • 101
0 votes
0 answers
19 views

systemd: How to apply TimeoutStopSec= to virtual ('meta') Units?

i have a Debian 10 server that hangs during the shutdown process. It looks like this when this happens: i have set DefaultTimeoutStopSec=90s in /etc/systemd/system.conf and did systemctl daemon-...
0 votes
1 answer
33 views

Howto prevent udevd wrongly enqueues remove event for device ppp?

Connecting a PDA device with Debian using SynCE, USB serial device is recognized and connects with ttyUSB bus, obtains an IP address and disconnects after a few seconds (two, max three). This is how ...
0 votes
0 answers
65 views

Cockpit web interface returns "disconnected" after login attempt

It was working normally and the only changes that were made before this problem was changing the IP addresses of the network interfaces. This is "syslog" when I try to login as "root&...
0 votes
0 answers
27 views

haproxy "max open files" reduces automatically after startup

I was trying to fix the following error being logged by haproxy... Proxy https-in reached process FD limit at 544. Please check 'ulimit-n' and restart ...and added LimitNOFILE=1024 in haproxy's ...
1 vote
1 answer
122 views

How to make systemd journal remote use hostname instead of IP address?

I do have one log server which runs systemd journal remote software to receive journal entries from remote hosts via systemd journal upload. This works fine. The only trouble that I have is that the ...
-1 votes
1 answer
589 views

Warning: atop.service changed on disk. Run 'systemctl daemon-reload' to reload units [closed]

I was trying to change the atop log interval on CentOS 7 cPanel server from 600 to 60 seconds and tried editing the file /etc/system/system/multi-user.target.wants/atop.service (Environment="...
0 votes
1 answer
39 views

firewalld stopping for no reason

I have a Red Hat 8 server. On it, I have used firewall-cmd --permanent --zone=public --add-service=https to enable public traffic to the server. When I systemctl start firewalld, this works as ...
  • 101
13 votes
8 answers
19k views

failed to run Kubelet: validate service connection: CRI v1 runtime API is not implemented for endpoint

I have installed kubelet 1.26.0 on Ubuntu 22.04 using apt install kubelet command, but when I try journalctl -xeu kubelet I get the following result: ░░ ░░ The unit kubelet.service has entered the '...
0 votes
0 answers
908 views

Systemd error: "Failed to get properties: Transport endpoint is not connected"

Background info first. The server that this occurs on has only been on for less than a year and includes an external SAS JBOD. This server was intended to take on the duty of an old web server, ...
0 votes
0 answers
74 views

How to start and stop SAP instances (including databases) automatically with OS boot and shutdown, respectively?

Running SLES15 (uses systemd), how can I make SAP instances and databases start automatically on system boot, and stop them properly on system shutdown or reboot? One example I found is for the ...
  • 354
0 votes
1 answer
42 views

systemd start mariadb after mounting USB stick

I moved the datadir of mariadb to a USB-stick, subsequently mariadb won't start anymore at boot time, because the stick is mounted after mariadb was started. I tried to modify the start order by ...
0 votes
1 answer
54 views

define custom fields for systemd-journald

The doc states, it may be possible to define new fields by applications. What does it mean? Can one define arbitrary fields or are only those possible listed in the doc USER JOURNAL FIELDS? If ...
  • 136
1 vote
2 answers
87 views

Limit systemd service manual restart rate

I have a system where a service (nginx for example) is sometimes restarted excessively by 'systemd restart nginx' (as result from other scripts, eg. to apply a new configuration or rotate logs). Even ...
  • 1,158
0 votes
0 answers
35 views

How to get information about an instantiated systemd service after it exited

For regular systemd services it is possible to retrieve information about the most recent run via systemctl show .... I'm interested in state change time stamps (mainly when started and stopped). This ...
1 vote
0 answers
42 views

Systemd maximum number of services

Is there is a limit on how many services I can create with systemd? Let's assume I'm installing the service units into ~/.config/systemd/user/ or /etc/systemd/system/. I'm using Ubuntu 20.04 LTS.
  • 158
0 votes
1 answer
454 views

linux bridge vlan-aware and untagged traffic

I have the following use case. A machine which runs VMs that have to be located to a VLAN with ID 166. The traffic must go out of an physical interface enp89s0 which is connected to the primary ...
  • 207
0 votes
1 answer
99 views

Where does `ctr task list` get the list of tasks from?

After upgrading containerd on ubuntu 1.5.9-0ubuntu1~20.04.4 -> 1.5.9-0ubuntu1~20.04.5 I started having weird containerd tasks: # ctr --namespace k8s.io task ls|grep -i unkn ...
  • 421
3 votes
1 answer
209 views

How do I ensure a docker network (interface) exists even when it's not running?

I have a container stack (specified by a docker-compose.yml). The stack requires a PostgreSQL database, but I am using a locally running native instance instead of having it be a part of the stack (to ...
2 votes
1 answer
78 views

logrotate fails to run Java postrotate program

Somewhat recent versions of logrotate fail to execute postrotate actions that invoke Java when logrotate is started via systemd. In my logs I see: logrotate[123]: Error occurred during initialization ...
  • 334

1
2 3 4 5
29