2,482 questions
2
votes
0
answers
98
views
Why am I experiencing DNS resolution failures only in the final stage of a multi-stage Docker Compose build?
I am working on a custom deployment of some open source software where some of the code needs to be modified to provide a couple additional features that are not present, so I'm working on making ...
2
votes
1
answer
79
views
Control memory of systemd sd_journal_open()?
When I use sd_journal_open() the process balloons in memory depending on the O/S and the flags used to open the journal.
I wrote a test that does nothing more than open the journal and idle in order ...
284
votes
23
answers
400k
views
Elasticsearch: Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
I have an issue with a systemd config for ElasticSearch.
[Unit]
Description=platform-elasticsearch
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
User={{ app_user }}
...
-2
votes
1
answer
167
views
How can I tell if lighttpd is running on Debian 13? [closed]
My task was to port debian12 to debian13. In debian13 I noticed that the website was behaving differently with Perl v5.40.1. I found out that the following line returns different values on different ...
Advice
0
votes
0
replies
25
views
Early Initialization of GPU, Weston, and Hypervisor Drivers with Deferred Systemd Services & modules
how to configure systemd to load essential graphics and virtualization modules early in the boot process, while deferring non-critical services & modules for manual activation later.
called gpu ...
1
vote
1
answer
161
views
changing the podman-auto-update.timer configuration
I am trying to implement a system where I will be using podman quadlets and systemd for maintaining the service.
What I tried
Enabled the podman auto timer and verified
Edited the podman auto timer ...
201
votes
34
answers
636k
views
nginx.service failed because the control process exited
nginx.service failed because the control process exited
$ systemctl status nginx.service
nginx.service - Startup script for nginx service
Loaded: loaded (/usr/lib/systemd/system/nginx.service; ...
1
vote
2
answers
123
views
correct cleanup of spawned child processes in golang
I am working on a project in go (which I am not very familiar with), that runs as a systemd process and spawns child processes, but whenever the systemd service is restarted, I see warnings (sometimes ...
312
votes
10
answers
424k
views
How to redirect output of systemd service to a file
I am trying to redirect output of a systemd service to a file but it doesn't seem to work:
[Unit]
Description=customprocess
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/bin/...
0
votes
1
answer
82
views
Bash script having custom functions not running under systemd service [closed]
I have this script to get images from a webcam & process them via RKNN NPU
#!/bin/bash
# Define the temporary directory for images
TEMP_DIR="/media/32GB/pics"
# Define the resize/...
0
votes
1
answer
318
views
Confused as to what systemd-credentials does for me
I'm refreshing the setup scripts for some home service, for a couple of years now we have had systemd-creds to manage secrets for our services. I'm missing something obvious about what benefit this ...
-1
votes
1
answer
167
views
Java process, started via systemd, hangs on "activating"
I have a Java application, which I want to start as systemd process.
Systemd unit file looks like:
root@server:~# systemctl cat somejava.service
# /lib/systemd/system/somejava.service
[Unit]
...
0
votes
1
answer
90
views
.NET8 app running as a systemd service getting stuck
I have a .NET8 app which I want to run as a systemd service in Ubuntu. I have created a dummy service and a unit file. When I run the service through systemctl, it is not sending the notification to ...
144
votes
7
answers
340k
views
How to ensure that there is a delay before a service is started in systemd? [closed]
I am having a service that depends on Cassandra coming up gracefully and the cluster being up and ready.
To ensure that the dependency order is met, I have the following unit file
[Unit]
Requires=...
1
vote
1
answer
44
views
How do .NET Core services interact with Systemd to identify that service is frozen?
I developed a .NET 6.0 service that executes functions that execute in a fixed interval of time. I used timers to start functions.
But I detect sometimes that the service stops to execute this ...
101
votes
10
answers
264k
views
Docker System has not been booted with systemd as init system
I have an Ubuntu 18.04 image runing on my docker container. I login into it and installed Openresty. also installed systemd. When I use command systemctl I get this error:
System has not been booted ...
-1
votes
2
answers
208
views
Systemd timers - how to get Epoch timestamps? [closed]
I am creating a shell script that needs to calculate e.g. durations between different timestamps.
When shown with list-timers:
systemctl list-timers my
NEXT LEFT LAST ...
0
votes
1
answer
84
views
How to persist PATH for Azure DevOps agent in VMSS using systemd or image-based methods?
I'm running an Azure DevOps pipeline using agents deployed via a VMSS (Virtual Machine Scale Set) based on a custom Packer image. This image includes Polyspace tools (like Code Prover and Bug Finder), ...
151
votes
7
answers
184k
views
How can I configure a systemd service to restart periodically? [closed]
I have a simple systemd service that needs to be periodically restarted to keep its process from bugging out. Is there a configuration option for systemd services to periodically restart them? All of ...
0
votes
2
answers
120
views
systemd shows script that invokes my app crashed with segfault?
I have a service that runs via a bash script over systemd. Now systemd reports that it crashed with a segfault.
I tried to reconstruct the invocation pipeline:
api.service
[Unit]
Description=API
After=...
2
votes
3
answers
203
views
How to move systemd user units config directory [closed]
I would like to move on a Linux host for all users the systemd user unit directory.
The native user unit directories under
${HOME}/.config/systemd/user
are not accessible to systemd due to various ...
3
votes
1
answer
132
views
systemd service running shell script doesn't run cat task on startup
I have a microcontroller running Linux distro based on Debian.
I have a Nextion screen connected to it via UART on /dev/ttyMOD1 port, I have a script which uses stty and gets data from screen using ...
0
votes
1
answer
270
views
How to set up a static IP adress for Raspberry pi 5 using Yocto?
I built a raspberry pi 5 image for my raspberry pi 5, using only the base image found in meta-raspberrypi/conf/machine/raspberrypi5.conf, which I modified a bit to include some modules, one of which ...
153
votes
9
answers
428k
views
How can I use iptables on centos 7? [closed]
I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for httpd service, but something wrong with my iptables service ... what's wrong with it? What am I doing ...
0
votes
1
answer
755
views
Running Chromium in kiosk mode as a service with permissions to webcam
I have an app that I need to open on boot to kiosk mode in chromium. The script works fine when run manually but through systemd the webcam is blank and never asks for any permissions. I have tried ...
1
vote
0
answers
50
views
Why won't AddressSanitizer log my DEADLYSIGNAL/bug only when LeakSanitizer is off?
I'm having what I would consider to be a very bizarre issue with ASAN. I am working on a linux daemon that is started by systemd. My ASAN flags look like this:
Environment=ASAN_OPTIONS=abort_on_error=...
99
votes
8
answers
353k
views
Fixing a systemd service 203/EXEC failure (no such file or directory)
I'm trying to set up a simple systemd timer to run a bash script every day at midnight.
systemctl --user status backup.service fails and logs the following:
backup.service: Failed at step EXEC ...
0
votes
1
answer
372
views
python systemd timer every 2.5 hrs past the hour, but it runs every 2 hrs
I am forced/bound to use python 2.7. I have created a systemd timer (and system.service of course) where the timer should run (24/7) every 2.5 hours past the hour. So starting at 00.00, 02:30, 05:00, ...
33
votes
4
answers
73k
views
"sudo systemctl enable docker" not available: Automatically run Docker at boot on WSL2 (using a "sysvinit" / "init" command or a workaround)
I am using Ubuntu on WSL2 (not on Docker Desktop).
According to How to fix docker ‘Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?’ on Ubuntu, I can ...
2
votes
1
answer
388
views
Secure communication between a daemon and D-Bus on Linux [closed]
So I have a daemon which is used to authenticate users via Azure Entra Id (the daemon is Himmelblaud). I'm writing a session D-Bus service (the bare bones here) to provide SSO creds to various apps ...
1
vote
1
answer
273
views
Service user can't read user key with keyctl: keyctl_read_alloc: Permission denied
$ sudo -u backup_agent keyctl add user LUKS_PASSWORD "your-secure-password" @u
1013632990
$ sudo -u backup_agent keyctl list @u
1 key in keyring:
1013632990: --alswrv 110 110 user: ...
69
votes
9
answers
226k
views
systemd apparently not finding .service file
I've put together a foo.service file for our foo service that runs as a daemon. The service runs fine when I run systemctl start foo (and stop) but
systemtcl enable foo results in Failed to issue ...
3
votes
0
answers
282
views
D-Bus client not receiving signal events in the system bus
I am using the sdbus-cpp library to test how to create a service and access it's methods and signals through a D-Bus client. The library provides an example of this that I tested and worked for me. ...
0
votes
2
answers
112
views
Running a java application via a systemd service doesn't see additional directories (Rocky Linux)
I am trying to make a local machine restart to the new version control build of my java application. Let me run you through the flow:
.jar file is uploaded via ssh to a directory
a service is running ...
4
votes
2
answers
258
views
Is there a systemd-independent function for getting a USB device model?
I want to get a ID_MODEL and ID_VENDOR properties of a USB device in Linux. I know its /dev/bus/usb/xxx/yyy path.
I can do it with this code that depends on systemd (cc -lsystemd test.c):
#include <...
1
vote
0
answers
57
views
How to properly configure Eclipse to navigate the systemd project?
I have downloaded the sources of systemd: https://github.com/systemd/systemd
and am trying to configure Eclipse to eliminate the errors in the source files and to be able to navigate between functions ...
0
votes
1
answer
228
views
Systemd cgroup slice user override does not work
While trying to implement resource limitation (Debian 12) for all users except root user i faced that
user-0.slice MemoryMax does not override user.slice MemoryMax parameter.
root@:/etc/systemd/system....
1
vote
0
answers
106
views
Missing org.PulseAudio.Core1 D-Bus Interface when running PulseAudio under Systemd
I’m trying to access the org.PulseAudio.Core1 D-Bus interface, but it doesn’t seem to be exposed properly. I’m running PulseAudio as a systemd user service, and while PulseAudio itself is working fine,...
-1
votes
1
answer
199
views
How are enroll precalculated PCR 1 SHA256 value
The problem:
On Ubuntu 24.04 i use the command:
systemd-cryptenroll \
--tpm2-device=auto \
--tpm2-pcrs=0:sha256=60d6401905da60ba1610c36a6c7e21e4f6fb75750e0bcc80049d29eb7c01d8a4 \
--tpm2-pcrs=1:sha256=...
0
votes
1
answer
80
views
Tomcat did not restart after reboot due to existing PID file on ubuntu 22.04
After a reboot Tomcat didn't start due to a existing PID file:
/opt/tomcat/bin # ./version.sh
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/...
1
vote
1
answer
161
views
Track outcome of startUnit dbus call to systemd
Context
I'm developing an application that performs dbus calls to manage systemd units.
To get an idea for the calls, I'm writing a small shell script that should detect a failed unit like systemctl:
...
0
votes
0
answers
74
views
how recieve data using python script from systemd.socket
I never really needed to use socket before and just out of curiosity I tried to write a python script as server and another as client. It worked and there is no issue there. In next step, I tried to ...
0
votes
1
answer
407
views
How to solve a redis service warning about the kernel parameter vm.overcommit_memory? [closed]
On my Yocto based Linux distribution I have installed an instance of Redis 6.0.5 which use AOF persistence policy.
Because I'm having some problems with this instance of Redis Server I have checked ...
0
votes
1
answer
171
views
How to disable InfluxDB console logs spamming journalctl in .NET 8.0 application running as systemd
I am using InfluxDB.client in my .NET 8.0 worker application. When running the code using dotnet run, I do not get the logs below. When I compile it to a selfcontained application and run it using ...
0
votes
1
answer
61
views
Setting User= in systemd based on environment variable
I'm trying to do the following with systemd, but it is failing:
EnvironmentFile=/mypath/%i/environ
ExecStart=/mypath/bin/start.sh %i
ExecStop=/mypath/bin/stop.sh %i
User=${USER}
I want to define $...
1
vote
1
answer
55
views
Cannot run myproject.service under systemd
I'm following this (very good) DigitalOcean tutorial on how to serve a Flask app using Gunicorn, but cannot get Systemd to run with myproject.service.
I've created a python environment (venv), pip ...
1
vote
1
answer
108
views
how can I call "systemd-run" "--user" ... from execvp() (in c or c++) without requiring password
When I call systemd-run "--user" "--pipe" "echo" "hello" I get the expected output "hello" (plus some systemd unit info) without a password popup.
But ...
1
vote
0
answers
176
views
How do I override a systemd unit Conflicts= or ExecStart= for a templated unit file
Take the initial unit (which is a failure unit for another service)
/usr/lib/systemd/system/[email protected]
[Unit]
Description=Failed Unit for %i
Conflicts=some-unit.target
[Service]
Type=Oneshot
...
0
votes
1
answer
68
views
Prevent a service from stopping if certain conditions apply
I don't want the service to stop when using systemctl stop service if certain conditions apply.
Is there a way to check beforehand and then just return an errorcode?
I wrote a custom script for ...
1
vote
1
answer
2k
views
how to echo a message to the terminal window from within a execstartpre command inside a system service file? [closed]
Everything I have tried either doesn't work or results in an error while starting the service.
This is what chapt GPT suggested and it resulted in an error...
ExecStartPre=/bin/bash -c 'echo "...