From owner-freebsd-questions@FreeBSD.ORG Fri Jul 28 21:31:57 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EB2716A4DA for ; Fri, 28 Jul 2006 21:31:57 +0000 (UTC) (envelope-from james_mapson@umpquanet.com) Received: from ns.museum.rain.com (gw-ipinc.museum.rain.com [65.75.192.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB5F043D49 for ; Fri, 28 Jul 2006 21:31:56 +0000 (GMT) (envelope-from james_mapson@umpquanet.com) Received: from ns.museum.rain.com (localhost [127.0.0.1]) by ns.museum.rain.com (8.13.6/8.13.6) with ESMTP id k6SLVs2X065446 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Fri, 28 Jul 2006 14:31:55 -0700 (PDT) (envelope-from james@umpquanet.com) Received: (from james@localhost) by ns.museum.rain.com (8.13.6/8.13.6/Submit) id k6SLVsnj065445 for freebsd-questions@freebsd.org; Fri, 28 Jul 2006 14:31:54 -0700 (PDT) (envelope-from james) Date: Fri, 28 Jul 2006 14:31:54 -0700 From: James Long To: freebsd-questions@freebsd.org Message-ID: <20060728213154.GA63725@ns.museum.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.12-2006-07-14 X-Greylist: Sender is SPF-compliant, not delayed by milter-greylist-2.0.2 (ns.museum.rain.com [127.0.0.1]); Fri, 28 Jul 2006 14:31:55 -0700 (PDT) Subject: bsnmpd: send: Connection refused 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: Fri, 28 Jul 2006 21:31:57 -0000 I'm trying to implement the bsnmpd service on one of my machines. In rc.conf I have: # run the bsnmpd daemon, with debugging bsnmpd_enable="YES" bsnmpd_flags="-c /etc/snmpd-test.config -d -D dump" In hosts.allow, very near the top, I have: bsnmpd : ALL : allow Here is the diff of the sample config file versus my own: # diff -u /etc/snmpd.config /etc/snmpd-test.config --- /etc/snmpd.config Tue May 16 14:27:01 2006 +++ /etc/snmpd-test.config Fri Jul 28 14:27:28 2006 @@ -6,9 +6,9 @@ # # Set some common variables # -host := foobar -location := "Room 200" -contact := "sysmeister@example.com" +host := localhost +location := "right here" +contact := "system@localhost" system := 1 # FreeBSD traphost := localhost trapport := 162 @@ -43,7 +43,7 @@ begemotSnmpdCommunityDisable = 1 # open standard SNMP ports -begemotSnmpdPortStatus.[$(host)].161 = 1 +#begemotSnmpdPortStatus.[$(host)].161 = 1 begemotSnmpdPortStatus.127.0.0.1.161 = 1 # open a unix domain socket When I start bsnmpd, I get # /etc/rc.d/bsnmpd start Starting bsnmpd. snmpd[5474]: send: Connection refused ^C# What is causing the "Connection refused" message? The freebsd-questions archive yields no hits on "snmpd AND refused" nor "bsnmpd AND refused" # sockstat | grep bsnmpd root bsnmpd 5482 3 udp4 127.0.0.1:57050 127.0.0.1:162 root bsnmpd 5482 5 udp4 *:* *:* root bsnmpd 5482 6 udp4 127.0.0.1:161 *:* root bsnmpd 5482 7 stream /var/run/snmpd.sock root bsnmpd 5482 8 dgram -> /var/run/logpriv I am also seeing a timeout error when trying to connect to query the bsnmpd daemon, but I won't worry about this until the "Connection refused" message goes away. # snmpwalk -c public localhost snmpwalk: Timeout Thank you!