From owner-freebsd-questions@freebsd.org Sun Aug 13 15:11:33 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C49F4DC2FE5 for ; Sun, 13 Aug 2017 15:11:33 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from inet08.hamilton.harte-lyne.ca (inet08.hamilton.harte-lyne.ca [216.185.71.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "inet08.hamilton.harte-lyne.ca", Issuer "CA_HLL_ISSUER_2016" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A17672406 for ; Sun, 13 Aug 2017 15:11:33 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from localhost (localhost [127.0.0.1]) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTP id 9FAA6622F7; Sun, 13 Aug 2017 11:11:31 -0400 (EDT) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from inet08.hamilton.harte-lyne.ca ([127.0.0.1]) by localhost (inet08.hamilton.harte-lyne.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xjvxCOZjAUp8; Sun, 13 Aug 2017 11:11:29 -0400 (EDT) Received: from webmail.harte-lyne.ca (inet04.hamilton.harte-lyne.ca [216.185.71.24]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTPSA id EFC0A622F5; Sun, 13 Aug 2017 11:11:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1502637089; bh=htFT1IIpmwV5brW2XWT77/8KH89pnOq/RBjaBPD0OnY=; h=In-Reply-To:References:Date:Subject:From:To:Cc:Reply-To; b=GsG0gUiyqasMUTTaPZ0iNt9XqX0E/axfY/qudOJaGuJ6FB2dSRPNDC+5efzQGUjOS t8Zkx+xc/qUUvhbzItPBVwYREQyHD7/BaFYyZ0X8PDEQ2OBY1u70rSh6c67XChZ6Bx HhibnD0/4+tR2AJhQqgrAytu+PpbwOOQDM5/AG8/fWXuPG1zsI1ujnud3ape15Fvri uAzROgqvHBCZADp7gnQmRo1lU++2rO40FNCsiACLFObBmviyOpGU5WHlIyX9WhHeF7 iIO+9N7TgqnFOo0/lkBO/IfGZNUM0qp7caqkRmV8Jy46k5OUSI2Y0j1klRRXr4BY9l jmPhVgnyQkZqw== Received: from 216.185.71.22 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Sun, 13 Aug 2017 11:11:29 -0400 Message-ID: <60c4fb3196dc9b5329af51591cec2e72.squirrel@webmail.harte-lyne.ca> In-Reply-To: <20170813161808.01b27b02.freebsd@edvax.de> References: <20170813161808.01b27b02.freebsd@edvax.de> Date: Sun, 13 Aug 2017 11:11:29 -0400 Subject: Re: FreeBSD-11 - local_unbound logging From: "James B. Byrne" To: "Polytropon" Cc: freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.22-5.el6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Aug 2017 15:11:33 -0000 Thank you for your help. I was able to get logging to work following your suggestion. On Sun, August 13, 2017 10:18, Polytropon wrote: > On Sun, 13 Aug 2017 10:02:43 -0400, James B. Byrne via > freebsd-questions wrote: >> I do not get any errors from unbound-checkconf and the local_unbound >> service starts but there is no logfile created; at least none where >> I expect it to be (/var/unbound/log/unbound.log). > > DId you try creating the logfile itself so unbound can append > to that file (read: append to an _existing_ file)? > No I did not. The man page to which you refer below does not state that this is necessary and I am accustomed to services that create their own log files where one is passed as a configuration option. > Try this first: > > # touch /var/unbound/log/unbound.log This worked once I also performed: # chmod 660 /var/unbound/log/unbound.log > > and restart the service. Also check your configuration file: > You can provide an absolute path for the logfile (for example > with the path and name listed above), so the entry would be: > > logfile: "/var/unbound/log/unbound.log" > > See "man 5 unbound.conf" for details. I read and re-read that reference several times without discerning that the user must manually create the log file. It states: logfile: If "" is given, logging goes to stderr, or nowhere once daemonized. The logfile is appended to, in the following format: [seconds since 1970] unbound[pid:tid]: type: message. If this option is given, the use-syslog is option is set to "no". The logfile is reopened (for append) when the config file is reread, on SIGHUP. Is one supposed to infer that since the log file is opened for append that the program will not create it if it is missing; and will not raise a warning or error respecting that fact either? As you suggested creating the missing file, and altering its permissions, resolved the issue. Thanks again, -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3