Problems With the Package Repository?

#1

// Today our member Aquina experienced a bit of a problem with the pkg binary of FreeBSD. Maybe someone can help us debug this.
// Comments start with //.

~% about

General information

boot environment now (N) … 12.0-CURRENT-up-20180213_152723 NR 2018-02-13
after restart ® … 12.0-CURRENT-up-20180213_152723 NR 2018-02-13
boot loader …………………………………… BSD
type ……………………… BIOS
CPU ………………………………………………………… [REDACTED, but AMD with patched Orochi Pi Microcode]
number of cores ……………… N
host ……………………………………………………… TROS#1/2
memory ………………………………………………… 1535 MB available, 833 MB free
OS git branch ……………………………………………………………………………………… trueos-stable-17.12
OS git revision ………………………………………………………………………………… d26791952
OS kernel build time ………………………………………………………… Sat 2017 Dec 9 18:10:09 UTC
OS kernel identity …………………………………………… (uname -i) GENERIC
OS platform (architecture) ……………………… (uname -m) amd64
OS release level ………………………………………………… (uname -r) 12.0-CURRENT
OS version and patch level …… (freebsd-version) 12.0-CURRENT
TrueOS package set ………………… PRODUCTION
TrueOS version …………………………… TrueOS-Desktop-201712111405
uptime ………………………………………………… 56 mins
user …………………………………………………… [REDACTED] A. C. Denton (tron-delta.org Staff DIR I)

More (TrueOS Desktop):

desktop environment …… Lumina
sound card driver ………… pcm0: <Intel ICH (82801AA)> (play/rec) default
wireless driver ……………… 
X11 drivers ………………………… vboxvideo_drv.so 

[denton@TROS] ~% sudo pkg audit -F
Fetching vuln.xml.bz2: 100% 703 KiB 720.2kB/s 00:01
tor-0.3.1.8 is vulnerable:
tor – Use-after-free in onion service v2
CVE: CVE-2017-8819
WWW: https://vuxml.FreeBSD.org/freebsd/36ef8753-d86f-11e7-ad28-0025908740c2.html

tiff-4.0.9 is vulnerable:
tiff – multiple vulnerabilities
CVE: CVE-2017-18013
CVE: CVE-2017-9935
WWW: https://vuxml.FreeBSD.org/freebsd/b38e8150-0535-11e8-96ab-0800271d4b9c.html

libxml2-2.9.4 is vulnerable:
libxml2 – Multiple Issues
CVE: CVE-2017-9050
CVE: CVE-2017-9049
CVE: CVE-2017-9048
CVE: CVE-2017-9047
CVE: CVE-2017-8872
WWW: https://vuxml.FreeBSD.org/freebsd/76e59f55-4f7a-4887-bcb0-11604004163a.html

curl-7.56.1 is vulnerable:
cURL – Multiple vulnerabilities
CVE: CVE-2018-1000007
WWW: https://vuxml.FreeBSD.org/freebsd/0cbf0fa6-dcb7-469c-b87a-f94cffd94583.html

curl-7.56.1 is vulnerable:
cURL – Multiple vulnerabilities
CVE: CVE-2017-8818
CVE: CVE-2017-8817
CVE: CVE-2017-8816
WWW: https://vuxml.FreeBSD.org/freebsd/301a01b7-d50e-11e7-ac58-b499baebfeaf.html

libXcursor-1.1.14_4 is vulnerable:
libXcursor – integer overflow that can lead to heap buffer overflow
CVE: CVE-2017-16612
WWW: https://vuxml.FreeBSD.org/freebsd/ddecde18-e33b-11e7-a293-54e1ad3d6335.html

5 problem(s) in the installed packages found.

[denton@TROS] ~% pkg_tree | grep ‘tor’
|__ lumina-calculator-1.4.1_201712071357
lumina-calculator-1.4.1_201712071357
tor-0.3.1.8
tpm-emulator-0.7.4_2
__ tpm-emulator-0.7.4_2
|__ tor-0.3.1.8

[denton@TROS] ~% sudo pkg install libxml2-2.9.4
Updating trueos-base repository catalogue…
trueos-base repository is up to date.
Updating trueos-major repository catalogue…
trueos-major repository is up to date.
All repositories are up to date.
Checking integrity… done (0 conflicting)
The most recent version of packages are already installed

// Someone on IRC then recommended pkg update -f and retry pkg install libxml2-2.9.4 later
// The manual page did not outline the “update -f” option an parameter, but she tried it nonetheless.

[denton@TROS] ~% sudo pkg update -f
Password: ****************
Updating trueos-base repository catalogue…
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 55 KiB 56.6kB/s 00:01
Processing entries: 100%
trueos-base repository update completed. 797 packages processed.
Updating trueos-major repository catalogue…
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 768.7kB/s 00:08
Processing entries: 100%
trueos-major repository update completed. 27128 packages processed.
All repositories are up to date.

// Then the bad things started to happen. Errors, lots of errors with pkg install libxml2-2.9.4 …

[denton@TROS] ~% sudo pkg install libxml2-2.9.4
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!

[denton@TROS] ~% sudo pkg update
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 55 KiB 56.6kB/s 00:01
Processing entries: 100%
trueos-base repository update completed. 797 packages processed.
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 768.7kB/s 00:08
Processing entries: 100%
trueos-major repository update completed. 27128 packages processed.
All repositories are up to date.

[denton@TROS] ~% sudo pkg search keepass
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
[denton@TROS] ~% sudo pkg install libxml2-2.9.4
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 55 KiB 56.6kB/s 00:01
Processing entries: 100%
trueos-base repository update completed. 797 packages processed.
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 768.7kB/s 00:08
Processing entries: 100%
trueos-major repository update completed. 27128 packages processed.
All repositories are up to date.
Checking integrity… done (0 conflicting)
The most recent version of packages are already installed

// At least the PC-BSD/TrueOS pc-updatemanager seemed to work correctly. Why?

denton@TROS] ~% sudo pc-updatemanager pkgcheck
Boot-strapping updater…OK
Updating trueos-base repository catalogue…
trueos-base repository is up to date.
Updating trueos-major repository catalogue…
trueos-major repository is up to date.
All repositories are up to date.
All packages are up to date!

[denton@TROS] ~% sudo pc-updatemanager pkgupdate
Boot-strapping updater…OK
Your packages are already up to date!

// Now the errors are gone. Why?

[denton@TROS] ~% sudo pkg install libxml2-2.9.4
Password: ****************
Updating trueos-base repository catalogue…
trueos-base repository is up to date.
Updating trueos-major repository catalogue…
trueos-major repository is up to date.
All repositories are up to date.
Checking integrity… done (0 conflicting)
The most recent version of packages are already installed

[denton@TROS] ~% sudo pkg search keepass
KeePassX-0.4.4 Cross Platform Password Manager
keepass-2.37 Light-weight and easy-to-use password manager
keepassx-devel-2.0.3_1 Cross Platform Password Manager
keepassx2-2.0.3,2 Cross Platform Password Manager
keepassxc-2.2.2 KeePass Cross-platform Community Edition
p5-File-KeePass-2.03_1 Interface to KeePassX, KeePass 1.x and 2.x database files
p5-File-KeePass-Agent-2.01_1 Application agent for working with File::KeePass objects

// But now different errors …

[denton@TROS] ~% sudo pkg install nano
Updating trueos-base repository catalogue…
trueos-base repository is up to date.
Updating trueos-major repository catalogue…
trueos-major repository is up to date.
All repositories are up to date.

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified

trueos-desktop-201712111405 is locked and may not be modified
Checking integrity… done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
nano: 2.9.1 [trueos-major]

Number of packages to be installed: 1

The process will require 2 MiB more space.

Proceed with this action? [y/N]:

[denton@TROS] ~% sudo pkg search qt3
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
[denton@TROS] ~% sudo pkg search wine

pkg-static: Repository trueos-base missing. ‘pkg update’ required
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found

[denton@TROS] ~% sudo pkg update -f
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!

[denton@TROS] ~% sudo pc-updatemanager pkgcheck
Boot-strapping updater…OK
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!
ERROR: Error 70: /usr/local/sbin/pkg-static update

// sigh
// What did pkg update -f do to her system? Is it broken beyond repair now? Fortunately its just one of our test machines for evaluaton of TrueOS. Of course though, we’d like to understand what happened.

[denton@TROS] ~% sudo pkg install linux-flashplayer
[…]
Number of packages to be installed: 29

The process will require 350 MiB more space.
67 MiB to be downloaded.

Proceed with this action? [y/N]: N

[denton@TROS] ~% sudo pc-updatemanager pkgcheck
Boot-strapping updater…OK
Updating trueos-base repository catalogue…
trueos-base repository is up to date.
Updating trueos-major repository catalogue…
trueos-major repository is up to date.
All repositories are up to date.
All packages are up to date!

[denton@TROS] ~% sudo pkg install virtualbox-ose-additions
Updating trueos-base repository catalogue…
trueos-base repository is up to date.
Updating trueos-major repository catalogue…
trueos-major repository is up to date.
All repositories are up to date.
Checking integrity… done (0 conflicting)
The most recent version of packages are already installed

// Now it works again? Why?
// But then …

[denton@TROS] ~% sudo pkg search openjdk
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found

[denton@TROS] ~% sudo pkg search gimp
pkg-static: Repository trueos-base missing. ‘pkg update’ required
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found

[denton@TROS] ~% sudo pkg search jdk
pkg-static: Repository trueos-base missing. ‘pkg update’ required
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found

[denton@TROS] ~% sudo pkg update
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!

[denton@TROS] ~% sudo pkg update -f
Updating trueos-base repository catalogue…
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!

0 Likes

#2

Your Hostname looks illegal (’#’? ‘/’?).

Where did You get:

TrueOS package set ………………… PRODUCTION
Why isn’t it ‘STABLE’?

1 Like

#3

Hello bsdtester, we already saw you on the forum and liked some of your posts. Thank you thus for replying. TROS is the machine name, but internally we reference it as TDOG-ADM-MH-VM2-TROS142. The machine is a virtual machine I was told.

I/we don’t know about PRODUCTION. We know STABLE and UNSTABLE make a difference with the updates and things, but we only executed the commands listed. Maybe PRODUCTION comes from the pkg commands we (AD) issued? Maybe it is in the logs? Thank you for your help!! :slight_smile:

0 Likes

#4

I have:
# ls -l /var/db/pkg
total 64761
-rw-r–r-- 1 root wheel 79290368 Feb 9 00:21 local.sqlite
-rw-r–r-- 1 root wheel 921600 Jan 18 11:47 repo-trueos-base.sqlite
-rw-r–r-- 1 root wheel 1556480 Jan 18 11:47 repo-trueos-build.sqlite
-rw-r–r-- 1 root wheel 44281856 Jan 18 11:47 repo-trueos-major.sqlite
-rw-r–r-- 1 root wheel 246 Jan 18 11:47 trueos-base.meta
-rw-r–r-- 1 root wheel 246 Jan 18 11:47 trueos-build.meta
-rw-r–r-- 1 root wheel 246 Jan 18 11:47 trueos-major.meta
-r–r--r-- 1 root wheel 5125793 Feb 21 00:42 vuln.xml

What do You have?

0 Likes

#5

Just an FYI:
“PRODUCTION” is the default repo type in /usr/local/etc/trueos.conf, and is a holdover from older days that translates directly to the “STABLE” repository (we used to call the repos PRODUCTION/EDGE a couple years ago). It it possible that value could still be set at install time right now for the latest STABLE ISO’s, but I believe that was fixed recently and is properly set to STABLE/UNSTABLE on install now.

@TRON-DELTA
It appears that something has happened to your connection to the packages repositories on the CDN. Those errors are associated with a local copy of the package database that is out of sync with the upstream repositories. Running pkg update -f (forcibly re-sync the local database copy) as root is the standard fix for this type of situation, but if your connection to the CDN is still not stabilized you will get errors like that. It is possible that there is a bad CDN node somewhere in your area of the world which is causing the issues (because it is serving an incomplete/bad repository and conflicting with the other nodes), and sending us the output of host pkg.cdn.trueos.org in an email or a private message will let us alert the CDN provider to check that system.

3 Likes

#6

~% ls -l /var/db/pkg
total 45563
-rw-r–r-- 1 root wheel 31223808 Feb 20 00:21 local.sqlite
-rw-r–r-- 1 root wheel 921600 Dec 9 20:13 repo-trueos-base.sqlite
-rw-r–r-- 1 root wheel 1642496 Feb 13 12:03 repo-trueos-build.sqlite
-rw-r–r-- 1 root wheel 44281856 Jan 3 21:08 repo-trueos-major.sqlite
-rw-r–r-- 1 root wheel 246 Dec 9 20:13 trueos-base.meta
-rw-r–r-- 1 root wheel 246 Feb 13 12:04 trueos-build.meta
-rw-r–r-- 1 root wheel 246 Feb 18 18:35 trueos-major.meta
-r–r--r-- 1 root wheel 5124342 Feb 18 12:13 vuln.xml

~% sudo pkg update -f
Updating trueos-base repository catalogue…
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 55 KiB 28.3kB/s 00:02
Processing entries: 100%
trueos-base repository update completed. 797 packages processed.
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 768.7kB/s 00:08
Processing entries: 100%
trueos-major repository update completed. 27128 packages processed.
pkg-static: sqlite error while executing RELEASE SAVEPOINT REPO in file pkgdb.c:1255: disk I/O error
Unable to update repository trueos-major
Error updating repositories!

~% sudo pkg search jdk
pkg-static: Repository trueos-base missing. ‘pkg update’ required
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found

~% ls -l /var/db/pkg
total 45563
-rw-r–r-- 1 root wheel 31223808 Feb 20 00:21 local.sqlite
-rw-r–r-- 1 root wheel 921600 Dec 9 20:13 repo-trueos-base.sqlite
-rw-r–r-- 1 root wheel 1642496 Feb 13 12:03 repo-trueos-build.sqlite
-rw-r–r-- 1 root wheel 44281856 Jan 3 21:08 repo-trueos-major.sqlite
-rw-r–r-- 1 root wheel 246 Dec 9 20:13 trueos-base.meta
-rw-r–r-- 1 root wheel 246 Feb 13 12:04 trueos-build.meta
-rw-r–r-- 1 root wheel 246 Jan 3 21:08 trueos-major.meta
-r–r--r-- 1 root wheel 5124342 Feb 18 12:13 vuln.xml

~% date
Wed Feb 21 17:04:19 CET (UTC+1:00)

// A minute later…

~% sudo pkg update -f
Updating trueos-base repository catalogue…
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 55 KiB 56.6kB/s 00:01
Processing entries: 100%
trueos-base repository update completed. 797 packages processed.
Updating trueos-major repository catalogue…
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 1 KiB 1.5kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 768.7kB/s 00:08
Processing entries: 100%
trueos-major repository update completed. 27128 packages processed.
All repositories are up to date.

~% sudo pkg search jdk
bootstrap-openjdk-r351880_1 Oracle’s Java 6 virtual machine release under the GPL v2
bootstrap-openjdk6-r450701 Java Development Kit 6
bootstrap-openjdk8-r450802 Java Development Kit 8
openjdk-7.151.01,1 Java Development Kit 7
openjdk-jre-7.151.01,1 Java Runtime Environment 7
openjdk6-b44,1 Oracle’s Java 6 virtual machine release under the GPL v2
openjdk6-jre-b44,1 Oracle’s Java 6 Runtime Environment under the GPL v2
openjdk8-8.152.16 Java Development Kit 8
openjdk8-jre-8.152.16 Java Runtime Environment 8
rxtx-openjdk8-2.2p2_4 Native interface to serial ports in Java

// Then an hout alter after another problem with pkg…

http://pkg.cdn.trueos.org/master/amd64-base/ (this time for testing called in Mozilla Firefox):

404 Not Found
nginx/1.12.1

// O.k. so its not our VM and we double checked our network infrastructure – nothing changed. And now http://pkg.cdn.trueos.org/master/amd64-base/ is reachable again showing alle the .txz packages.

// This is clearly a problem of the CDN. Can a TrueOS sysadmin look into this, please?

0 Likes

#7

~% host pkg.cdn.trueos.org
pkg.cdn.trueos.org is an alias for pkg.pcbsd.scaleengine.net.
pkg.pcbsd.scaleengine.net is an alias for pcbsd-pkg.secdn.net.
pcbsd-pkg.secdn.net has address 138.201.136.125

// Hello Mr. Moore, thanks for your reply! The hosts are above. We hope it will help you.
// Best regards [sib]

// Yes, the hosts are bad. Can alternaitve hosts be forced via a configuration file or cli? [mip]

0 Likes

#8

Did You do Your package actions as root or as regular user?

Because:
% ls -l /var/db/pkg/repo-trueos-major.sqlite
-rw-r–r-- 1 root wheel 44281856 Jan 18 11:47 /var/db/pkg/repo-trueos-major.sqlite

Edit:
I know, You used ‘sudo’.
Try ‘su -l’, login, and try again.

I don’t understand, why it’s saying: file not found.

0 Likes

#9

The pkg commands were executed as a regular user who was defined in sudoers, thus with the permissions or in context of root without being root, as one can see from the previous post.

The command ~% ls -l /var/db/pkg was executed as a regular user too, without privilege elevation with sudo. It seems like the directory is executable and its contents are readable for non-privileged users too.

Thus permissions do not seem to be the problem here. It seems to us like beanpole has found the solution to the problem. It looks like it is a network/CDN related problem.

It said 404 not found, since it was a web request in Firefox to eliminate pkg from the equation. It was not a pkg problem though.

0 Likes

#10

If You think it’s solved, that’s fine.

The error message is weird:

load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory

It could happen to me, too. I wanted to understand this message.

1 Like

#11

We’ve also had some hiccups the last few days because the CDN was unreachable or just 404’ing from time to time. Could be verified by trying to open e.g. http://pkg.cdn.trueos.org/master/amd64-base/ in a browser.
Mostly after waiting for a few minutes the CDN was back and pkg operations worked again as expected.

This is normal as the pkg tool triggers updating the package database by just removing the db-files, recognizing they are missing and then loading them from the repo. At least this is the behaviour I’ve always seen with pkg on TrueOS…

1 Like

#12

Thank You for the explanation.
Now, I feel better.

0 Likes

#13

Does that imply a longer lasting network outage would prevent users effectively from using pkg (e. g. pkg remove PACKAGE) until the unnecessarily deleted files were replaced by downloaded ones? Why does the update process not do an non in-place (in non-situ) replacement and thus replace the file when the file was correctly downloaded? Could that be altered somehow?

0 Likes

#14

There used to be a “-u” flag which you could give to pkg to skip the automatic database check/sync, but it looks like they might have removed that flag with the latest version of pkg (along with adding a bunch of other database verification screw-ups in the latest version). We are still looking into this as well since the latest version of pkg is also screwing up a bunch of our automation frameworks,

3 Likes

#15

Same here (new install, location: Greece):

pkg update -f
Updating trueos-base repository catalogue...
pkg-static: Repository trueos-base load error: access repo file(/var/db/pkg/repo-trueos-base.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/meta.txz: Not Found
repository trueos-base has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64-base/packagesite.txz: Not Found
Unable to update repository trueos-base
Updating trueos-major repository catalogue...
pkg-static: Repository trueos-major load error: access repo file(/var/db/pkg/repo-trueos-major.sqlite) failed: No such file or directory
pkg-static: http://pkg.cdn.trueos.org/master/amd64/meta.txz: Not Found
repository trueos-major has no meta file, using default settings
pkg-static: http://pkg.cdn.trueos.org/master/amd64/packagesite.txz: Not Found
Unable to update repository trueos-major
Error updating repositories!


host pkg.cdn.trueos.org
pkg.cdn.trueos.org is an alias for pkg.pcbsd.scaleengine.net.
pkg.pcbsd.scaleengine.net is an alias for pcbsd-pkg.secdn.net.
pcbsd-pkg.secdn.net has address 77.95.228.10
pcbsd-pkg.secdn.net has IPv6 address 2001:470:1:4c8::1:81
2 Likes

#16

@beanpole135 the repo at one of the IPs (54.37.238.114) assigned to pkg.pcbsd.scaleengine.net is empty. Assigning 23.81.66.76 to pkg.pcbsd.scaleengine.net in my /etc/hosts allowed me to do my upgrade. It is only a temporary workaround, of course, but at least it got me out of the hole.

1 Like

#17

I also had to put static entries for pkg.cdn.trueos.org and pkg.pcbsd.scaleengine.net on our nameservers because the CDN-host(s) which are returning empty repos and/or 404s caused our local nginx cache to flush and updating clients were breaking left and right. Newly deployed clients also got screwed up massively due to over half of the needed packages were missing after setup…

0 Likes

#18

We have filed a support ticket with ScaleEngine (our CDN provider) for this issue (and linked this thread for additional information). Hopefully this will get sorted out soon.

3 Likes

#19

Haven’t seen pkg acting up on any of our systems since ~24h. I’ve installed/updated 3 hosts this morning without errors from pkg, so it seems the problem has been resolved, thanks! :+1:

1 Like

#20

Let’s hope for the best.

Suggestion: Maybe the TrueOS devs want to consider adding a check script to TrueOS which does detect CND outages and acts accordingly when needed.

Also it seems to make sense to not purge the repository files unless new ones were successfully downloaded.

0 Likes