Questions tagged [systemd-service]
The systemd-service tag has no usage guidance.
23
questions with no upvoted or accepted answers
2
votes
0
answers
2k
views
why consul systemd service is failing?
This is my consul.service file.
[Unit]
Description="HashiCorp Consul - A service mesh solution"
Documentation=https://www.consul.io/
Requires=network-online.target
After=network-online....
1
vote
0
answers
190
views
Systemd service with DynamicUser cannot write to its CacheDirectory
I'm running OpenSuse Leap 15.4.
I have created a unit file for the bazel-remote remote cache server, for the Bazel build system.
I wanted to use the DynamicUser feature to make the service more secure,...
1
vote
1
answer
473
views
Why qemu fails to start host only network on loopback when there's no other network on host?
Starting qemu-system-x86_64 with -nic user,ipv6=off,hostfwd=tcp::9022-:22
With only the lo interface (with 127.0.0.1 associated to it) present on the host, the vm will start, but any daemon trying to ...
1
vote
2
answers
611
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
vote
0
answers
18
views
Marking services for killing in a resource-starvation situation
We use systemd --user to run certain services of our own. In some cases, these "get out of hand" -- spawn way too many processes, which exhausts RAM and causes the machine to "thrash&...
1
vote
0
answers
3k
views
Run two scripts one after another with a systemd service
I have two scripts, what I would like to do is:
at 1am, the first one runs
once the first one stops, and this is a condition, the second one fires
So, should i use:
[Service]
ExecStartPre = script....
1
vote
0
answers
131
views
Generate systemd task on the fly
I'm writing a script to backup each mysql databases separately on from a mysql server, but instead of handling this inside the script I would like to rely on systemd to generate a backup job to get ...
1
vote
1
answer
222
views
Why echo text won't work within systemd service
This bash script worked fine alone:
#!/bin/bash
OtherIP=172.17.1.2
while [ true ]
do
echo "cannot connect to $OtherIP" >>pgha.log
sleep 2s
psql -h $OtherIP -U checker -c '\l' ...
0
votes
0
answers
102
views
Systemd sequencial stop of template unit instances
I have a template unit that that I have to created in order to start/stop some services running an a given port. something like [email protected], [email protected].
[Unit]
After=network.target
...
0
votes
1
answer
455
views
How can I connect standard output and error of a systemd service to a file with a date in the path?
I would like to run a server process under systemd, and append its standard output and error to a file, where the file path has a date in it, like this:
/initech/logs/tps-report-app/sales/2023/09/11/...
0
votes
1
answer
889
views
Is it possible to set CPUAffinity=0 for a specific process in its systemd service unit file?
Is it possible to set CPUAffinity=0 for a specific process (lets say httpd.service) in its systemd service unit file?
0
votes
0
answers
93
views
Is it possible to delay a systemd service indefinitely by "After" clause?
Currently I am working on this issue:
Service 1 is on another machine.
Service 2 is on this machine but need Service 1 available to function.
Service 3 is on this machine but need Service 2 to ...
0
votes
0
answers
925
views
Systemd service file location for locally-built software
This might be a mostly aesthetic problem, but it's been bugging me enough to put a little more effort into resolving it.
In my work environment, we rely very heavily on in-house developed software for ...
0
votes
0
answers
954
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 ...
0
votes
1
answer
350
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
240
views
systemd string formatting for instance parameter
I'm trying to set up a systemd service that takes a parameter, and uses it in a couple places. I think I'm very close: with my config file name [email protected], I can run systemctl start myservice@...
0
votes
1
answer
374
views
Custom systemd unit fails to start gnu screen and fork to background
I am trying to make systemd unit that starts a script inside GNU screen headlessly. I did base my work here on a couple of questions some had that were related. I also tested the ExecStart line in a ...
0
votes
0
answers
896
views
Ubuntu 20.04 Power LTS: How to disable "multipathd" service at boot time, from the petitboot shell?
Setup:
I have large number of multipath LUNs from SAN, connected to this system. Most of these LUNs are not formatted for the Linux env and needs to be reformatted before using.
The Problem:
To work ...
0
votes
0
answers
313
views
Can a bash script detect if it's **not** being run inside a `systemd` service?
I have a bash script. This script can be started as part of a systemd service (or transient systemd task with systemd-run). One can also run it stand alone.
How can I see if “the current script” is ...
0
votes
0
answers
287
views
Systemctl reports service failed after user manually restarted Apache. Can systemd and reality be synched without restarting processes?
I have an Apache instance that starts with a systemd unit. A user manually stopped and restarted the instance. Now systemctl reports the service as "failed". Other than stopping and ...
0
votes
0
answers
4k
views
redhat linux 8 systemd service error 203
Deployed a sample dot net core web api to EC2 instance in /var/www/hello-app folder using the user “ec2-user” in FileZilla
The folder contains the required dlls and other dotnet files
Installed ...
0
votes
1
answer
281
views
nginx.service is not starting after mount
I have a nginx that depends on a mounted drive.
My nginx.service has an entry with the RequiresMountsFor in the service unit like this:
[Unit]
RequiresMountsFor=/media/bar
But looks like it is still ...
0
votes
1
answer
701
views
Using find -exec in systemd ExecStartPre
I think it's fairly obvious what I'm trying to do here
# Rename Log File
ExecStartPre=/bin/find /data/db/log/*.log -type f -exec mv {} {}.`date +"%Y%m%d-%H%M"` \;
# gzip past log files (is ...