jails Error fetching http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/Latest/pkg.txz: No address record

Hello to everyone.

I've just created my first jail and I've used the iocage script....

Code:
# zpool import

pool: zroot
id: 3547020836659149114
state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier,though some features will not be available without an explicit 'zpool upgrade'. config:

zroot                                       ONLINE
gptid/73565c3d-4021-11ec-84b1-e0d55ee21f22  ONLINE

# zpool import -fR /mnt/clonos zroot

# iocage activate zroot

#iocage fetch

[0] 11.2-RELEASE
[1] 11.3-RELEASE
[2] 11.4-RELEASE
[3] 12.0-RELEASE
[4] 12.1-RELEASE
[5] 12.2-RELEASE
[6] 13.0-RELEASE

Type the number of the desired RELEASE
Press [Enter] to fetch the default selection: (13.0-RELEASE)
Type EXIT to quit: 3
Fetching: 12.0-RELEASE

# iocage create -r 12.0-RELEASE -n clonos ip4_addr="em0|192.168.1.150/24"

# iocage start clonos

# iocage console clonos

Missing default rc.conf, creating it
clonos successfully created!

# iocage start clonos

* Starting clonos
  + Started OK
  + Using devfs_ruleset: 1000 (iocage generated default)
  + Using IP options: ip4.saddrsel=1 ip4=new ip6.saddrsel=1 ip6=new
  + Starting services OK
  + Executing poststart OK

# iocage list

+-----+--------+-------+--------------+-----+
| JID |  NAME  | STATE |   RELEASE    | IP4 |
+=====+========+=======+==============+=====+
| 1   | clonos | up    | 12.0-RELEASE | -   |
+-----+--------+-------+--------------+-----+

# iocage console clonos

FreeBSD 13.0-RELEASE-p4 (GENERIC) #0: Tue Aug 24 07:33:27 UTC 2021

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.

root@clonos:~ # freebsd-version -u

12.0-RELEASE-p13


root@clonos:/usr/local # 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 pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.


root@clonos:/usr/local # pkg


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 pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.


root@clonos:/usr/local # find / -name mgmt


root@clonos:/usr/local # portsnap fetch extract


Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching public key from portsnap.FreeBSD.org... failed.
No mirrors remaining, giving up.
 
Jails aside: that's often symptomatic of an issue affecting name resolution i.e. DNS.

yes. I've found why. For some reason,the gateway 192.168.1.1 is being commented each time I log out from the jail on /etc/resolv.conf file inside the jail.
 
maybe I haven't been able to explain well. everytime I remove the # from gateway 192.168.1.1 and I go out of the jail and relogin inside of it,I will find again the #. Im sure that this behavior is not documented on the man pages. and anyway,I'm not able to process effectively the informations inside the man pages. They are ordered sistematically and this does not help me at all to focus my attention where it should be. I skip them systematically and I look for the same informations but packed in a different shape.
 
In the jail:
  1. ee /etc/resolvconf.conf
  2. if your required server is 192.168.1.1, add the line below
  3. escape and save the file
  4. resolvconf -u
name_servers="192.168.1.1"

Step (4) will write your /etc/resolvconf.conf configuration to /etc/resolv.conf
 
Back
Top