2,482 questions
0
votes
0
answers
25
views
How to avoid stopping all processes that started by one systemd service when OOM happens?
In my evn, some child processes are started by one systemd service, if there is something wrong with one child process and OOM is triggered by it, all the processes (all the child processes and the ...
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 ...
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 ...
1
vote
2
answers
122
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 ...
-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 ...
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 ...
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
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 ...
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), ...
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=...
-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 ...
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=...
-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
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 ...
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 $...
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 ...
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 ...
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
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
0
answers
62
views
TurtleBot4 ROS2 Humble Nodes launched via systemd do not appear in ros2 node list
I know I am supposed to ask ROS2 questions on robot stack exchange. I did, no one has answered, and no one gave a working answer in the linux one either.
As the title states I am trying to run two ...
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/...
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 ...
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 ...
0
votes
0
answers
117
views
Systemd path-unit for a symlink
Following the example described here, I created the .path and the .service thus:
[Unit]
Description=Watch for Foo in %i
[Install]
WantedBy=multi-user.target
[Path]
PathChanged=/tmp/%i.dbstatus
and ...
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....
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
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
vote
0
answers
46
views
What is the expected behavior for stopping an inactive systemd service that is configured to auto-start?
I have a service file foo.service that is configured to auto-start after a target init_done.target.
[Unit]
After=init_done.target
...
[Install]
WantedBy=multi-user.arget
If I run systemctl stop foo....
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
74
views
Why does my ASP.NET Core Web API need access to the user's home directory?
We have an API that was originally written using the ASP.NET MVC framework and hosted on Windows Server. We have now ported it to an ASP.NET Core 8 Web API, and want to host on Linux (Oracle Linux 9). ...
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 ...
0
votes
0
answers
94
views
How to write multi line entry to Linux log
My ASP.NET Core 9 MVC application runs as a service in Debian and logs into a journal.
Program.cs:
using Microsoft.Extensions.Hosting.Systemd;
var builder = WebApplication.CreateBuilder(args);
// ...
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, ...
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
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=...
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: ...
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
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 ...
0
votes
1
answer
69
views
url property wrongly treated as relative address when spring boot project run as a systemd service
I have a Spring Boot project that runs fine on my remote Ubuntu server (22.04) when run from the command line (via ssh). In this project, I am providing an H2 database location in the application....
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:
...
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. ...
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 <...
0
votes
1
answer
95
views
How to set the working directory for a Windows service created with pywin32
While creating a systemd service in linux, I could specify a WorkingDirectory in the service unit file. Is there any way to configure the working directory for a Windows service as well. I have some ...
-1
votes
2
answers
182
views
systemd service oom (out of memory) is not triggered [closed]
With following steps, I tried to trigger OOM on systemd service, but failed, what is missed? Thanks very much in advance for any suggestions :)
Build a binary which will ask for 3G memory total (30 ...
-1
votes
1
answer
97
views
ERROR: hellosystemd-1.00-r0 do_package: Didn't find service unit 'hello.service', specified in SYSTEMD_SERVICE:hellosystemd
I need to install a systemd service into my own image, but it is failing with following errors:
*ERROR: hellosystemd-1.00-r0 do_package: Didn't find service unit 'hello.service', specified in ...
0
votes
1
answer
92
views
systemd DVB frontend device targets not created
Since I upgraded my system from Ubuntu 22.04.5 LTS to Ubuntu 24.10, with new motherboard,cpu,nvme, using both kernel 6.11.7, the systemd DVB frontend device targets are not created.
Besides this, ...
1
vote
0
answers
62
views
How to detect if a Java application running as a systemd service is operating within an LXC container?
I am trying to detect if java app running as systemd service is operating inside lxc container from app itself through java code.
checking /proc/self/cgroup file for “lxc” string works if app is not ...
0
votes
1
answer
69
views
Monitoring a Rails application with monit service when ProtectSystem=strict is used in the systemd unit file
I have been using monit to monitor my Rails application for several years. It has worked very well for me.
Currently, when I try to setup the same configuration on the latest Ubuntu LTS (24.04.1) I am ...