Solved [Solved] Cannot install package in jails

fred974

Daemon

Thanks: 34
Messages: 1,460

#1
Hello,

I just installed a new jail on FreeBSD 10 ZFS and when I tried to install some packages, I get:
pkg install vim-lite
Code:
Updating repository catalogue
pkg: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/meta.txz: No address record
pkg: repository FreeBSD has no meta file, using default settings
pkg: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/digests.txz: No address record
pkg: Unable to update repository FreeBSD
All repositories are up-to-date
pkg: No packages available to install matching 'vim-lite' have been found in the repositories
In the jail I can add a package from a port with no problem, so it's not a network issue.

Could someone shed some light on this please?

Thank you
Fred
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,231
Messages: 27,212

#2
Re: Cannot install package in jails

The "no address record" indicates there's probably no DNS resolving. Check the /etc/resolv.conf in your jail.
 
OP
OP
fred974

fred974

Daemon

Thanks: 34
Messages: 1,460

#3
Re: Cannot install package in jails

SirDice said:
The "no address record" indicates there's probably no DNS resolving. Check the /etc/resolv.conf in your jail.
Morning @SirDice,
The /etc/resolv.conf in my jail is identical as the host.
I also realized that I have the same issue in the host environment..
pkg install sudo
Code:
Updating repository catalogue                                                                          
pkg: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/meta.txz: Not Found                               
pkg: repository FreeBSD has no meta file, using default settings                                       
FreeBSD repository is up-to-date                                                                       
All repositories are up-to-date                                                                        
pkg: Repo FreeBSD needs schema upgrade from 2006 to 2010 but it is opened readonly                     
pkg: need to re-create repo FreeBSD to upgrade schema version                                          
pkg: No packages available to install matching 'sudo' have been found in the repositories
 
Last edited by a moderator:

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,231
Messages: 27,212

#4
Re: Cannot install package in jails

The errors are different. The jail can't resolve the address, the host seems to have a problem with the catalog. The error on the host can probably be solved with pkg update -f.
 
OP
OP
fred974

fred974

Daemon

Thanks: 34
Messages: 1,460

#5
Re: Cannot install package in jails

pkg update -f has indeed resolved the host problem.

In the jail is still get the error message despite having the same /etc/resolv.conf file as the host.
Code:
Updating repository catalogue
pkg: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/meta.txz: No address record
pkg: repository FreeBSD has no meta file, using default settings
pkg: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/digests.txz: No address record
pkg: Unable to update repository FreeBSD
All repositories are up-to-date
pkg: No packages available to install matching 'vim-lite' have been found in the repositories
I did pfctl -d to disable pf and tried installing the packages but with no success.
Am I right to think that if the problem is with the /etc/resolv.conf, Installing from port shouldn't work either?
/etc/resolv.conf
Code:
# Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,231
Messages: 27,212

#6
Re: Cannot install package in jails

fred974 said:
Am I right to think that if the problem is with the /etc/resolv.conf, Installing from port shouldn't work either?
That's correct. If the system cannot resolve hostnames it cannot download the distfiles either.

How's the jail set up? Are you using lo1 perhaps?
 
OP
OP
fred974

fred974

Daemon

Thanks: 34
Messages: 1,460

#7
Re: Cannot install package in jails

Here is my networking setup:
/etc/rc.conf
Code:
### Local network configuration ###
#if lagg breaks we'll neeed this uncommented
#ifconfig_bce0="inet 192.168.0.185 netmask 255.255.255.0"

### Link Aggregation and Failover 
cloned_interfaces="lagg0"
ifconfig_bce0="up"
ifconfig_bce1="up"
#ifconfig_lagg0="laggproto lacp laggport bce0 laggport bce1 192.168.0.185/24"
ifconfig_lagg0="laggproto lacp laggport bce0 laggport bce1"
ipv4_addrs_lagg0="192.168.0.185/24"
defaultrouter="192.168.0.1"

### Jail network interface aliases ###
ifconfig_lagg0_alias0="inet 192.168.0.125 netmask 255.255.255.0" # webjail
ifconfig_lagg0_alias1="inet 192.168.0.130 netmask 255.255.255.0" # sqljail
#ifconfig_lagg0_alias2="inet 192.168.0.145 netmask 255.255.255.0" # mailjail
 
OP
OP
fred974

fred974

Daemon

Thanks: 34
Messages: 1,460

#8
Re: Cannot install package in jails

I found my mistake: I had a different IP address for webjail at the beginning and I had to change it due to a bind to port error. I changed the IP address in /etc/rc.conf but forgot to update the /usr/local/etc/ezjail/webjail configuration file.
 
Top