Windows 2016 Server: [!] bind: Address already in use (WSAEADDRINUSE) (10048)

Martin Schweizer <[email protected]>
Newsgroups gmane.network.stunnel.user
Message-ID <CAAbPzxbjt-BTe6PJNbNp1YJxck87C7nj0QyYghDVt=M=AcUOaA@mail.gmail.com>
Hello List

My problem:
If I run stunnel I regular get the below error:

[.] stunnel 5.46 on x86-pc-msvc-1500 platform
[.] Compiled/running with OpenSSL 1.0.2o-fips  27 Mar 2018
[.] Threading:WIN32 Sockets:SELECT,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
[ ] errno: (*_errno())
[ ] Running on Windows 6.2
[.] Reading configuration from file stunnel.conf
[.] UTF-8 byte order mark detected
[.] FIPS mode disabled
[ ] Compression disabled
[ ] No PRNG seeding was required
[ ] Initializing service [smtps]
[ ] GUI message loop initialized
[ ] Ciphers: HIGH:!aNULL:!SSLv2:!DH:!kDHEPSK
[ ] TLS options: 0x03000004 (+0x00000000, -0x00000000)
[ ] Loading certificate from file: stunnel.pem
[ ] Certificate loaded from file: stunnel.pem
[ ] Loading private key from file: stunnel.pem
[ ] Private key loaded from file: stunnel.pem
[ ] Private key check succeeded
[:] Service [smtps] needs authentication to prevent MITM attacks
[.] Configuration successful
[ ] Binding service [smtps]
[ ] Listening file descriptor created (FD=676)
[ ] Setting accept socket options (FD=676)
[ ] Option SO_EXCLUSIVEADDRUSE set on accept socket
>>> [!] bind: Address already in use (WSAEADDRINUSE) (10048) <<<<
[!] Error binding service [smtps] to 192.168.10.62:11465
[!] Could not bind any accepting port
[ ] Deallocating section defaults
[ ] Unbinding service [smtps]
[ ] Service [smtps] closed
[ ] Deallocating section [smtps]

I had the same problem with the previous versions aswell.

To temporary resolv the problem I have to change the listen port to another
number. Reread the config file and let the stunnel GUI open. Then all is
working until I close the GUI (not each time but most of).

My system:
- Windows 2016 Server
- stunnel-5.46
- stunnel installed as service and GUI

My config file (relevant part):
taskbar = yes
client=yes
[smtps]
;delay = yes
accept = 192.168.10.62:11466
connect = server.domain.ch:465
cert = stunnel.pem
local = 192.168.10.53 (this is dedicated address)

I found a similar threat in the  archives (but on Linux):
https://www.stunnel.org/pipermail/stunnel-users/2018-February/005935.html

Here is Microsoft's describtion about WSAEADDRINUSE) (10048):
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx

All helps are welcome.

Kind regards,

-- 
Martin Schweizer

PC-Service M. Schweizer GmbH; Bannholzstrasse 6; Postfach 132;
CH-8608 Bubikon; Tel. +41 55 243 30 00; Fax: +41 55 243 33 22

_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.