<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>AW: [stunnel-users] stunnel HUP bug</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
>> kill -HUP does not seem to work for me with 4.35, I always get:<BR>
>><BR>
>> 2011.02.07 17:51:25 LOG5[14988:139705784043264]: Received signal 15;<BR>
>> terminating<BR>
<BR>
>I could not reproduce your problem.  Are you sure that you used<BR>
>"kill -HUP 14988" and not "kill 14988"?  Otherwise please send<BR>
>us your configuration file and more logs, including the lines<BR>
>logged by stunnel at startup.<BR>
<BR>
Sorry but I cannot reproduce it anymore, either. I am 100% sure, I sent kill -HUP, though (it's even in the history).<BR>
<BR>
As I tried to reproduce the issue, I got a different one. :/<BR>
<BR>
# /etc/init.d/stunnel start &>/dev/null; cat stunnel<BR>
<BR>
2011.02.09 11:23:53 LOG5[1332:139976438163200]: Reading configuration from file /etc/stunnel/stunnel.conf<BR>
2011.02.09 11:23:53 LOG6[1332:139976438163200]: Could not load DH parameters from /etc/stunnel/www.mydomain.com.crt<BR>
2011.02.09 11:23:53 LOG6[1332:139976438163200]: Could not load DH parameters from /etc/stunnel/www.myotherdomain.com.crt<BR>
2011.02.09 11:23:53 LOG5[1332:139976438163200]: Configuration successful<BR>
2011.02.09 11:23:53 LOG5[1332:139976438163200]: No limit detected for the number of clients<BR>
2011.02.09 11:23:53 LOG5[1338:139976438163200]: stunnel 4.35 on x86_64-pc-linux-gnu with OpenSSL 1.0.0c 2 Dec 2010<BR>
2011.02.09 11:23:53 LOG5[1338:139976438163200]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP<BR>
<BR>
# ps auxwww | grep stunnel<BR>
stunnel   1333  0.0  0.0  29164   628 pts/0    S    11:23   0:00 /usr/sbin/stunnel /etc/stunnel/stunnel.conf<BR>
stunnel   1334  0.0  0.0  29164   628 pts/0    S    11:23   0:00 /usr/sbin/stunnel /etc/stunnel/stunnel.conf<BR>
stunnel   1335  0.0  0.0  29164   628 pts/0    S    11:23   0:00 /usr/sbin/stunnel /etc/stunnel/stunnel.conf<BR>
stunnel   1336  0.0  0.0  29164   632 pts/0    S    11:23   0:00 /usr/sbin/stunnel /etc/stunnel/stunnel.conf<BR>
stunnel   1337  0.0  0.0  29164   632 pts/0    S    11:23   0:00 /usr/sbin/stunnel /etc/stunnel/stunnel.conf<BR>
stunnel   1338  0.0  0.0  29164   856 ?        Ss   11:23   0:00 /usr/sbin/stunnel /etc/stunnel/stunnel.conf<BR>
root      1344  0.0  0.0   6204   580 pts/0    S+   11:24   0:00 grep --colour=auto stunnel<BR>
<BR>
# kill -HUP 1338<BR>
<BR>
2011.02.09 11:25:18 LOG5[1338:139976438163200]: Reading configuration from file /etc/stunnel/stunnel.conf<BR>
2011.02.09 11:25:18 LOG6[1338:139976438163200]: Could not load DH parameters from /etc/stunnel/www.mydomain.com.crt<BR>
2011.02.09 11:25:18 LOG3[1338:139976438163200]: error queue: 140B0002 : error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_<A HREF="file:system">file:system</A> lib<BR>
2011.02.09 11:25:18 LOG3[1338:139976438163200]: error queue: 20074002 : error:20074002:BIO routines:FILE_CTRL:system lib<BR>
2011.02.09 11:25:18 LOG3[1338:139976438163200]: SSL_CTX_use_PrivateKey_file: 200100D: error:0200100D:system library:fopen:Permission denied<BR>
2011.02.09 11:25:18 LOG3[1338:139976438163200]: Error binding https to 0.0.0.0:444<BR>
2011.02.09 11:25:18 LOG3[1338:139976438163200]: bind: Permission denied (13)<BR>
<BR>
# /etc/init.d/stunnel restart<BR>
<BR>
2011.02.09 11:40:22 LOG5[2017:140528250427136]: Received signal 15; terminating<BR>
2011.02.09 11:40:23 LOG5[2123:140176257128192]: Reading configuration from file /etc/stunnel/stunnel.conf<BR>
<BR>
[.. same as above: 2011.02.09 11:23:53 ..]<BR>
<BR>
But the socket is not in use, netstat does not list it. Stunnel works fine again after the restart.<BR>
<BR>
stunnel.conf:<BR>
<BR>
setuid = stunnel<BR>
setgid = stunnel<BR>
pid = /var/run/stunnel/stunnel.pid<BR>
<BR>
socket = l:TCP_NODELAY=1<BR>
socket = r:TCP_NODELAY=1<BR>
<BR>
debug = info<BR>
output = /var/log/squid/stunnel<BR>
<BR>
[https]<BR>
accept  = 444<BR>
connect = 127.0.0.1:8089<BR>
TIMEOUTclose = 0<BR>
cert = /etc/stunnel/www.mydomain.com.crt<BR>
key = /etc/stunnel/www.mydomain.com.key<BR>
<BR>
[https]<BR>
accept  = 445<BR>
connect = 127.0.0.1:8083<BR>
TIMEOUTclose = 0<BR>
cert = /etc/stunnel/www.myotherdomain.com.crt<BR>
key = /etc/stunnel/www.myotherdomain.com.key<BR>
<BR>
Best regards,<BR>
<BR>
Stefan Behte</FONT>
</P>

</BODY>
</HTML>