From owner-freebsd-questions@FreeBSD.ORG Sun Jun 8 20:30:52 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8071065675 for ; Sun, 8 Jun 2008 20:30:52 +0000 (UTC) (envelope-from admin2@enabled.com) Received: from typhoon.enabled.com (typhoon.enabled.com [216.218.220.21]) by mx1.freebsd.org (Postfix) with ESMTP id C1DC58FC1A for ; Sun, 8 Jun 2008 20:30:52 +0000 (UTC) (envelope-from admin2@enabled.com) Received: from Macintosh-96.local (nat-service4.juniper.net [66.129.225.151]) (authenticated bits=0) by typhoon.enabled.com (8.14.2/8.14.2) with ESMTP id m58KUqL4064540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 8 Jun 2008 13:30:52 -0700 (PDT) (envelope-from admin2@enabled.com) Message-ID: <484C4172.1020207@enabled.com> Date: Sun, 08 Jun 2008 13:30:42 -0700 From: Noah User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: User Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: stunnel: warning: can't get client address: Bad file descriptor X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2008 20:30:53 -0000 Just upgraded stunnel and getting the following error message in the /var/log/messages file. It appears that when I restart stunnel it complains "Error binding pop3s to 0.0.0.0:995 and bind: Address already in use (48)". therefore the 995 port never becomes available during the restart. Why is that happening? She the stunel logs below. any clues? ---- snip --- Jun 8 13:17:04 stunnel: warning: can't get client address: Bad file descriptor Jun 8 13:17:34 last message repeated 530400 times Jun 8 13:18:00 last message repeated 488687 times ---- snip --- ---- here is the stunnel.log ----- n# tail -n 50 -f /var/log/stunnel.log Jun 8 00:00:00 typhoon newsyslog[72831]: logfile turned over 2008.06.08 04:05:41 LOG7[21238:134664192]: Snagged 64 random bytes from /root/.rnd 2008.06.08 04:05:41 LOG7[21238:134664192]: Wrote 1024 new random bytes to /root/.rnd 2008.06.08 04:05:41 LOG7[21238:134664192]: RAND_status claims sufficient entropy for the PRNG 2008.06.08 04:05:41 LOG7[21238:134664192]: PRNG seeded successfully 2008.06.08 04:05:41 LOG7[21238:134664192]: Certificate: /usr/local/etc/stunnel/mail.pem 2008.06.08 04:05:41 LOG7[21238:134664192]: Certificate loaded 2008.06.08 04:05:41 LOG7[21238:134664192]: Key file: /usr/local/etc/stunnel/mail.pem 2008.06.08 04:05:41 LOG7[21238:134664192]: Private key loaded 2008.06.08 04:05:41 LOG7[21238:134664192]: SSL context initialized for service pop3s 2008.06.08 04:05:41 LOG5[21238:134664192]: stunnel 4.25 on i386-unknown-freebsd6.2 with OpenSSL 0.9.8h 28 May 2008 2008.06.08 04:05:41 LOG5[21238:134664192]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP 2008.06.08 04:05:41 LOG6[21238:134664192]: file ulimit = 11095 (can be changed with 'ulimit -n') 2008.06.08 04:05:41 LOG6[21238:134664192]: poll() used - no FD_SETSIZE limit for file descriptors 2008.06.08 04:05:41 LOG5[21238:134664192]: 5417 clients allowed 2008.06.08 04:05:41 LOG7[21238:134664192]: FD 5 in non-blocking mode 2008.06.08 04:05:41 LOG7[21238:134664192]: FD 6 in non-blocking mode 2008.06.08 04:05:41 LOG7[21238:134664192]: FD 7 in non-blocking mode 2008.06.08 04:05:41 LOG7[21238:134664192]: SO_REUSEADDR option set on accept socket 2008.06.08 04:05:41 LOG3[21238:134664192]: Error binding pop3s to 0.0.0.0:995 2008.06.08 04:05:41 LOG3[21238:134664192]: bind: Address already in use (48) --- configuration ------- # cat /usr/local/etc/stunnel/stunnel.conf # Sample stunnel configuration file # Copyright by Michal Trojnara 2002 # Comment it out on Win32 cert = /usr/local/etc/stunnel/mail.pem chroot = /var/run/stunnel #chroot = /var/run # PID is created inside chroot jail pid = /stunnel.pid setuid = stunnel setgid = stunnel # grep stunnel /etc/rc.conf stunnel_enable="YES" # cat /usr/local/etc/rc.d/stunnel #!/bin/sh # # $FreeBSD: ports/security/stunnel/files/stunnel.in,v 1.9 2008/01/26 14:18:12 roam Exp $ # # PROVIDE: stunnel # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON # KEYWORD: shutdown # # Add some of the following variables to /etc/rc.conf to configure stunnel: # stunnel_enable (bool): Set to "NO" by default. # Set it to "YES" to enable stunnel. # stunnel_config (str): Default "/usr/local/etc/stunnel/stunnel.conf" # Set it to the full path to the config file # that stunnel will use during the automated # start-up. # stunnel_pidfile (str): Default "/usr/local/var/stunnel/stunnel.pid" # Set it to the value of 'pid' in # the stunnel.conf file. # . /etc/rc.subr name="stunnel" rcvar=`set_rcvar` load_rc_config $name : ${stunnel_enable="NO"} : ${stunnel_config="/usr/local/etc/stunnel/${name}.conf"} : ${stunnel_pidfile="/var/run/stunnel/${name}.pid"} command="/usr/local/bin/stunnel" command_args=${stunnel_config} pidfile=${stunnel_pidfile} required_files="${stunnel_config}" run_rc_command "$1"