My Oracle Support Banner

Systemd Mask Fails on Custom Local Service Units With Error: "Failed to execute operation: Invalid argument" (Doc ID 2672986.1)

Last updated on MAY 25, 2020

Applies to:

Linux OS - Version Oracle Linux 7.0 and later
Linux x86-64

Symptoms

On a system running Oracle Linux 7, a custom local systemd service has been placed in  /etc/systemd/system. However systemd cannot mask the service, and fails with the following error:

# systemctl mask test
Failed to execute operation: Invalid argument

However, moving the same unit file to /usr/lib/systemd (which is a location used for unit files installed by packages) works:

# mv /etc/systemd/system/test.service /usr/lib/systemd/system/
# systemctl daemon-reload
# systemctl mask test
Created symlink from /etc/systemd/system/test.service to /dev/null.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.