You configured stunnel with "foreground = yes" which enables logging to stderr, which systemd redirects to the journal, while also logging to syslog (no "syslog = no"), which systemd also redirects to the journal. Am I right?
This messgave could be related to the
thread.
With stunnel 5.77 from the official Debian package, and using instances of
Debian systemd template, I am getting duplicate lines at the journal. Each
line is duplicated, as in
Mar 03 01:02:24 myhost stunnel[50237]: LOG5[ui]: Log file reopened
Mar 03 01:02:24 myhost stunnel4[50237]: 2026.03.03 01:02:24 LOG5[ui]: Log file reopened
The order of those lines can be reversed in the sense that the line with the
duplicate date sometimes appears before the other line.
As an aside, the manual page states
-reopen (Windows NT and later only)
Reopen the log file of the running NT Service
but this report is for a Linux machine. Am I confusing what the manual page
states for a command line option with the fact that stunnel reopens the log
file periodicaly on all platforms?
In addition to my possible misunderstanding about the log file being reopened,
I find it odd there is a log file mentioned at all. Because I didn't
configured a log file in the configuration file at all.
Returning to the duplicate lines issue, I have tried to run stunnel directly
from the command line, as in
# /usr/bin/stunnel /etc/stunnel/stunnel.conf &
With this command line, I got log messages in the terminal, as well as in
systemd journal. Can it be that when run by the systemd template, the lines
from the terminal are directed to the journal, and that explain the
duplication?
_______________________________________________