Hi stunnel-users
I run stunnel4 in docker with the following config file: --- /etc/stunnel/stunnel.conf -------------- sslVersion = SSLv3
pid = /var/lib/stunnel4/stunnel4.pid
socket = l:TCP_NODELAY=1 socket = r:TCP_NODELAY=1
verify = 2 CApath = /etc/ssl/certs
debug = notice output = /var/log/stunnel.log
client = yes foreground = yes
[foo] accept = 1234 connect = 127.0.0.1:2345 TIMEOUTclose = 3 ---------------------------------------------------------
When I run stunnel and pipe stdout and stderr to /dev/null, I still get output:
root@849b7eb3bbd0:/# /usr/bin/stunnel4 /etc/stunnel/stunnel.conf 2>/dev/null >/dev/null stunnel: LOG5[258:140421949949696]: stunnel 4.53 on x86_64-pc-linux-gnu platform stunnel: LOG5[258:140421949949696]: Compiled/running with OpenSSL 1.0.1e 11 Feb 2013 stunnel: LOG5[258:140421949949696]: Threading:PTHREAD SSL:+ENGINE+OCSP Auth:LIBWRAP Sockets:POLL+IPv6 stunnel: LOG5[258:140421949949696]: Reading configuration from file /etc/stunnel/stunnel.conf stunnel: LOG5[258:140421949949696]: Configuration successful ^Cstunnel: LOG3[258:140421949949696]: Received signal 2; terminating
Complete shell output is attached.
Any hints on what's happening?
Kindly,
On Mon, 2014-11-10 15:51:05 +0100, Casper Thomsen wrote:
[..]
When I run stunnel and pipe stdout and stderr to /dev/null, I still get output:
Casper,
Could this be syslog looping back to the console?
Ludolf
Hi Ludolf,
On Mon, Nov 10, 2014 at 9:55 PM, Ludolf Holzheid lholzheid@bihl-wiedemann.de wrote:
Could this be syslog looping back to the console?
That's definitely possible in some sense. However, syslog is not running. Namely, $ ps aux|grep -vE "(bash|stunnel.conf|ps aux)$" gives nothing but the header row and the grep itself and /dev/log socket is not present.
However, if I produce a /dev/log socket by a syslog, the log ends there.
"logger foo" does not produce output when syslog is not running. Could stunnel simply be writing to /dev/tty? Is this expected behaviour when syslog is missing?
Anyway, if I add "syslog = no" to the config file, nothing is output. Maybe I'm misreading the docs: "Stay in foreground (don't fork) and log to stderr instead of via syslog (unless output is specified)." I wouldn't expect logs to be written to syslog when "foreground = true". I would expect logs to be appended to the "output file" and only there when "output = FILE" is used.
Best,
On Mon, Nov 10, 2014 at 11:25:30PM +0100, Casper Thomsen wrote:
Hi Ludolf,
On Mon, Nov 10, 2014 at 9:55 PM, Ludolf Holzheid lholzheid@bihl-wiedemann.de wrote:
Could this be syslog looping back to the console?
That's definitely possible in some sense. However, syslog is not running. Namely, $ ps aux|grep -vE "(bash|stunnel.conf|ps aux)$" gives nothing but the header row and the grep itself and /dev/log socket is not present.
However, if I produce a /dev/log socket by a syslog, the log ends there.
"logger foo" does not produce output when syslog is not running.
How about "logger -p kern.emerg foo"?
G'luck, Peter
Hi Peter
On Mon, Nov 10, 2014 at 11:44 PM, Peter Pentchev roam@ringlet.net wrote:
On Mon, Nov 10, 2014 at 11:25:30PM +0100, Casper Thomsen wrote:
"logger foo" does not produce output when syslog is not running.
How about "logger -p kern.emerg foo"?
No output either.
Best,