Hi,

  I've setup a stunnel install to handle several website SSL part of the HTTP (then redirected to HAProxy LoadBalancer).

  I can successfully start one site, but if I add another website (so another stunnel conf file in /etc/stunnel) then the first is said to be already running while it's not and the second starts for real.


thomas@ns0:/var/log/stunnel4$ sudo service stunnel4 start
Starting SSL tunnels: [Started: /etc/stunnel/base.conf] [Started: /etc/stunnel/extranet.onesite.com.conf] [Already running: /etc/stunnel/mansonthomas.com.conf] stunnel.

(mansonthomas.com was my first try before implementing a client website)

Also, in /var/log/stunnel.log I've only the logs for base.conf, not for the two other one. What should I do to have the logs? I've tryed to add debug=7 at the beginning of the two conf file, but nothing.


  After some times, the extranet site https stops working...

  I was off in holidays for the last two weeks, so I didn't have the time to really dig into this...

  what would be the first steps to debug this issues ? 

Regards,
Thomas.

2012.03.29 15:31:41 LOG5[8181:140471188047648]: Reading configuration from file /etc/stunnel/base.conf
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Snagged 64 random bytes from /dev/urandom
2012.03.29 15:31:41 LOG7[8181:140471188047648]: PRNG seeded successfully
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Using DH parameters from /etc/stunnel/sites/mainsite.com/mainsite.com.crt
2012.03.29 15:31:41 LOG6[8181:140471188047648]: DH initialized with 2048 bit key
2012.03.29 15:31:41 LOG7[8181:140471188047648]: ECDH initialized
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Certificate: /etc/stunnel/sites/mainsite.com/mainsite.com.crt
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Certificate loaded
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Key file: /etc/stunnel/sites/mainsite.com/mainsite.com.key
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Private key loaded
2012.03.29 15:31:41 LOG7[8181:140471188047648]: SSL context initialized for service https-mainsite.com
2012.03.29 15:31:41 LOG5[8181:140471188047648]: Configuration successful
2012.03.29 15:31:41 LOG5[8181:140471188047648]: No limit detected for the number of clients
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=3 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=4 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=4 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=5 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=5 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=6 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=6 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=7 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=7 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: libwrap_init: FD=8 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: signal_pipe: FD=9 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: signal_pipe: FD=10 allocated (blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: accept socket: FD=11 allocated (non-blocking mode)
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Option SO_REUSEADDR set on accept socket
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Service https-mainsite.com bound to 8.19.1.2:443
2012.03.29 15:31:41 LOG7[8181:140471188047648]: Service https-mainsite.com opened FD=11
2012.03.29 15:31:41 LOG7[8187:140471188047648]: Created pid file /var/run/stunnel4/stunnel4.pid
2012.03.29 15:31:41 LOG5[8187:140471188047648]: stunnel 4.35 on x86_64-pc-linux-gnu with OpenSSL 1.0.0e 6 Sep 2011
2012.03.29 15:31:41 LOG5[8187:140471188047648]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP
2012.03.29 15:31:49 LOG7[8187:140471188047648]: Dispatching signals from the signal pipe
2012.03.29 15:31:49 LOG5[8187:140471188047648]: Received signal 15; terminating
2012.03.29 15:31:49 LOG7[8187:140471188047648]: removing pid file /var/run/stunnel4/stunnel4.pid
2012.03.29 15:32:38 LOG5[8280:140481745549088]: Reading configuration from file /etc/stunnel/base.conf
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Snagged 64 random bytes from /dev/urandom
2012.03.29 15:32:38 LOG7[8280:140481745549088]: PRNG seeded successfully
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Using DH parameters from /etc/stunnel/sites/mainsite.com/mainsite.com.crt
2012.03.29 15:32:38 LOG6[8280:140481745549088]: DH initialized with 2048 bit key
2012.03.29 15:32:38 LOG7[8280:140481745549088]: ECDH initialized
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Certificate: /etc/stunnel/sites/mainsite.com/mainsite.com.crt
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Certificate loaded
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Key file: /etc/stunnel/sites/mainsite.com/mainsite.com.key
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Private key loaded
2012.03.29 15:32:38 LOG7[8280:140481745549088]: SSL context initialized for service https-mainsite.com
2012.03.29 15:32:38 LOG5[8280:140481745549088]: Configuration successful
2012.03.29 15:32:38 LOG5[8280:140481745549088]: No limit detected for the number of clients
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=3 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=4 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=4 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=5 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=5 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=6 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=6 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=7 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=7 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: libwrap_init: FD=8 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: signal_pipe: FD=9 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: signal_pipe: FD=10 allocated (blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: accept socket: FD=11 allocated (non-blocking mode)
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Option SO_REUSEADDR set on accept socket
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Service https-mainsite.com bound to 8.19.1.2:443
2012.03.29 15:32:38 LOG7[8280:140481745549088]: Service https-mainsite.com opened FD=11
2012.03.29 15:32:38 LOG7[8286:140481745549088]: Created pid file /var/run/stunnel4/stunnel4.pid
2012.03.29 15:32:38 LOG5[8286:140481745549088]: stunnel 4.35 on x86_64-pc-linux-gnu with OpenSSL 1.0.0e 6 Sep 2011
2012.03.29 15:32:38 LOG5[8286:140481745549088]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP