Systemd - dogtagpki/pki GitHub Wiki

Table of Contents

Service

To list services:

$ systemctl list-units --type=service

To start a service:

$ systemctl start <name>.service

To stop a service:

$ systemctl stop <name>.service

To check service status:

$ systemctl status <name>.service

To reload systemd configuration:

$ systemctl daemon-reload

Journal

The global systemd journal configuration is located at /etc/systemd/journald.conf.

To restrict the journal size to 100 MB:

[Journal]
SystemMaxUse=100M

Then restart the systemd journal service:

$ systemctl restart systemd-journald

To view systemd journal for a PKI instance:

$ journalctl -u pki-tomcatd@<instance>.service

To clear systemd journals except for the last 2 days:

$ journalctl --vacuum-time=2d

To clear systemd journals except for the last 100 MB:

$ journalctl --vacuum-size=100M

Password

$ systemd-ask-password --keyname=nssdb --accept-cached "NSS database password:"
NSS database password: **********
Secret.123
$ keyctl search @u user nssdb @s
576612158
$ keyctl print %user:nssdb
Secret.123

Notifications

To notify that the service is ready:

$ systemd-notify --pid=<PID> --ready

Troubleshooting

If PKI service fails to start with the following error:

Starting PKI Tomcat Server pki-tomcat...
[email protected]: Failed to determine user credentials: No such process
[email protected]: Failed at step USER spawning /usr/sbin/pki-server: No such process
[email protected]: Control process exited, code=exited, status=217/USER
[email protected]: Failed with result 'exit-code'.
Failed to start PKI Tomcat Server pki-tomcat.

execute the following command:

$ systemctl daemon-reexec

References

⚠️ **GitHub.com Fallback** ⚠️