Merge branch 'master'

This commit is contained in:
ebner committed 2025-12-22 15:47:54 +01:00
commit 8ed21b31f7
2 files changed
+43 -5

No files matched your search

-4
View File
@@ -16,10 +16,6 @@ cat >$FQDN.cnf <<EOF
FQDN = $FQDN
ORGNAME = Paul Scherrer Institut (PSI)
# subjectAltName entries: to add DNS aliases to the CSR, delete
# the '#' character in the ALTNAMES line, and change the subsequent
# 'DNS:' entries accordingly. Please note: all DNS names must
# resolve to the same IP address as the FQDN.
ALTNAMES = DNS:\$FQDN $ALIASES
# --- no modifications required below ---
+43 -1
View File
@@ -23,4 +23,46 @@ systemctl list-timers
## Logs
All systemd logs end up in journald. One important exception is __sssd__ which provides authentication against Active Directory. Its logs can be found in
`/var/log/sssd`.
`/var/log/sssd`.
## Debug Service Start Failure
### Wrapper to Catch Output
To catch all the output in a file write a small wrapper:
```
#!/usr/bin/bash
LOGFILE=/tmp/test.log
echo "$(date): " "$@" >> $LOGFILE
exec "$@" &>> $LOGFILE
```
and store it e.g. as `/root/systemd_debug_starter.sh`.
Then inject it into the daemon startup in the unit file with
```
ExecStart=/root/systemd_debug_starter.sh $ORIGINAL_EXECUTABLE
```
then you need to run
```
systemctl daemon-reload
systemctl start $SERVICE
```
and check out the log file.
### Strace
If the error is more subtle, like problems with `SIGPIPE`, `strace` can be useful to unveil the problem.
You may inject strace into the daemon startup in the unit file with
```
ExecStart=strace -D -f -o /tmp/strace.txt $ORIGINAL_EXECUTABLE
```
then you need to run
```
systemctl daemon-reload
systemctl start $SERVICE
```
and check out the log file.