Pkg broken after update to U7?

Joined
Aug 20, 2015
Messages
6
Hello: two servers were on 11.2 U6 and this morning both were upgraded to U7. The upgrade seems to have gone entirely fine, but everytime I try and do something with pkg, on either server, I now get this response:

root@jsb[~]# pkg install nano
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!


Both machines can ping pkg.freebsd.org fine:

root@jsb[~]# ping pkg.freebsd.org
PING pkgmir.geo.freebsd.org (96.47.72.71): 56 data bytes
64 bytes from 96.47.72.71: icmp_seq=0 ttl=51 time=115.483 ms
64 bytes from 96.47.72.71: icmp_seq=1 ttl=51 time=106.246 ms
64 bytes from 96.47.72.71: icmp_seq=2 ttl=51 time=103.707 ms
64 bytes from 96.47.72.71: icmp_seq=3 ttl=51 time=109.352 ms


Pings to (for example) www.google.com are also responding fine:

ping www.google.com
PING www.google.com (216.58.210.36): 56 data bytes
64 bytes from 216.58.210.36: icmp_seq=0 ttl=55 time=21.648 ms
64 bytes from 216.58.210.36: icmp_seq=1 ttl=55 time=20.651 ms


Is my pkg error anything to do with U7 being so new that, maybe, necessary Internet-based repositories are not yet ready? Can anyone advise on a way of resolving the problem if not?

Any help appreciated.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'd note that FreeNAS is an appliance, and "necessary Internet-based repositories" don't exist to the best of my knowledge. You may be inadvertently picking up FreeBSD repositories, but AFAIK it's never been *expected* that this should work, seeing as how there is some divergence between FreeBSD and TrueOS.

It wouldn't shock me if someone has deliberately trimmed this stuff out of TrueOS in order to reduce the image size or something like that, but I don't know for sure. I can say that in a parallel project that also builds appliance-like images, we're running into a lot of bloat from the underlying FreeBSD OS and have taken to trimming unnecessary things.
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
When did you last try successfully on 11.2-U6? Maybe it didn't work there recently either?

Perhaps it's related to FreeBSD 11.2 now being EOL since Oct 31.
 
Joined
Aug 20, 2015
Messages
6
I'm sorry. I've evidently been unclear about my setup. I'm running Freenas 11.2U7 (U6 until this morning). Pkg was working correctly on both freenas servers this morning (when I installed, for example, sudo and bash); then I clicked the option to upgrade to U7, now pkg doesn't work (when I try to install nano, for example). I did the ping to freebsd test only because I saw that suggested on a forum thread where the suggestion was that Internet connectivity was borked and causing the drama.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If you're using it on the FreeNAS host and not a jail, you've used a hack to make that work under U6 at some point.

Upgrading versions will certainly put it back to standard = doesn't work.

If you're seeing that problem inside a jail... that's another story and it certainly should work, so let's discuss further if it's that.
 
Joined
Aug 20, 2015
Messages
6
OK. Much appreciated.

Not that anyone else is as likely to be as stupid as me, but this morning I installed my second FreeNAS server with a FreeBSD DVD instead of the correct disk. Naturally, I was indeed able to install sudo, bash and nano on that FreeBSD install before realising it was completely the wrong OS. I therefore wiped it, fetched the correct DVD and installed the correct (but U6) version of FreeNAS. Still in autopilot mode, I then upgraded the (correct) FreeBSD install to U7, before attempting to install sudo, bash and nano (somehow my brain had flipped back into FreeBSD mode).

Short version: I am very sorry to have wasted your, and everyone else's, time. The error is entirely my fault for confusing two different OSes (and not getting enough sleep yesterday!)

Thanks for steering me back to saner waters!!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Not a waste of time. Just be aware that when you make changes to FreeNAS, you're off the reservation, so to speak. Many changes, adding an editor, for example, are harmless, but some could have unintended side effects, so we don't encourage modifying the base system. Because FreeNAS uses FreeBSD as an upstream, many capabilities are tantalizingly just-within-reach or maybe just-outta-reach.
 
Top