On Fri, Apr 28, 2023 at 04:15:21PM +0200, d3rIIIe15ter Tier wrote: [top-posting corrected]
On Fri, Apr 28, 2023 at 3:44 PM Peter Pentchev roam@ringlet.net wrote:
On Fri, Apr 28, 2023 at 01:26:53PM -0000, trashrap22@gmail.com wrote:
Hi,
I am not getting any stunnel logs. Though my syslog gives me the info
below. The stunnel4 file in /usr/bin/ is empty?
Apr 28 15:18:01 User-Linux systemd[1]: Starting LSB: Start or stop
stunnel 4.x (TLS tunnel for network daemons)...
Apr 28 15:18:01 User-Linux stunnel4[30850]: Starting TLS tunnels:
/etc/stunnel/stunnel.conf:
Apr 28 15:18:01 User-Linux stunnel4[30864]: /sbin/start-stop-daemon:
unable to start /usr/bin/stunnel4 (Exec format error)
Apr 28 15:18:01 User-Linux stunnel4[30850]: failed Apr 28 15:18:01 User-Linux stunnel4[30850]: You should check that you
have specified the pid= in you configuration file
First, what version of Debian is this? Can you show me the output of:
cat /etc/os-release cat /etc/debian_version dpkg-query -W -f '${db:Status-Abbrev}\t${Package}\t${Version}\n' base-files stunnel4
If the `dpkg-query` command above outputs anything other than "ii" in the first column for stunnel4, try running:
apt-get install --reinstall stunnel4
Anyway, after that, install the "debsums" package and show me the output of:
debsums -c stunnel4
Debian bullseye 11.6
the dpkg query only returns ii values - so all good.
ii base-files 11.1+deb11u6 ii stunnel4 3:5.56+dfsg-10
Not necessarily all good, this just means that dpkg does not know that anything is wrong, it thinks that the packages have been installed successfully once upon a time.
debsums query just returns /usr/bin/stunnel4 ?
Right, the fact that `debsums -c stunnel4` outputs /usr/bin/stunnel4 means that the /usr/bin/stunnel4 file is indeed different from what was in the Debian package when it was installed. So something must have modified it afterwards.
which stunnel4 returns the same output fyi.
OK, so while it may be interesting to figure out exactly how you got into this situation (e.g. examining the /var/log/dpkg.log file, checking for errors logged in syslog or elsewhere), the fastest way to try to get back to a working stunnel4 executable file is to run:
apt-get install --reinstall stunnel4
After that happens, try `debsums -c stunnel4` again; hopefully this time it will not output anything at all. If that is the case, then try starting the stunnel4 service (after creating the config files in the /etc/stunnel4 directory).
Hope that helps!
G'luck, Peter