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

cd command not recognized by a systemd service script

Hi run Debian OS and I have a shell script that runs sphinx search. The script runs fine if I run it from terminal as below: sh /home/myuser/sphinx/run_sphinx.sh Here is the content of run_sphinx.sh #...
6 votes
2 answers
11k views

Adding a new DNS server with systemd-resolved

To access other machines on my network by their name, I have to add the following two lines to my /etc/resolv.conf: search foo.local nameserver 192.168.X.Y But any changes I make do not persist ...
1 vote
1 answer
2k views

Getting PID of dependency in systemd?

I would like to write a systemd unit file that needs to pass to the exec command the PID of one of its dependencies. In the unit file I would like to have: ExecStart=bar -p <PID of foo.service> ...
0 votes
0 answers
21 views

ubuntu 22.04 redis.service stops working after adding tls

A fresh install of redis on ubuntu 22.04: I changed supervised no to supervised systemd. When running systemctl start redis.service, everything works as expected. I now change the redis.conf file to ...
4 votes
2 answers
14k views

Grant a user sudo powers to start/stop/etc a systemd service w/o sudo password

I have one non-root user, and I would like to give them sudo permission to start & stop (etc.) a systemd service file without needing a password. I tried to just make the following file in /etc/...
0 votes
2 answers
766 views

systemd service definition for SAP (or any other application) start

I have issues to configure a systemd service for starting and stopping SAP (or any other appliaction). I am new to configuring systemd services and please have mercy asking "stupid" ...
0 votes
2 answers
30 views

Replacement of "su - user -c command" in systemd unit

Having read that using su - as part of an ExecStart= (ExecStop=) in a systemd unit is a bad idea, I wonder what the proper replacement is. When using some vendor-supplied scripts or commands (where ...
1 vote
2 answers
449 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 ...
0 votes
0 answers
28 views

systemd-journald for separate log namespace exits after 30s

I am trying to configure an additional systemd-journald / log namespace (on Debian bookworm) for the first time (because it seems to be the only possibility to configure different log storage amounts ...
0 votes
2 answers
259 views

What is systemd "refresh-policy-routes" [AWS Linux 2023]?

I'm trying to find the cause of an instance outage, which seems to be from a scheduled systemd refresh-policy-routes service, followed by a 404 Error call to EC2RoleProvider. After the error, all ...
0 votes
1 answer
28 views

systemd wait for Env variable from external to trigger service start

I have a VM which I'm controlling the boot up process via systemd and cloud-init. For cloud-init I have a script that performs initialization as follows: runcmd: - /etc/systemd/system/init.sh /etc/...
36 votes
4 answers
48k views

How to use the `$HOME` environment variable in systemd service files

I am trying to use the $HOME environment variable in the ExecStart. I tried many different things like $HOME and ${HOME} but nothing seems to be working ExecStart=${HOME}/bin/some-binary Anyone ...
0 votes
1 answer
4k views

Preventing systemd start conditionally based on configuration

I've been struggling with this for the last hours, and as far as I understand the documents, there isn't nearly any straight way around it. I have a configuration / state called IS_PAIRED, which is ...
11 votes
4 answers
41k views

How to limit memory for a service managed by systemd

I am aware of ulimit and I know how to limit memory for a process that I explicitly start, or start using a script. But in this case I have a service that is managed and launched by systemd. How can ...
0 votes
0 answers
44 views

Can't run startup script on Debian VM in Google Cloud - SSH and Serial Console Access Issues

I've been struggling for days with a SSH access problem on my Compute Engine VM (Debian GNU/Linux 10), with an error in the sshd_config file leading to the inability to restart the SSH service: 2024-...
1 vote
1 answer
96 views

Systemd service stops after start (only while booting)

I have a minimal systemd service that seems to work normally when started manually using systemctl start my-application.service And it stops normally using the corresponding stop command. For some ...
4 votes
1 answer
890 views

Systemd service not logging

I have a systemd service. No logs appear from it despite my best efforts. This is the service file: [Unit] Description=Load Balancer [Service] WorkingDirectory=/home/lb ExecStart=/usr/lib/jvm/jdk-20/...
0 votes
1 answer
52 views

Can I create a PID file for systemd services?

I have two systemd services that run after system start . I need to set CPU affinity for these 2 services but I can't do that manually because after every reboot or service restart , PID changes. Is ...
3 votes
2 answers
8k views

Failed at step EXEC spawning /usr/libexec/mariadb-prepare-db-dir

a bit of a newbie here so mind my obliviousness. I'm trying to install mariadb on a fresh Centos 7 server, though upon running "systemctl start mariadb.service" I get this malarkey: Job for ...
4 votes
3 answers
8k views

How to set custom port for DNS in systemd-resolved

I want to add local DNS server with port 8600 to systemd-resolved for request forwarding. I've tried to change /etc/systemd/resolved.conf like this [Resolve] DNS=127.0.0.1#8600 but this is not counts ...
1 vote
1 answer
34 views

Can I force the sequence of services in systemd?

I am working on a diskless system that starts up over PXE, with a read-only root directory mounted over NFS. I have set it up, so it configures its hostname during boot, and at a later point, mounts ...
1 vote
1 answer
61 views

Running systemd-run --user inside a systemd service

I have a web app that handles user input, and as part of that, runs some commands with systemd-run --user --scope ... to limit memory and CPU usage. The application runs fine when run normally, but ...
1 vote
3 answers
3k views

Accessing host services from systemd-nspawn containers

I've got a set of containers managed by systemd-nspawn. The containers should be (semi-)isolated from the external network, but at the same time should be able to access non-containerized services ...
16 votes
1 answer
22k views

"Excess arguments." while doing "systemd daemon-reload" during MongoDB configuration

I am following the instruction mentioned in : To install and configure the basic elements for MongoDB in Ubuntu. During "Configure MongoDB username and password", on phase 4 "Step 4 - Enable mongodb ...
2 votes
1 answer
6k views

Postgresql Service not Starting

I'm trying to start a PostgreSQL 10.10 server on an Armbian (Ubuntu Bionic with Armbian Linux 4.14.133-odroidxu4) device (Odroid Xu4). The server was previously working, but after a power failure, it ...
51 votes
5 answers
54k views

How to allow a user to use journalctl to see user-specific systemd service logs?

I am running user-level services in Ubuntu 16.04 LTS. For example, I have my test.service located at ~/.config/systemd/user/test.service. I was able to run the service by doing systemctl --user start ...
0 votes
0 answers
56 views

Understanding systemd dependencies on auto-created device units

I have a systemd unit ("leafnode.socket") that depends on a network device ("rath") being up. The socket unit has an explicit file in /etc, the device unit is (I believe) ...
0 votes
0 answers
133 views

change colors of systemctl and journalctl output

Error messages are displayed dark red on black. I'm visually challanged and cannot read red text on a black background. How can the colors of be adjusted in the output of systemctl and/or journalctl ?
1 vote
1 answer
73 views

Unusual Output in Nginx Status: Seeking Insights on Empty Strings in Process Information

My Nginx server (Ubuntu 22.04 LTS) is operating as expected, and I am not aware of any issues. However, I have noticed an unusual output in the status information: sudo systemctl status nginx ● nginx....
14 votes
2 answers
57k views

Systemd: how to start service after another service started

I have these two services, one is Google start up script service and second one is redis service, I want to start redis service once the startup script service is started and done, I have these ...
1 vote
0 answers
29 views

Support Multiple Service Dependencies in Requires Directive in RedHat 8.9

Thank You for looking into the question. I have a Systemd service lets call it main-application.service which needs service testA.service and testB.service started before start of itself. Following is ...
8 votes
2 answers
9k views

How do you configure multiple systemd services to use one timer?

I've noticed some significant variation in approach in some systemd documentation and how-to documents concerning how to configure one or more services to use the same timer. As far as I have been ...
0 votes
0 answers
49 views

Processing error occurred

When trying to retrieve References for 'Reference_ID_Type'='Request_for_Quote_ID', Workday throws the following error: *[SOAP-ENV:Server.processingError] Processing error occurred. Can't get all ...
0 votes
1 answer
117 views

Can't run systemd inside docker container on specific host

I'm migrating a containerized deployment from a Ubuntu 20.04 host to a Ubuntu 22.04 one. The container runs systemd, and it works fine in the 20.04 machine: $ docker run -i -d --name test-cvmfs-...
0 votes
1 answer
50 views

Does systemd require a password in the unit file in order to run gunicorn under a specific user?

I want to run gunicorn as a service on a production server and have looked at many examples of the systemd unit file which are similar to this Description=Gunicorn instance to serve application After=...
0 votes
0 answers
56 views

error trying to ansible with become machinectl

I've tried to make work some automation with ansible inside a systemd-nspawn container with machinectl commands. I've found a become machinectl ansible plugin that seems to fit, but there's something ...
2 votes
2 answers
2k views

Nftables "Error: Interface does not exist" after reboot

at using nftables on a new virtual machine (Debian 10) I installed and configured nftables as automatic service (systemd). I use also LXC and use an additional interface (lxcbr0). I recognized the ...
0 votes
1 answer
1k views

systemd-resolved.service not working in Ubuntu 22.04 LTS VM created in DevStack (OpenStack)

Recently I installed DevStack (OpenStack distro) on my servers. I uploaded there Ubuntu server 20.04 LTS cloud image as well as Ubuntu Server 22.04 LTS cloud image. The images came from https://cloud-...
0 votes
1 answer
47 views

systemctl --enable enables socket instead of service

As it is common, lxd provides two systemd units: lxd.socket and lxd.service. When lxd.socket is started, it starts lxd.service as soon as any application (such as lxc) tries to access the lxd daemon. ...
0 votes
0 answers
139 views

How to log systemd output to container logs

I run a rootless container system container with podman, i.e. systemd is running inside the container as entrypoint. I cannot figure out, though, how I can get the logs of the container, i.e. output ...
1 vote
1 answer
133 views

systemd daemon that should never terminate deactivates "successfully"

I run a daemon process under systemd (that sits around and watches a bunch of RSS feeds and sends notifications about them). It's a (Scala) JVM process that's essentially an infinite loop. The process ...
0 votes
1 answer
135 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!
0 votes
1 answer
178 views

Is it the OS or Samba that is restricting access to systemd on a shared folder?

I have two Rocky Linux 9 servers that we can call svr1 and svr2. svr1 has Samba service installed and share the folder /home/rocky/shared_folder with this configuration: [global] # workgroup = ...
43 votes
5 answers
145k views

Force systemd timesyncd to sync time with NTP server immediately

I've configured systemd timesyncd to get it's time from a NTP server: /etc/systemd/timesyncd.conf > NTP=ca.pool.ntp.org systemctl restart systemd-timesyncd.service timedatectl set-ntp true The ...
0 votes
1 answer
103 views

Why isn't my unit container running?

I'm trying to move the manual launch of our Podman LakeFS container to a service at boot. I was suggested to use Quadlet and I'm following this guide I converted our script/command: #!/usr/bin/bash ...
0 votes
0 answers
107 views

How to trouble shoot timesynd service

How to trouble shoot the symptom where timesyncd service has been killed and cannot be found. Timesyncd has been installed. $ sudo apt -y install systemd-timesyncd Reading package lists... Done ...
-1 votes
1 answer
159 views

Automating Account Creation

I’ll try to be brief. The current situation: If we have new hires, the HR will share the names with the IT department to create emails for them and give them access to OSS app (OKTA) that we’re using ...
0 votes
0 answers
156 views

Combining DHCP with static IP using systemd

Basically I want to set a static IP with systemd, but I want to get everything else (read "the routes of the network") via DHCP. This is easily done on macos for example which has the option ...
0 votes
1 answer
11k views

Selinux is preventing to start Tomcat

I have a problem when I launch tomcat on RHEL 8: [root@TEST ~]# systemctl restart tomcat.service Job for tomcat.service failed because the control process exited with error code. See "systemctl ...
2 votes
1 answer
5k views

CentOS 7 rpc_pipefs mount options not persistent after reboot

I'm trying to mount rpc_pipefs with a nodev option. Initially, I tried doing this by editing the /etc/fstab file and adding an entry for it. Tried: sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs ...

1
2 3 4 5
31