New answers tagged

0

For anyone else running into this problem - I was able to solve it by: Booting into a working kernel, and removing all software which had been installed from standalone rpm files. (While still booted from the older working kernel) regenerating initramfs for the latest kernel using dracut, in my case this was for 5.5.11: sudo dracut /boot/initramfs-5.5.11-...


0

Systemd operates at a lower level than your shell environment. By this I mean, when you execute a command it is normally a child process of your shell environment which is a child process of your init daemon (systemd in this case). That means systemd units don't see or obey your shell environment nor shell macros like ~. Any environment variables configured ...


0

For anyone also struggling with this, instead of systemctl daemon-reload systemctl restart docker do this systemctl daemon-reload systemctl start limit-docker.slice systemctl restart docker


0

S has no direct correspondence in systemd. The systemd-sysv-generator program does not handle such van Smoorenburg rc scripts. Debian used to have a patched version of that program that wrapped a rc script that used S inside a service unit with no default dependencies and that was wanted-by sysinit.target. This was imperfect, but then all of the operation ...


2

You can use systemctl show for this: systemctl show -pUser,UID nginx If User shows nothing, and UID is [not set], the service is running as root, or the owning user in the case of a user service.


1

According to the systemd documentation, the logs kept by journald default to a size limit of 15% of disk capacity or 4GB, whichever is smaller. If /var is not mounted, not writable, or /var/log/journal does not exist, journald logs will only be stored in volatile memory (/run/log/journal.) If your service creates log files of its own outside the systemd ...


1

You can use a template unit file: systemd.unit For OpenVPN as an example: You can create a unit file with a name openvpn@.service in /etc/systemd/system with a following content: [Unit] Description=OpenVPN connection to %i After=network-online.target Wants=network-online.target [Service] Type=forking ExecStart=/usr/sbin/openvpn --config /etc/openvpn/%i....


0

Memory is shared. You'll have one copy of a shared library (e.g. glibc) and many users that count it as part of their memory usage.


0

You should head over to https://bugzilla.redhat.com and report this as a bug. It is very unlikely that we here can help. Only advise (for now) is to delete the oldest offending kernel(s), so you only keep the very last one and one (or two) working kernels, that way an update won't erase a working kernel.


0

Any logs systemctl status firefox.service(assume firefox.service is the name) may help debug for same problems. Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.


0

Script started working after an update


2

The message means that the app your .service file started with ExecStart= exited and set the return code to 10 when it did so. There is no single uniform standard (although there are several partial standards and conventions) on result codes, so the only way to find out what the code 10 means is reading the documentation of that specific app... or its ...


3

By default, systemd will use service file from /usr/lib/systemd/system/daemon.service. However, if it finds the service unit in the /etc/systemd/system/daemon.service, it automatically uses this unit and ignores the default one. So basically cp /usr/lib/systemd/system/daemon.service /etc/systemd/system/daemon.service and make whatever changes you need in ...


0

You must have a /etc/init.d/tightvncserver script like this: #!/bin/sh ### BEGIN INIT INFO # Provides: tightvncserver # Should-Start: # Required-Start: $local_fs $remote_fs x11-common # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: VNC server # Description: Debian ...


1

10 is the return value of the main process. By convention every non-zero exit code is considered a failure, where the number should ideally indicate what went wrong. n/a stands for not applicable or available (Cf. https://en.wikipedia.org/wiki/N/a) and it means there is no symbolic name for the exit code 10 defined, so it does not indicate what went wrong. ...


0

The basic guiding principle here is that whatever binds the AF_LOCAL socket should be setting its permissions. Doing otherwise is a rickety Heath Robinson contraption. If the dæmon service program creates and binds the socket, then look for configuration options that allow you to specify the socket's permissions. Unfortunately, you may find that the ...


1

Later versions of systemd may have changed this, but in 237 or so you are not allowed $ or % in the program, which also has to be an absolute path. You can get round this by, for example, ExecStart=/usr/bin/bash -c 'exec $HOME/.local/bin/cprev-agent' Here the $HOME is expanded by the shell. systemd only expands such variables if they are a single word. You ...


0

Maybe your symlink /sbin/init is broken. To check and fix that please check out this post: https://unix.stackexchange.com/a/573609/400822


0

I had to enable the unit first, systemctl enable gitlab-runner.service Then I could start it, systemctl start gitlab-runner.service


0

This is a late answer but I still think that can help someone because there are few infos on this topic. I also wasted time on this problem. Changing the /etc/systemd/resolved.conf is just a part of the work. After your changed it you still need to resolve this puzzle: Multicast DNS will be enabled on a link only if the per-link and the global setting ...


1

This may not be something that you can do w/o bios clock. I am not familiar with ODROID-C2 but have worked on some other embedded devices. Since the system will start logging as soon as the kernel comes up journalctl output will have date stamps from whatever it gets from the system hardware clock until it can correct time. Since your device does not ...


0

/.jekyll-cache Your program is trying to create a directory in the root of the filesystem. This is not a permissions problem, and it would be very daft indeed to "solve" it by granting any write rights to the root directory. This is a configuration problem, of some kind, either in your service's own configuration or in the systemd service unit. Find out ...


0

Answering my own question. I wrote a simple test to reflect my situation: # Service B [Unit] Description=Hello World Service #After=systemd-user-sessions.service [Service] Type=simple ExecStart=/bin/sh -c "echo test > /tmp/test && sleep 10" TimeoutStopSec=30 and # Service A [Unit] Description=Hello World Service After=B.service Conflicts=B....


0

The BindPaths option make the file visible to the process ran by the unit. This is not visible at all from the shell where you type the command to start the service. At any moment you may check what file systems are mounted looking at /proc/mounts, but if you run a service with BindPaths, I think the only way to check if the file system is correctly mounted ...


2

As hinted at by @JdeBP wrong SELinux file labels are the reason for the behavior. The . character in the output of ls indicates that there is a security context set for the file. So be attentive to the . in the ls output! cd /etc/systemd/system && ls -lhZ some-other-service.service anfragen-3dkonfig-mapper.service prints -rw-r--r--. 1 root root ...


1

-rw-r--r--. SELinux restrictions are making life complex for you.


3

You've made an Accept=No socket, where the service is passed the listening socket file descriptor and is expected to do the accepting of connections, and stay running. The giveaway should be that you didn't make a template service unit, as would have been needed for an Accept=Yes socket where the service is passed the connected socket file descriptor. ...


0

Note: This may be or may be not related to your problem, but the problem I explain here will lead to the same error messages you have shown due to a missing symlink. I am not an expert, but in Debian 10 (Buster) the default init system is systemd which means /sbin/init (/usr/sbin/init) will link to systemd. Unfortunately there is a bug I noticed when ...


0

According to the manual, After= does not do what you intend: Before=, After= Those two settings configure ordering dependencies between units. If unit foo.service contains the setting Before=bar.service and both units are being started, bar.service's start-up is delayed until foo.service has finished starting up. After= is the inverse of Before=...


1

First they are not sigterm. Next you pass a signal, not an argument. To send signals we use kill. See man kill. You have to specify the process. systemd will always be run as process 1, the init process. Therefore to send SIGRTMIN+15, do sudo kill -SIGRTMIN+15 1. However it will be better to use the command shutdown --poweroff, or shutdown --reboot.


0

The instructions at https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant are a bit unprecise and possibly misleading, but if you drop the contents of /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf similar to the shown below, it should work without any troubles. # This file describes the network interfaces available on your system # and ...


1

In systemd units, lists can typically be reset in overrides by assigning an empty value. This works for conditions too: If any of these options is assigned the empty string, the list of conditions is reset completely, all previous condition settings (of any kind) will have no effect. In your override, use this: ConditionPathExists= ConditionPathExists=|!...


1

Strange way for controlling VM. Good way -- use systemd for automatic start and stop VM. For example: /etc/systemd/system/qemu@.service [Unit] Description=QEMU virtual machine [Service] Environment="type=system-x86_64" "haltcmd=kill -INT $MAINPID" EnvironmentFile=/etc/conf.d/qemu.d/%i ExecStart=/usr/bin/qemu-${type} -name %i -nographic $args ExecStop=/bin/...


0

The service and signal were correct, but systemd-halt service must be running for this to work.


1

Can you not just replace the .service file with a symlink to /etc/systemd/system/keygen.service and put the contents of your preferred .service in there?


2

RIP systemd. Use service instead. type in # service --status-all and see if it is functional. Then do all of your above commands using service syntax and you should be functional. Once you are running normally, take some time and dig into why systemd is not functioning properly.


3

[Unit] ... [Service] Type=exec # or any other type you want, apart from "oneshot" ExecStart=/usr/bin/your_program ExecStopPost=/bin/sh -c \ 'if [ "$SERVICE_RESULT" = "success" ]; then systemctl poweroff; fi' RestartSec=5 Restart=on-failure If your service is written using Type=oneshot, you will need the pattern in Oxyd's answer instead. Using ...


3

/etc/systemd/system/my_unit.service: [Unit] ... ... [Service] Type=oneshot ExecStart=/usr/bin/your_program ExecStartPost=/usr/bin/systemctl poweroff RestartSec=5 Restart=on-failure [Install] ... ... It's simple. Another interesting parameters see in man systemd.service and man systemd.unit.


0

It looks like you missed the usr directory: /usr/lib/systemd/system-sleep/ From https://www.freedesktop.org/software/systemd/man/systemd-suspend.service.html: Immediately before entering system suspend and/or hibernation systemd-suspend.service (and the other mentioned units, respectively) will run all executables in /usr/lib/systemd/system-sleep/ ...


0

It is possible. I don't have full instructions. (Feel free to post any script you write etc, and take due credit for it :-). hostnamectl / hostnamed does not run scripts. When you change the hostname using hostnamectl, hostnamed emits a dbus signal called PropertyChanged. You could hook up to the dbus signal, using something like dbus-monitor. https://...


0

networkd-dispatcher Can be used for an even more granular control of when you want your script to execute. Depending on what state you want state your script to execute, you'll have to decide which folder to put your script inside. Network Script Folder List: https://gitlab.com/craftyguy/networkd-dispatcher#usage Network Folder Definitions: https://www....


0

Try to start the service inside the timer like this: Unit=test@%u.service From sytemd.unit(5) manpage for the specifier %u: This is the name of the user running the service manager instance. In case of the system manager this resolves to "root". Note that this setting is not influenced by configurable in the of the service unit.


0

This is fixed by directly entering the execution path in the ExecStart parameter. The system will launch the executable from its own relative path: [Unit] Description=Data Logger Monitor Daemon [Service] ExecStart=/root/dataloggermonitor/linux-arm/coremonitor User=dotnetuser Group=dotnetuser Restart=on-failure SyslogIdentifier=DataLoggerMonitor-Service ...


1

Systemd brings down Network Manager first Even after correcting the error message by not disconnecting USB bus during suspend the issues remain you cannot send a WiFi command during suspend. Network Manager is the first service that is brought down during suspend / hibernate and shutdown. If you want to send a WiFi radio signal to a device during those ...


0

For the record: OnCalendar=*-*-* *:0/5:* is simply wrong. OnCalendar=*-*-* *:0/5:00 does stoping the multiple execution.


0

Some unit "files" are created on the fly (for example for devices, their entries are also created by the kernel as the devices get initialized), and only ever exist in memory.


1

I found the using the systemctl edit command was tricky (using Ubuntu 18.04), so I did this: sudo mkdir /etc/systemd/system/docker.service.d sudo vi /etc/systemd/system/docker.service.d/override.conf then added the lines I required, in your case: (and yes, the apparently empty first ExecStart= line is not a mistake) [Service] ExecStart= ExecStart=/usr/bin/...


1

I think you need to use a .target file for ansiblePB, not a service. This is what the question you linked to uses.


0

According to https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-remote you can actually do this, but I have never tried that. It's ssh based and I don't know how to use it in file :(, but your app3.service might execute something like ssh -i /path/to/ssh_key user@host ...


4

The answer is in the first sentence you quoted. "systemd will dynamically create device units". It says "create", not just "start". Through integration with the udev daemon, once the kernel tells udev about a new device, a .device unit will be synthesized on the fly. (And similarly, if a device disappears, the .device unit will be destroyed as well.) It is ...


Top 50 recent answers are included