Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
1answer
27 views

`systemctl disable --now postgresql` doesn't stop the daemon

I'm running Debian Stretch and PostgreSQL 10 from apt.postgresql.org. When I do: postgresql disable --now postgresql the database server doesn't stop. It says: Synchronizing state of postgresql....
0
votes
0answers
25 views

systemd: how to enable/disable network interface with local login?

We have a setup where students log in (using LDAP auth) to Ubuntu 16.04 machines, where two network cards are installed: one to connect to the LAN and Ethernet, and the second one to expose a ...
0
votes
0answers
17 views

TightVNC Server sometimes fail to start on RHEL7.4

I've a RHEL 7.4 box with TightVNC service enabled on boot and sometimes the service fails to start with a PAM permission denied error: systemd[2027]: pam_nologin(login:account): conversation failed ...
1
vote
0answers
30 views

Journalctl seems to be ignoring since and until

I'm trying to get the logs of a problem that's been happening for over a week by this point. I'm trying to use journalctl to print the logs but it doesn't seem to give me anything more or less than ...
0
votes
0answers
19 views

Upgraded 14.04 to 16.04 and boot is dropping to initramfs prompt

Anyone know how to fix this? I upgraded a system with LVM partitions for /, /var, /usr, /home and it seems like initrd can't figure out the LVM scheme. I found a bugreport on launchpad regarding this ...
0
votes
0answers
14 views

Auto start and stop iscsi session

In SLES12 with systemd service running, I need iscsi session to stop and start automatically. The steps I need to follow is as follows. On stopping. a)Umount partitions b)Logout iscsi session On ...
1
vote
1answer
44 views

Redis with custom data dir: systemd config file changed automatically?

I'm running Redis 4.0.9 on Ubuntu 18.04.1 LTS with a custom data dir for the RBD file. To make this work, besides updating the dir in redis.conf to the new location, I also had to update /etc/systemd/...
-2
votes
0answers
21 views

Frequent restarts of systemd-resolved on Ubuntu 18.04

After upgrading an EC2 instance to Ubuntu 18.04 I started getting occasional errors Resolving DNS for my database server in my PHP scripts like the following: Uncaught Exception: PDOException: PDO::...
0
votes
0answers
32 views

How to cause “OnFailure” for systemd service? If “stop/restart/reload” aren't defined for it

I have a systemd script: [Unit] After=syslog.target Requires=mysql.service OnFailure=-/bin/bash -lc 'source /home/ubuntu/.profile && ./script/my_script_for_failure.sh' [Service] ...
2
votes
1answer
52 views

How can I stop a systemd service with cron?

I have a simple crontab entry that is supposed to stop a service, yet it does not work. * * * * * systemctl stop nginx I even tried: * * * * * /bin/systemctl stop nginx Since that't the location ...
0
votes
1answer
24 views

Systemd service for a ruby rake job and environmental variables

I have many environmental variables that are required to run my ruby rake job. This job will be supervised by systemd. How can I export all the environmental variables? And also export them in such ...
-1
votes
0answers
36 views

Store systemd logs (journalctl) in PostgreSQL database table [closed]

How can I store the systemd logs (journalctl) in PostgreSQL database table? I would to analyze the logs (aggregations/sums/....) with SQL. Here the JSON format of journalctl gets described: https://...
0
votes
0answers
11 views

x2golistsessions runs every 2 seconds

I've noticed in my logs that x2go runs every 1 or 2 seconds: /var/log/auth.log:Nov 29 00:15:18 penguin sudo: dargaud : TTY=pts/0 ; PWD=/home/dargaud ; USER=root ; COMMAND=/usr/sbin/...
-1
votes
1answer
23 views

Parsable output from systemctl (for example list all units)

I am not happy with the output of systemctl I have a script which parses the output of systemctl list-units -t service --full --all The beginning of the output look like this: UNIT ...
0
votes
0answers
14 views

How to make journalctl recognize user-defined fields?

Journalctl's manual says: New fields may freely be defined by applications, but a few fields have special meaning. However I don't see a way to actually introduce my own field that journalctl ...
3
votes
1answer
130 views

Why am I missing /var/run/sshd after every boot?

I'm running a Ubuntu 16.04 container under Proxmox 5.2-11. After applying the latest round of patches1 I'm unable to login at the console or over ssh. I mounted the container root FS on the ...
0
votes
0answers
63 views

How to configure wireguard wg0 interface in lxc container with systemd?

I have installed wireguard.ko on the host OS and wireguard tools on guest container. I want to configure container's wg0 interface without adding eth0 into container (as in this article). I'm ...
-1
votes
0answers
51 views

Enabled systemd unit is “inactive (dead)” after boot

I'm trying to create a swapfile in a CoreOS, official way (documented here) don't seem to work for me. Thus, I made a custom cloud-config file, as following : #cloud-config coreos: units: - ...
1
vote
1answer
18 views

Systemd - running custom VM shutdown script before the standard libvirt-guests.service

On a KVM host I have a few VMs with legacy OSes that do not listen to ACPI shutdown event. As it happens on Debian 9.5 host, on shutdown the libvirt-guests.service waits for 5 minutes for each such VM ...
7
votes
2answers
224 views

Servers fail to bind to addresses at boot

I'm dealing with a known issue in RHEL 7 whereby services that specify an address to bind to will not start correctly. I've found a number of similar reports, many say they have been resolved with ...
0
votes
1answer
24 views

rsnapshot through nfs: failed to preserve ownership|cannot access errors

Trying to rsnapshot to an nfs share I get some ownership and access errors, even if I can visibly do any operation on my shares with UID 1000 and GID 1000 on both server/client. Server exports /etc/...
1
vote
1answer
56 views

What does INVALIDARGUMENT mean?

I am searching all over internet but could not find any information about INVALIDARGUMENT . After stopping service in systemd, I got this response. Oct 18 21:17:04 BSU00383 systemd: Stopping ...
1
vote
1answer
41 views

list enabled systemd service instances

I'd like to list all enabled service instances. The following lists enabled services, but only shows the service, and not individual instance: systemctl list-unit-files --state=enabled The ...
0
votes
0answers
28 views

unbound.service service unit slow start/restart on 1 VM and fast on another

I am debugging an issue with Unbound (DNS Resolver software) on CentOS Linux release 7.5.1804 (Core). I have 2 VMs in different environments that are supposedly running the same Unbound software. [...
1
vote
1answer
33 views

What's the recommended way to deal with controled processes if CGroups fails?

I've been using the service unit bellow to start a couple of process that happens to have a high CPU and disk bandwidth usage when running. Since the processes I want to limit don't have a way to ...
2
votes
0answers
97 views

Hide a systemd service for non-root users

I have a custom service entry in systemd on Ubuntu 18.04. The main executable is a script which creates some processes: foor@bar:~$ systemctl status XXXXXX.service ● XXXXXX.service - XXXXXX Loaded:...
0
votes
1answer
39 views

systemd service with multiple After

Is it possible to create a service that depends on several other services? What is the right syntax? Such as: [Unit] Description=service description Wants=network.target After=network.target After=...
1
vote
1answer
40 views

Systemd PrivateTmp=true security implications

I monitor the available disk space on Ubuntu servers using Nagios Core, NRPE and check_disk. With previous Ubuntu versions, I used to get an output similar to this: DISK OK - free space: / 43754 MB (...
1
vote
1answer
30 views

setcap breaks systemd permissions

adding SMART plugin utility to collectd version 5.8 get a warning about lack of permissions to collect I/O data: Nov 9 13:27:40 db07 collectd[35127]: smart plugin: Running collectd as root, but ...
1
vote
2answers
412 views

Docker service not able to start anymore because of modprobe error

I just ran in some issues with my server running docker that I cannot fix myself. Im using Docker version 18.09.0, build 4d60db4 with Ubuntu 16.04.5 LTS. During the day I noticed, that my docker ...
1
vote
1answer
43 views

How can systemd autostart and control VirtualBox guests?

In my particular case, with a new server installation of Ubuntu 18.04 Bionic and VirtualBox-5.2.20, it appears the old method of auto-starting guests is no longer available. Not that it was that ...
0
votes
1answer
38 views

Failed to create directory or subvolume “/var/run/celery”: Permission denied

I'm trying to create folders in /var/run for pids for celery processes. I've created (as root) a celery.conf file at /usr/lib/tmpfiles.d/celery.conf containing only the following line: D /var/run/...
1
vote
2answers
25 views

Set of systemd services that require common initialization phase?

In systemd, I need to setup some services, which depend on one common "initialization" service, that must finish before they are started. Also, I would like to ensure, that the worker services and the ...
0
votes
1answer
40 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 ...
3
votes
0answers
54 views

Increase disk detection timeout at boot with Linux/Systemd

I have a machine with a lot of disks, and an extra SAS controller in HBA mode. This seems to cause Linux to think for at least 8-10 seconds once in initramfs before the disks actually appear. The ...
1
vote
1answer
65 views

How can sshd be configured to have high CPU priority

When a server is overloaded, what is a way under systemd to give ssh a high priority to ensure a remote ssh connection gets a priority to resolve the critical situation?
0
votes
0answers
30 views

Changing logging level for segfault of service managed by systemd

We have a Python daemon managed by systemd that occasionally hits a segfault calling out to a C library. While we're fixing this segfault issue, we want the logs to clearly indicate to us when the ...
0
votes
0answers
23 views

tmpfiles.d doesnt work, but config exists

I have already: [root@X]# cat /etc/tmpfiles.d/mail.conf f /var/log/ramdisk/dovecot.log 755 root root - - f /var/log/ramdisk/mail.log 755 root root - - f /var/log/ramdisk/fetchmail.log 755 root ...
0
votes
0answers
24 views

Enable systemd-coredump for NixOS/Linux

I'm trying to enable systemd-coredump for NixOS/linux, and I'm trying to set the following: echo '|/run/current-system/sw/lib/systemd/systemd-coredump %p %u %g %s %t %e' > /proc/sys/kernel/...
0
votes
1answer
35 views

Systemd stop/disable all templated services that don't match a variable

How can I programmatically stop/disable all templated systemd services which don't match a specific variable? For example, I am running myservice@v1 and I want to stop/disable services which match ...
0
votes
0answers
6 views

Docker container port mapping only works once per restart

My system info. Gentoo 64 bit Docker version 18.03.1-ce, build 9ee9f40 Systemd NetworkManager After I installed and started the docker service, I was able to launch the nginx container and access ...
0
votes
1answer
136 views

Cannot use `systemctl --user` due to “Failed to get D-bus connection: permission denied”

I'm trying to set up user-level services, using this answer to a similar question. I have create the required files and rebooted. I'm making progress because I now get "Failed to get D-bus connection:...
2
votes
0answers
52 views

sudo log entries don't show username on Debian Stretch

For some reason, the username of the user calling a command with sudo is not shown in the system log: $ journalctl -ef sudo[30160]: pam_unix(sudo:session): session opened for user root by (uid=0) ...
1
vote
1answer
51 views

Can you send console commands to a node-based systemd service?

I have a simple node.js script that accepts console commands using readline. I've set it up to run as a systemd service (on Debian 9): [Unit] Description=Web Game Server [Service] ExecStart=/usr/bin/...
1
vote
0answers
41 views

What could cause a systemd service stop to end with job being canceled?

Occasionally when stopping a systemd service with systemctl stop test-server it will fail mentioning that the job was canceled: Unable to stop service test-server: Job for test-server.service ...
-2
votes
1answer
156 views

Killing systemd service with and without systemctl

What is the difference between killing an running daemon systemd service like this : kill -SIGKILL 3645 and systemctl -s kill -SIGKILL 3645 where 3645 is the pid of the systemd service.Also are ...
0
votes
1answer
16 views

`journalctl -f -m` does not interleave remote and local

I currently have a 2-server setup (3 servers in total, one still to be configured for this) with one server using systemd-journal-remote (.socket & .service) to collect all log entries from the ...
0
votes
2answers
65 views

centOs : system time getting reset back to UTC after changing it using timedatectl

I have a Centos machine with version 7. I am trying to change the system time using the timedatectl command. The time gets changed but after a few seconds it gets reset back to it's original time. [...
0
votes
0answers
39 views

Systemd docker mongo error: cgroup is empty

Trying to run mongodb in docker using systemd mongod.servivce file for systemd: [Unit] Description=mongodb in docker After=network.target docker.service Requires=docker.service [Service] User=root ...
0
votes
0answers
14 views

systemd running process via scl, my process does not recieve SIGTERM

I have a systemd service called sitesdb-job-runner.service with the following config: [Unit] Description=SitesDB Background Job Runner After=network.target mariadb.service [Service] Type=simple ...