SOLVED DNS issue?

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
After updating my truenas from 12.3 to truenas 13.0-U3 and trying to set up a new jail i ran into some connectivity issue where i couldn't acces it through the webgui as i'm used to. While trying to figure out why that happened i reinstalled that jail a couple times, changing 1 thing at a time to try and find the problem, all the while installing packages when needed when suddenly i could no longer install packages in these new jails. Which started a new search through different topics to try and solve that problem which brings me here.

Code:
root@Temby:~ # pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/pkg.txz: No address record
Address resolution failed for http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly.
Consider changing PACKAGESITE
 


After looking around a bit i found that others have had similar issuess so i tried pinging to see what i could do from inside a freshly made jail.

Code:
root@Temby:~ # ping pkg.freebsd.org
ping: Unknown host
root@Temby:~ # ping google-public-dns-a.google.com
ping: Unknown host
root@Temby:~ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=57 time=26.392 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=23.309 ms


So it seems to be related to DNS but i haven't touched any DNS settings on that machine while updating. The only change to my knowledge is updating Truenas to it's latest versions some time ago. Checking my global configuration in Network tab i see my Nameserver 1 = 8.8.8.8 and Nameserver 2 = 1.1.1.1 . So since i can ping 8.8.8.8 i would assume it can acces the DNS server and should be able to resolve the pkg.freebsd.org name.

Now i'm stuck as i'm still quite the novice at the OS, basically i've been set it and forget it unless i get notifications in my approach. But now i need help.
 
Last edited:

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
After trying to ping from the truenass shell, both through the web ui and through SSH, i also couldn't ping towards www.google.com so i checked the updates for my truenass 13 version and i saw pkgdb and pkgtools updates. After applying those i can now ping again both in the web ui and inside the jail. I am now also installing pkg's so seems to have been a truenas problem? Either way i'm glad it works again!

PS: The dropdown menu to assign SOLVED to this thread only has the option edit or delete thread, but for me this is solved now.

PPS: Noticed this topic could be set to Solved now so i did.
 
Last edited:
Joined
Dec 10, 2023
Messages
1
@Jerren, can you elaborate a little bit on what you did to solve this issue? The symptoms you're describing exactly match the frustrating behavior that I'm running into. Unfortunately, I don't see any pending/available updates for my system, and I don't know how to go about specifically checking for or applying updates to the pkgdb and pkgtools objects that you mentioned.

Code:
root@plex_media_server:~ # pkg update
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/Latest/pkg.txz: No address record
Address resolution failed for http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly.
Consider changing PACKAGESITE
root@plex_media_server:~ # echo $PACKAGESITE
PACKAGESITE: Undefined variable.
root@plex_media_server:~ # ping -c 1 pkg.freebsd.org
ping: Unknown host
root@plex_media_server:~ # ping -c 1 96.47.72.71
PING 96.47.72.71 (96.47.72.71): 56 data bytes
64 bytes from 192.168.1.99: icmp_seq=0 ttl=51 time=27.914 ms

--- 96.47.72.71 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 27.914/27.914/27.914/0.000 ms
root@plex_media_server:~ # google-public-dns-a.google.com
ping: Unknown host
root@plex_media_server:~ # ping -c 1 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 192.168.1.99: icmp_seq=0 ttl=114 time=6.242 ms

--- 96.47.72.71 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 6.242/6.242/6.242/0.000 ms


The jail I'm operating in is on TrueNas 13.1
Code:
root@plex_media_server:~ # freebsd-version
13.1-RELEASE-p9


Sorry for reviving a solved thread, but this is the closest I've come to finding anyone else with my same issue. As you noted, there are so many post on various forums describing a similar issue, and they all seem to be resolved with a simple modification of the /etc/resolv.conf file, but as far as I can tell, my file is properly formed:
Code:
root@plex_media_server:~ # cat /etc/resolv.conf
domain local
search local
nameserver 9.9.9.9
nameserver 149.112.112.112


Stranger still, when I ping from the truenas shell (has the same config in it's resolv.conf file), the pkg.freebsd.org domain resolves without issue.

The only other advice I've seen is to check that the FreeBSD.conf pkg repo config is set properly, and I believe I'm using the recommended values there.

Code:
root@plex_media_server:~ # ls /usr/local/etc/pkg/repos
FreeBSD.conf
root@plex_media_server:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
# $FreeBSD$
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}


I've also seen recommendation to use
Code:
pkg bootstrap -f
but that gives the same error as
Code:
pkg update
with the only difference being that it tries to bootstrap from
Code:
pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest
instead of
Code:
pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly
.

Help me Jerren. You're my only hope.
 
Top