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.

systemd, created by Lennart Poettering and Kay Sievers, is a modern replacement for the traditional Linux init, whether System-V or BSD-style initscripts. Its main features include the ability to express dependencies between services and aggressive parallelization of service startup.

1471 questions
20
votes
1 answer

systemd: how do I view journals with journalctl without switching to root on CentOS 7?

If I run journalctl as nonroot, I would get the following message: No journal files were found. But switching to root, or using sudo gives me the journal. How can I view journals without switching to root (e.g. which group should I add myself in)?…
xuhdev
  • 890
  • 2
  • 8
  • 20
19
votes
5 answers

Redis not starting with systemctl

I have installed redis on an ubuntu 16.04 machine and if I run /usr/local/bin/redis-server /etc/redis/cluster/7000/redis.conf it starts up and I can connect to it without issues. However I want to start it using systemctl start redis, so I have…
munHunger
  • 363
  • 1
  • 3
  • 9
19
votes
4 answers

How to send an email if a systemd service is restarted?

I have a critical application which is run as a service by systemd. It is set up to restart as soon as there is a failure. How to send an email if the application restarts?
Greg
  • 1,657
  • 5
  • 27
  • 38
19
votes
2 answers

Systemd Environment and EnvironmentFile not working

I've built an application and a systemd unit for it. The systemd unit works fine, but as the dev and prod environments have diverged I've started moving config out to environment variables and I can't seem to get them to work in systemd. I've tried…
Keef Baker
  • 351
  • 1
  • 2
  • 8
19
votes
3 answers

How to set the hostname for a Debian Jessie system?

Debian Jessie comes with systemd. The recommendation to set the hostname is using hostnamectl for systemd. However, this command does not work (even to display the current hostname) on the Debian Jessie image booted on EC2: sudo hostnamectl sudo:…
donatello
  • 746
  • 1
  • 9
  • 16
18
votes
1 answer

Failed at step EXEC spawning... Permission denied

I have read alot about this but still not sure why this is not working. as far as I know all dirs have the right permission and even with everything being 777 I still get permission denied when trying to run this program as a service. the program I…
Stone Monarch
  • 293
  • 1
  • 2
  • 5
18
votes
4 answers

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: permission denied" when it was "Failed to get…
xenoid
  • 353
  • 1
  • 3
  • 10
18
votes
2 answers

How to bypass systemd "start request repeated too quickly"

I'm playing around with CHEF in a CentOS7 VM, and the script failed due to the issue: systemd[1]: start request repeated too quickly for fail2ban.service I know this is configurable in systemd, but I'd just like to know, for testing purposes, if…
qxlab
  • 283
  • 1
  • 2
  • 8
18
votes
6 answers

SSH sessions hang on shutdown/reboot

I have a server that runs Debian and sshd on it, and in case I need to reboot the server my SSH session hangs at client side until TCP timeout. I assume this is because when sshd is being terminated it does not explicitly close open SSH sessions to…
Vesper
  • 794
  • 1
  • 9
  • 32
17
votes
6 answers

systemd : how to get the running target

Command systemctl get-default returns user-defined.target. Then I use systemctl isolate multi-user.target to switch to multi-user.target. I can see that a bunch of services that shouldn't be running on user-defined.taret and should be running on…
iamauser
  • 349
  • 2
  • 3
  • 12
17
votes
2 answers

reboot or "systemctl daemon-reload" for changes to /etc/systemd/system.conf?

Within CentOS-7 does a change in the options within /etc/systemd/system.conf of systemd require a reboot or will "systemctl daemon-reload" suffice?
Jeff Kubina
  • 427
  • 1
  • 4
  • 14
17
votes
1 answer

Systemd timer not starting its service unit

Situation I have written a custom systemd service unit and its companion shell script to renew a certificate from Let's Encrypt. Everything works fine when I run systemctl start letsencrypt-example_com.service. I want it to be run automatically…
pandark
  • 466
  • 1
  • 3
  • 10
17
votes
2 answers

Use of CPUQuota in systemd

I am trying to put a hard limit in CPU usage for a dd command . I have created the following unit file [Unit] Description=Virtual Distributed Ethernet [Service] ExecStart=/usr/bin/ddcommand CPUQuota=10% [Install] WantedBy=multi-user.target which…
SteveGr2015
  • 273
  • 1
  • 2
  • 6
16
votes
1 answer

"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 authentication" got the error. $ systemd…
Papal
  • 163
  • 1
  • 1
  • 5
16
votes
5 answers

predictable network interface names in systemd

Recent version of Ubuntu and Debian (stretch) bring a new network interface naming scheme. Now, when updating from a system that's using old style names like "eth0", I'd like to know prior to booting what the new name will be. How can I do this? Is…
Ralf Hildebrandt
  • 489
  • 1
  • 3
  • 12