Date: Mon, 9 Jun 2008 02:05:13 -0700 (PDT) From: Adamsonh <adamson@polycastle.3322.org> To: freebsd-questions@freebsd.org Subject: Re: stunnel: warning: can't get client address: Bad file descriptor Message-ID: <17728956.post@talk.nabble.com> In-Reply-To: <484C4172.1020207@enabled.com> References: <484C4172.1020207@enabled.com>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, stunnel 4.25 does not kill all stunnel instances after issuing "stop"; you have to kill all old stunnel jobs before restarting it. noahwallach wrote: > > 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" > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > > -- View this message in context: http://www.nabble.com/stunnel%3A-warning%3A-can%27t-get-client-address%3A-Bad-file-descriptor-tp17722812p17728956.html Sent from the freebsd-questions mailing list archive at Nabble.com.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17728956.post>