From owner-freebsd-questions@freebsd.org Mon Dec 19 01:09:53 2016 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 EC7F8C8340B for ; Mon, 19 Dec 2016 01:09:53 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 79C78279 for ; Mon, 19 Dec 2016 01:09:53 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 05F1FA2B8 for ; Mon, 19 Dec 2016 01:09:50 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/05F1FA2B8; dkim=none; dkim-atps=neutral Subject: Re: Pkg problem after upgrading from 9.3 to 10.3 To: freebsd-questions@freebsd.org References: <20161218154643.106f91f2@Stream> <55bca76f-bff9-d528-1096-1f5b7594c8c3@FreeBSD.org> <20161218183041.77f47019@Stream> <20161218233805.1978ee55@Stream> From: Matthew Seaman Message-ID: Date: Mon, 19 Dec 2016 01:09:43 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161218233805.1978ee55@Stream> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NuIk6KV1q9TdqdvnlX1KFTQsruoDeQpgh" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk 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: Mon, 19 Dec 2016 01:09:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NuIk6KV1q9TdqdvnlX1KFTQsruoDeQpgh Content-Type: multipart/mixed; boundary="fSCrgjePmttSrxm4VGp4krHriwUAw34om"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: Subject: Re: Pkg problem after upgrading from 9.3 to 10.3 References: <20161218154643.106f91f2@Stream> <55bca76f-bff9-d528-1096-1f5b7594c8c3@FreeBSD.org> <20161218183041.77f47019@Stream> <20161218233805.1978ee55@Stream> In-Reply-To: <20161218233805.1978ee55@Stream> --fSCrgjePmttSrxm4VGp4krHriwUAw34om Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 18/12/2016 22:38, francesco scaglione wrote: > On Sun, 18 Dec 2016 17:59:47 +0000 > Matthew Seaman wrote: >=20 >> On 18/12/2016 17:30, francesco scaglione wrote: >>> On Sun, 18 Dec 2016 17:06:29 +0000 >>> Matthew Seaman wrote: =20 >> >>>> This sounds like a problem with the DNS -- although why should this >>>> affect you after upgrading to 10.x? Did you switch to enabling the >>>> local_unbound service when you upgraded? =20 >>> >>> Uhm, I don't think so... I just answered "y" to a few "does this >>> look reasonable to you" questions. How could I check this? =20 >> >> Do you have: >> >> local_unbound_enable=3D"YES" >> >> in /etc/rc.conf? >=20 > Not now, no; was it there in 9.3? No -- local_unbound was new in 10.0 >>>> What does this DNS query return for you? >>>> >>>> % dig IN SRV _http._tcp.pkg.freebsd.org >>>> >>>> That should give you a list of download sites with >>>> 'pkgmir.geo.freebsd.org' marked as the highest priority. >>>> Connecting to this repo by name will automatically direct you to >>>> the closest package mirror to your location. That's >>>> pkg0.bme.freebsd.org for people in Europe. =20 >>> >>> Right, I've tried first with dig: >>> >>> $ dig IN SRV _http._tcp.pkg.freebsd.org >>> dig: not found =20 >> >> Heh. Yes, dig is no longer in the base system in 10.x. I reflexively= >> install bind-tools nowadays. >> >>> and then with drill: >>> >>> $ drill IN SRV _http._tcp.pkg.freebsd.org >>> Warning: Could not create a resolver structure: Could not open the >>> files ((null)) Try drill @localhost if you have a resolver running >>> on your machine. =20 >> >> OK, this isn't good. I suspect this is the cause of your problems. >> >> Try this. >> >> # sysrc local_unbound_enable=3DYES >> # service local_unbound setup >> # service local_unbound start >=20 > # sysrc local_unbound_enable=3DYES > local_unbound_enable: NO -> YES >=20 > # service local_unbound setup > Performing initial setup. > Extracting forwarders from /etc/resolv.conf. > /usr/sbin/local-unbound-setup: cannot open /etc/resolv.conf: No such > file or directory >=20 Yeah -- that's the smoking gun as to why pkg(8) was having problems. You didn't have /etc/resolv.conf or anything set up so your system could do DNS lookups. > No forwarders found in resolv.conf, unbound will recurse. This means that local_unbound will do all the work of DNS lookups itself, rather than handing the task off to the resolvers provided by your ISP (the 'forwarders' it mentions.) It's 6 of one and half-a-dozen of the other as to whether it's better to have forwarders or just have local_unbound recurse for itself. > /var/unbound/lan-zones.conf created > /var/unbound/control.conf created > /var/unbound/unbound.conf created > /etc/resolvconf.conf created > /usr/sbin/local-unbound-setup: cannot open /etc/resolv.conf: No such > file or directory > /etc/resolv.conf created >=20 > # service local_unbound start > Starting local_unbound. >=20 >> and try again with drill(1). If there is still no joy, let us know >> what the contents of /etc/resolv.conf and /var/unbound/forward.conf >> are. >=20 > # drill IN SRV _http._tcp.pkg.freebsd.org > Error: error sending query: No (valid) nameservers defined in the > resolver Curious. This should work if the local_unbound service is up and running= =2E > But at least, now I have: >=20 > #pkg update > Updating FreeBSD repository catalogue... > Fetching meta.txz: 100% 944 B 0.9kB/s 00:01 =20 > Fetching packagesite.txz: 100% 6 MiB 2.0MB/s 00:03 =20 > Processing entries: 100% > FreeBSD repository update completed. 25735 packages processed. >=20 > # pkg upgrade > Updating FreeBSD repository catalogue... > FreeBSD repository is up-to-date. > All repositories are up-to-date. > Checking for upgrades (0 candidates): 100% > Processing candidates (0 candidates): 100% > Checking integrity... done (0 conflicting) > Your packages are up to date. >=20 > Should I be happy with that or shall I dig further? So, enabling local_unbound has meant that you can successfully do DNS lookups now. You don't *have* to do anything more. It does, however, seem you somehow mislaid the configuration that you must have been using with 9.x --- entirely up to you if you can recover what that was or if you'ld prefer to revert back to that. Cheers, Matthew --fSCrgjePmttSrxm4VGp4krHriwUAw34om-- --NuIk6KV1q9TdqdvnlX1KFTQsruoDeQpgh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJYVzNdXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT11UP/RN6M2ec1/wFrUuvopqlUCR1 wY5jMVGgrDJXaaVlcKrL/idBBlK3QDUzgjVHow5Q5YNrs4cHimoXP0QpxHHnTC3z C1sNhNOK80jc3oybYqmsD0ug+NvtlcwqtFE2PcZNqdG0/SQHXYt0Mmwtk5KY7UpB FDF2m+u/Lb51VHbG7fW2TwAVKmjtdC79W5inyFyOX859pqdnGoq9U7E9ff6uDRDi b79dD6FI3DqsWGRg9KkNNSulXNXXuvqL8NmyyqdDKeHJlnq+D+MTCLqMThEFSGpb ro75F3O+XAAVZ1PR4fmm0xKmN6CL7EBBzoaYEtrxWO10c+qfUKR/Ugz8KJNZJwyp QNKxpFzXqxRwE8nlRgi3mYuC9NlO12gcFiXHFnWQqEKMu2N8ONi3z3o3OKKAh5dz W8fB3dWaxnZ+gv46OwSdkj0t4fiB57f0gatexuOtxwJg4XpXEUEKai+/JrsJ1+U9 /lZG75wVquqr1cQtRWUfYuG3XTo99V8xBpNFNiW2y2EOZ/fz/U9E/S3dUNEUszzg 8aSXQMBwmcRO+4N1NqCeWh+PfquQpximxIeXZCiRkF5ElEWqqRiqRRIP0aV/YQNA 4wVdDbDrB6Lm1VRbI9m5kUMFsMY//A9R44ZSG/jP6ZumgYSzDc8907kckpnAktFZ Zk31IWjdJ4M/r3etKY8G =PA5Q -----END PGP SIGNATURE----- --NuIk6KV1q9TdqdvnlX1KFTQsruoDeQpgh--