Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
5 views

Systemd dependency not working

I am fighting trying to make a dependency between services to work. I've looked everywhere and it looks like I'm doing the right thing, but unfortunately, it is not working. I want to have my TEST ...
1
vote
0answers
11 views

How to achieve rolling restart with systemd?

I have 2 servers started as independent systemd units. They are listening on port 3001 and 3002 respectively. I want to achieve a rolling restart (also known as rolling update or ramped update, more ...
0
votes
0answers
9 views

Ubuntu won't mount through fstab after upgrade to Systemd

I have a data server and two VMs. The first VM, clone14, runs Ubuntu 14.04. The second VM, clone16, was cloned from clone14 and then upgraded to Ubuntu 16.04. Both VMs have the exact same /etc/...
0
votes
0answers
8 views

Systemd fails bringing up OpenVPN service because it triggers raising interface that already exists

I have an openvpn server that's supposed to be started by systemd. Just recently the service failed to come up, because for some reason it triggers raising network interfaces but ifup fails to bring ...
0
votes
0answers
15 views

How to translate old 'ip' commands to netplan config for Ubuntu 18.04 on AWS EC2

Previously I had a script to apply my second static IP and route on the default NIC on boot like so: ip addr del 192.168.123.123/32 dev ens5 ip route add 172.25.65.0/24 dev ens5 src 192.168.123.123/...
0
votes
0answers
44 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 ...
-1
votes
1answer
26 views

systemd-resolvd seems to make up a non-existing AAAA entry?

One of my worker servers is experiencing problems connecting to a central server. This happened suddenly, it worked earlier, and it still works on an identical other worker. After some inspection the ...
0
votes
0answers
23 views

Shutdown node if systemd unit failed to restart

Is it possible to shut down a host if systemd unit failed to restart after several attempts? Something like "Systemd-based STONITH" ))) Is there maybe hooks or dependencies mechanism in unit-files?
1
vote
2answers
46 views

systemctl shows inactive / dead, but service is running

I would like to manage a TeamSpeak 3 server with systemd (systemctl). When I start / stop / restart the TeamSpeak 3 server using systemctl command, systemctl is returning the correct status: $ ...
0
votes
1answer
37 views

Why is “systemd-resolved” required?

I am in the process of upgrading my production server from Ubuntu 14.04 to 18.04 and noticed that there is something called systemd-resolved in 18.04 which run a local DNS cache of sorts. [1] Why is ...
0
votes
0answers
20 views

systemctl list-unit-files, but do not list aliases

Is there a way to stop systemctl list-unit-files from printing aliases? Example: foohost:~ # systemctl list-unit-files | grep -i http httpd.service enabled ...
3
votes
1answer
54 views

Why does systemd reject my unit name as 'neither a valid invocation ID nor unit name'?

I need to override the ExecStart Parameter of a systemd template. I have confirmed that the unit file exists & passes validation. Adding a unique-name@.service.d/override.conf file works well on ...
2
votes
1answer
37 views

systemd starting service even if service in requires wont start

I have a test systemd service that I am testing. I have test.service which looks like this [Unit] Description=Dovid Demo Service After=mariadb.service Requires=mariadb.service [Service] ExecStart=/...
0
votes
1answer
20 views

Build strongswan-systemd using the “apt-get” repo on Ubuntu

I have built strongswan using the legacy ipsec interface, however reading the following document I am able to build the newer version with the systemd unit file approach: https://wiki.strongswan.org/...
0
votes
0answers
20 views

Is it possible to get systemd to monitor a process that it does not start?

Some of our startup scripts have an ExecStart line that runs a curl command to start jobs from our Jenkins build server. Systemd does not know anything about the job that is started as a result of ...
0
votes
0answers
7 views

best method to add workers to gunicorn

So I have seen yet so far 3 ways to add workers to gunicorn. Through flags, through systemd .service and through a configuration .py file I am overhelmed and was wondering which is the best way to ...
0
votes
1answer
45 views

How to get a Linux container to connect to the internet through a bridge?

My Linux host has a bridge device br0, and I have created an arch Linux container but it isn't able to access the internet. When the container is started the veth device appears on the host: [host]# ...
1
vote
1answer
28 views

Runlevel pattern for systemd

Suppose I have two different "runlevels" setup via "targets" in systemd - before.target (a minimum bootstrap set of services enabled) and after.target (run everything). Right now I do this when I ...
0
votes
0answers
57 views

systemd: Shutdown socket-activated service / disable socket-activation

I have an HTTP service (let's call it Foo) with systemd socket activation. I would like to support this setup: monitoring service tells Foo to stop (e.g. POST /stop) Foo finishes it's (potentially ...
0
votes
0answers
19 views

auth.log: systemd Log Spam, suspend.target is masked

With my server I have noticed that systemd is spamming the auth.log file with GBs of this: Jan 29 15:40:14 server systemd-logind[438]: Suspending... Jan 29 15:40:14 server systemd-logind[438]: Failed ...
1
vote
0answers
22 views

Openvpn tun0 loses IP and route

My OpenVPN client setup just stopped working, maybe/likely linked to a recent update of Debian (testing). The end result is that the openvpn daemon looks happy and gives me the right syslog messages, ...
0
votes
1answer
11 views

nodejs server only works when started from cli

I'm trying to run a node app on my personal blog, which does display the static content, but cannot send POST calls back to the server when I start the server via systemctl. However when I run node ...
0
votes
0answers
23 views

How add create pidfile to old sysv init script on CentOS7?

I have old sysv init script for start tomcat on CentOS7 I know: need create pid file in sysv init script. Script have code for create pid file. But pid file not created How add create pidile to ...
0
votes
1answer
18 views

systemd attempts to mount davfs2 too early - before DHCP address received

I'm trying to get davfs2 to mount a WebDAV folder automatically on debian stretch at boot. It seems that systemd attempts to mount the folder with mount.davfs before the DHCP client has an IP address ...
1
vote
1answer
30 views

SNMP service crashes on reload - Kernel error

My server has a SNMP service (NET-SNMP) started with systemd. It runs well, except that every 3 days, at 3:00 PM, the service crashes. I notice in the log that there is a reload of the agent. Then it ...
1
vote
0answers
37 views

Send mail when ClamAV detects a threat using systemd

Most of the guides for ClamAV discuss integration with syslog, and it is possible to configure syslog to send a message on certain logs. But, my system is running systemd, with no active syslog....
0
votes
0answers
36 views

Preview or debug (dry-run or trace) systemctl actions (start, stop, restart, etc.)

Without having to manually trace dependencies, e.g. with systemctl show or systemctl cat, and manually inspect the state of the system with systemctl status and systemctl list-units, is there a way to ...
0
votes
0answers
13 views

systemd: Failed to enqueue exit.target job: Access denied

I searched and searched for reason for this failure in syslog: Jan 15 23:12:02 host systemd[29652]: Failed to enqueue exit.target job: Access denied I'm not using SELinux or anything. What's the ...
1
vote
0answers
25 views

User Resource management: cgroups + systemd + ssh

I am trying to limit the memory of a single user that keeps crashing our OpenSuse Server. What I have done is as desribed here, to modify the limit of the user's slice via systemctl set-property ...
2
votes
0answers
15 views

Run a systemd timer only when network traffic is low

I would like to run a systemd timer daily, with lax time accuracy. However, I would want the timer to run only if the network is continuous idle/low load (for at least 2 minutes). Is there any way to ...
3
votes
1answer
280 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
0answers
39 views

Trying to setup a Django app using gunicorn and systemd

Trying to setup a Django app using Gunicorn and Systemd while following this tutorial by DigitalOcean. When I run curl --unix-socket /run/gunicorn.sock localhost, it returns with curl: (56) Recv ...
1
vote
1answer
65 views

Why does my PostgresQL 11 database cluster instantly shutdown after being started via systemctl?

I have installed PostgresQL 11 via apt-get on Debian 9. After installation I deleted the default database cluster and removed all services auto-starting that cluster. I've now ran initdb to initialize ...
0
votes
1answer
52 views

systemctl shows service file not-found, even though .service file is present

I am running into a weird issue. I have a service file to start a custom application. systemctl command shows LOAD as not-found resource-service-prod-prod.service not-found active running ...
1
vote
1answer
71 views

Why is dbus-org.freedesktop.timedate1 started so frequently?

I have some Ubuntu 18.04.1 servers. They all show this service being started rougly every 10 minutes. Jan 7 06:29:05 csrf-prod1-vm dbus-daemon[434]: [system] Activating via systemd: service name='...
0
votes
0answers
48 views

Ubuntu 18.04 server - how to change or adjust operating system logging for a certain systemd service?

I've tried quite a bit of Googling on this but have not come up with much so I figured I'd ask here. Here's my current problem: I'm running Ubuntu 18.04 server pretty much stock. The purpose of the ...
0
votes
1answer
20 views

aws cli not configured when called from python script inside systemd service?

I am using an EC2 instance with ubuntu 18.04 and python 3.6. I am running a python script uses aws cli calls for various things. Before running the script, I configured the aws cli with my access ...
0
votes
0answers
28 views

Using systemd to automatically start, restart, stop, and daemonize a script

I have a simple script which launches a process (optionally as a daemon) and saves its pid to a file. I can invoke it manually. I'd like systemd to: Run it on boot Restart if it fails Run it as a ...
0
votes
1answer
53 views

Enforce usage of VPN-provided DNS servers on Ubuntu 18.04

On a vanilla Ubuntu 18.04 headless server, the OpenVPN client is used to connect to a remote network in tap mode. The address, default gateway, DNS servers etc. are provided by a DHCP server on the ...
0
votes
1answer
76 views

cachefilesd systemd service failures [closed]

gentoolaptop / # systemctl status cachefilesd ● cachefilesd.service - Local network file caching management daemon Loaded: loaded (/lib/systemd/system/cachefilesd.service; enabled; vendor preset: ...
0
votes
1answer
166 views

SELinux: pam_systemd(sudo:session): Failed to connect to system bus: Permission denied

On one of CentOS 7 servers I cannot perform sudo from nrpe user (Nagios daemon remote monitoring). Error message: Dec 31 08:28:10 ip-172-31-36-176 sudo: pam_unix(sudo:session): session opened for ...
1
vote
0answers
44 views

How can I talk to another user's systemd user process?

From a script that runs as root, I'd like to start a systemd user service. I've tried the most obvious thing: sudo -u $user systemctl --user <etc> but I get Failed to connect to bus: No such ...
0
votes
1answer
55 views

convert upstart to systemd - run command as root, spawns command off as another user

I need help with converting an upstart .conf into a systemd .service. Essentially what my .conf file does is this: exec su -l foo -c 'cd /var/www/path/to/file ; bundle exec puma -C config/puma.rb' As ...
1
vote
1answer
32 views

systemd OpenVPN instance dependency

Got an OpenVPN instance X that requires a Dante proxy to be started on the same machine (as it will be using the proxy to connect to its target). I'd like to setup a dependency in systemd for openvpn@...
0
votes
0answers
42 views

Certbot renew running but not renewing

I've installed certbot on an Ubuntu 16.04 host using the PPA. I can see that the certbot timer is configured to run and that it's running: jaraco@punisher:~$ sudo systemctl status certbot ● certbot....
1
vote
1answer
67 views

How to start binary file from Systemd service

So, I have start.sh file to start imagecache service. And I have executable binary file "imgproxy" and I need start it and pass to it two parameters like as text file. Body of start.sh file: export ...
0
votes
0answers
25 views

Disabling systemd messages that interfere with running BASH script

How can I disable systemd messages that pop up in my BASH script once in a while (for example, after I login to the machine via SSH from somewhere), like in the screenshot below ? The BASH script uses ...
0
votes
0answers
44 views

Is there a reason why a daemon would start with /etc/init.d/bacula-fd start and not with systemctl start bacula-fd?

I installed a bacula-fd client on a machine. This was done through a make install, and make install-autostart-fd, that generated a /etc/init.d/bacula-fd Now running /etc/init.d/bacula-fd start runs ...
1
vote
0answers
72 views

journald forwarding to syslog seems to be lagged

I'm seeing an issue on a Ubuntu 16.04 box where the copying/forwarding of journal messages to /var/log/syslog seems to be delayed: theuser@host:/etc/systemd$ sudo journalctl -n 1 && sudo tail ...
2
votes
1answer
72 views

Run a backup script at systemd shutdown (e.g. copy logs to S3 before instance termination by auto scaling)

I am trying to send log files to S3 before instance termination. I created .service file in /lib/systemd/system-shutdown/upload-backup.service, which is this. Description=Testing Before=shutdown....