Spectrum Services started as non-root user are terminated on logout
search cancel

Spectrum Services started as non-root user are terminated on logout

book

Article ID: 218726

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

After install Spectrum on Linux (RHEL 8) as a non-root user, and start the services as described in the documentation, i.e.

SRAdmin:
systemctl --user start sradmin
Processd:
systemctl --user start processd
SDMConnector:
systemctl --user start sdmconnector

I found the services are terminated/killed when I logout the session. For instance for sradmin, systemctl --user status sradmin, return next

● sradmin.service - LSB: SPECTRUM Remote Administration Daemon
   Loaded: loaded (/sw/SPECTRUM/SRAdmin/sradmin.sh; enabled; vendor preset: enabled)
   Active: inactive (dead)

Environment

Spectrum 10.4.3 (aka 20.2.7)

Red Hat Enterprise Linux 8

Cause

This is a known limitation of running systemd services as non-root users.

Unless is configured to behave differently, the services will be terminated as soon as the session where the services were started is ended.

Resolution

You can change the behavior issuing the next command line as the spectrum owner:

# loginctl enable-linger <spectrum_owner_user>

For instance, if "spectrum" is the Spectrum owner user, the command line would look as follow

# loginctl enable-linger spectrum

After this, every time the spectrum owner logs out, the service will remain running.

This change is persistent after reboots. You may disable it issuing the command line

# loginctl disable-linger spectrum

Additional Information

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/10-4-3/installing-and-upgrading/fresh-install/install-ca-spectrum-with-non-root-user.html

https://unix.stackexchange.com/questions/521538/system-service-running-as-user-is-terminated-on-logout/526221#526221

https://man7.org/linux/man-pages/man1/loginctl.1.html

  • You can run the following command to see what accounts have linger enabled:

ls /var/lib/systemd/linger