Questions tagged [systemd]

Systemd is a system management daemon designed for Linux. Use this tag for *programming questions* using systemd or its libraries. Questions about *configuring the daemon* (including writing unit files) are better directed to Unix & Linux: https://unix.stackexchange.com.

Systemd is a system management daemon designed for Linux and programmed exclusively for the Linux API. For systems using it, it is the first process which is executed in user space during the Linux startup process. Therefore, systemd serves as the root of the user space's process tree.

2384 questions
0
votes
0 answers

How to convert a systemd service to docker container?

I have an existing custom service at /lib/systemd/system/custom.service with: After=network.target remote-fs.target nss-lookup.target [Service] Type=simple User=customuser ExecStart=/opt/customservice…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
0
votes
0 answers

systemctl enable gunicorn fails with error "/etc/systemd/system/gunicorn.service:8: Missing '='."

I am deploying Django application working on web server using gunicorn locally on WSL. I need to enable needed systemd files. When I run command systemctl enable gunicorn I get error "/etc/systemd/system/gunicorn.service:8: Missing '='. Failed to…
user2976612
  • 145
  • 1
  • 8
0
votes
0 answers

Celery worker exited prematurely on restart using systemd

I'm using celery with systemd. I noticed that most times on restart, I lose the workers mid-task. From the celery multi documentation, it seems like the celery multi stopwait should be waiting for the tasks to finish. Got the following error on…
Ankit
  • 3,878
  • 5
  • 35
  • 51
0
votes
0 answers

Spinning up Gunicorn behind Nginx for multiple Websocket threads

I'm using Gunicorn behind nginx for a websocket and web server. According to the documentation, the only way websockets works in this configuration is if the number of workers is 1. I would like to add a bit more scale - my service is likely to be…
aronchick
  • 6,786
  • 9
  • 48
  • 75
0
votes
1 answer

'nfs-server' state in 'service_facts' differ from 'ansible.builtin.systemd'

Running a CentOS 8 Stream server with nfs-utils version 2.3.3-57.el8 and using ansible-playbook core version 2.11.12 with a test playbook - hosts: server-1 tasks: - name: Collect status service_facts: register: services_state …
Enok82
  • 163
  • 1
  • 13
0
votes
0 answers

actual date in stdout outputfile?

I want to run a service an my Ubuntu-machine with an outputfile (StandardOutput). The outputfile should have the actual date in its filename and should change every day. Is this somehow possible? If "yes", how? thanks for help
Oxaluz
  • 1
0
votes
0 answers

How to Run Systemd with Asan(Address Sanitizer)

When I use asan to compile the rpm package of systemd: Add the following information to the systemd.spec file: export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS=$RPM_LD_FLAGS CFLAGS="$CFLAGS…
huyubiao
  • 1
  • 1
0
votes
1 answer

Failed to stop Apache Spark Master or Slave using Systemd

Perspectives Actually I needs to configure two service files. One for Spark Master and another for Spark Slave (Worker) node. Please find the environment and service configuration as…
Śhāhēēd
  • 1,812
  • 6
  • 23
  • 44
0
votes
2 answers

systemd watchdog for frozen application

I was checking how the watchdog is implemented in systemd. I saw some examples. In these examples I couldn't see that application sends feedback to systemd, that it is alive. How systemd will know and restart application if it is frozen? Because in…
czrty
  • 101
  • 1
  • 9
0
votes
3 answers

Entrypoint of systemd container for Gitlab CI

I'm building a docker image for running Gitlab CI jobs. One of the components needs systemd up and running inside the container, this is not trivial but there are several guides on the web so I managed to do it. Part of the process requires to…
Nicola Mori
  • 777
  • 1
  • 5
  • 19
0
votes
1 answer

Bash Script Return EmptyString when application running on systemd service

I have application FastAPI which I run directly through below command gunicorn app.main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0 It works fine. Now I serve this app through systemd service [Unit] Description=To…
Salman Mushtaq
  • 341
  • 4
  • 23
0
votes
1 answer

Why does my d-bus systemd command to start and stop services fails with permission error on embedded system with multiple users

I am using an embedded system that has multiple users like 'root' and 'user1'. I am running a c++ binary logged in as 'user1' and It fails to start / stop a service with a permission error. The same binary when running in root works fine. Here is…
preetam
  • 1,451
  • 1
  • 17
  • 43
0
votes
2 answers

Linux service "Failed with result 'start-limit-hit'." error while trying to run jar file from automated script?

I have some scripts to restart a java jar service in linux machine taken from this post and here is my service script: [Unit] Description=demo restarter After=network.target [Service] Type=oneshot ExecStart=systemctl stop…
abidinberkay
  • 1,857
  • 4
  • 36
  • 68
0
votes
1 answer

Anconda env. python script autostart after reboot

having a strange behaviour. Setup: Debian 11 server on Proxmox added user mupsje (modded for sudo) installed anaconda3 on mupsje and root. created env discordbot. directory: /home/mupsje/discordbot/ sh. file: on_startup.sh…
Mupsje
  • 1
  • 1
0
votes
1 answer

Where is dns_stream_ref() definition located?

I am looking for a definition of the function dns_stream_ref() in the source tree of systemd. The declaration was found in resolved-dns-stream.h, this function is called from some source files. However, there isn't any definition of this function in…