Solved Difficulty upgrading Jails

Hi All,

I upgraded my server from 13.0-RELEASE-p4 to 13.0-RELEASE-p13, and when I tried to run python3.9 in a jail I got the following error:

Code:
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found

So I search on the forum and find this: https://forums.freebsd.org/threads/...d-by-usr-local-lib-libpython3-9-so-1-0.86449/ , which looks like it would solve my problem.

As this jail is stateless, rather than upgrade I decided to delete and recreate the jail with bsdinstall. However despite my machine being 13.0-RELEASE-p13, the jail was installed with 13.0-RC4, and the error above persists.

So I decide to try to upgrade it using the instructions, but now I get a different failure:

Code:
freebsd-update -b /path_to_jail --currently-running 13.0-RC4  -r `freebsd-version` upgrade
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.0-RC4 from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 2 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base world/lib32

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 13.0-RELEASE-p13 from update2.freebsd.org... failed.
Fetching metadata signature for 13.0-RELEASE-p13 from update1.freebsd.org... failed.
No mirrors remaining, giving up.

This may be because upgrading from this platform (amd64)
or release (13.0-RELEASE-p13) is unsupported by freebsd-update. Only
platforms with Tier 1 support can be upgraded by freebsd-update.
See https://www.freebsd.org/platforms/index.html for more info.

If unsupported, FreeBSD must be upgraded by source.

What am I doing wrong? Specifically:
1. Why is bsdinstall installing such an out of date version, if the machine has been upgraded multiple times to reach 13.0-RELEASE-p13? I would have expected bsdinstall to automatically build jails with the same version as the host is running.
2. Why can't I upgrade the jail to the latest version? Is it because RC4 is far too out of date?

Any help/pointers appreciated, thanks!
 
Jail: No I do not, this is a clean jail, with only pkg and python3.9 installed
Host: Yes, I have python3.7, 3.8 and 3.9 installed.
 
I run "FreeBSD 13.1-RELEASE-p2" on host & jail , and /lib/libc.so.7 is available on host and jail.
Could it be the python is too new for your OS version ?
 
Well, it is possible that 13.0-RC4 is too old, that is what I suspect anyway. Hence why my question on this thread is not about resolving the library issue, but why I can't upgrade the jail using recommended methods, and also why when I create a new jail, it creates it with a version far older than what is running on the server.
 

SirDice

Administrator
Staff member
Administrator
Moderator
upgraded my server from 13.0-RELEASE-p4 to 13.0-RELEASE-p13, and when I tried to run python3.9 in a jail I got the following error:
Code:
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found
13.0 is End-of-life and not supported anymore. Packages are built specifically for 13.1. Upgrade your host (and your jails) to 13.1.
 
On your host you have to run :
Code:
freebsd-update fetch
or
freebsd-update upgrade -r XXX
&
freebsd-update install
freebsd-update install
After that, the same for the jail.
 
Ok, so 13.0 is EOL. Surely I should still be able to upgrade the jails to the same version as the host? In my command I am specifically requesting the same version as I am currently running on the host.

I guess I will try upgrading the entire box to 13.1, but I worry this will break all the other jails currently running. Will let you know what happens.
 

SirDice

Administrator
Staff member
Administrator
Moderator
And to explain the issue with this command: freebsd-update -b /path_to_jail --currently-running 13.0-RC4 -r `freebsd-version` upgrade

freebsd-version(1) will output something like 13.0-RELEASE-p4, which is an incorrect label for freebsd-update -r <version> upgrade. It has to be freebsd-update -r 13.0-RELEASE upgrade without the -pX attached to it. And yes, this will upgrade it directly to 13.0-RELEASE-p4 as that's the latest 13.0-RELEASE version.
 
Thank you for the explanation, sorry for the questions but I am trying to work out how the jail system works.

What is the reason for the new jails to be created with the 13.0-RC4 version? That has nothing to do with my current running version, or the 13.0-RELEASE version. It seems very out of date.

All I can think is that this server was originally installed as 13.0-RC4, but surely bsdinstall should build jails with the same version as my host? Or at least the same major release (in this case 13.0-RELEASE).
 

SirDice

Administrator
Staff member
Administrator
Moderator
What is the reason for the new jails to be created with the 13.0-RC4 version?
Don't know. How are you creating them?

Don't use bsdinstall(8) myself, but looking through the man pages:
Code:
     BSDINSTALL_DISTDIR       The directory in which the distribution files
                              can be found (or to which they should be
                              downloaded).  Default: “/usr/freebsd-dist”
I'm going to bet the files in /usr/freebsd-dist are from 13.0-RC4 and have probably never been updated.
 
Hi All,

I upgraded my server from 13.0-RELEASE-p4 to 13.0-RELEASE-p13, and when I tried to run python3.9 in a jail I got the following error:

Code:
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found

So I search on the forum and find this: https://forums.freebsd.org/threads/...d-by-usr-local-lib-libpython3-9-so-1-0.86449/ , which looks like it would solve my problem.

As this jail is stateless, rather than upgrade I decided to delete and recreate the jail with bsdinstall. However despite my machine being 13.0-RELEASE-p13, the jail was installed with 13.0-RC4, and the error above persists.

So I decide to try to upgrade it using the instructions, but now I get a different failure:

Code:
freebsd-update -b /path_to_jail --currently-running 13.0-RC4  -r `freebsd-version` upgrade
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.0-RC4 from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 2 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base world/lib32

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 13.0-RELEASE-p13 from update2.freebsd.org... failed.
Fetching metadata signature for 13.0-RELEASE-p13 from update1.freebsd.org... failed.
No mirrors remaining, giving up.

This may be because upgrading from this platform (amd64)
or release (13.0-RELEASE-p13) is unsupported by freebsd-update. Only
platforms with Tier 1 support can be upgraded by freebsd-update.
See https://www.freebsd.org/platforms/index.html for more info.

If unsupported, FreeBSD must be upgraded by source.

What am I doing wrong? Specifically:
1. Why is bsdinstall installing such an out of date version, if the machine has been upgraded multiple times to reach 13.0-RELEASE-p13? I would have expected bsdinstall to automatically build jails with the same version as the host is running.
2. Why can't I upgrade the jail to the latest version? Is it because RC4 is far too out of date?

Any help/pointers appreciated, thanks!
Please type in this command in the jail and report back its output:

uname -UK
 
Same error:
for certbot, python, wget ...
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.8.so.1.0 not found

In jail web:
me@web:~ $ uname -UK
1301000 1300139
me@web:~ $

In jail web:
me@web:~ $ uname -a
FreeBSD web 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64
me@web:~ $

In host system:
[julio@nomada ~]$ uname -UK
1301000 1301000
[julio@nomada ~]$ uname -a
FreeBSD nomada 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64



I tried to solve with multiples

freebsd-update -b /usr/jails/web fetch/install

and
 
Hey all,

Sorry for the delay. As I predicted, upgrading the host resulted in some kind of breakage. Although in this case it was a trashed ZFS array, which I did not expect (I don't think the upgrade itself did it though, just bad luck).

I had to spend the last few weeks trying to recover, and after failing at recovery, a rebuild and restore from backups (which is still ongoing).

As for upgrading jails. First, I tried doing it from the jail itself. These are the commands I ran:
Code:
freebsd-update fetch install
freebsd-update --currently-running 13.0-RC4 -r 13.1-RELEASE upgrade
freebsd-update install

At the "freebsd-update install" section, I get the following errors:

Code:
root@jail:/ # freebsd-update install
src component not installed, skipped
Installing updates...chflags: ///lib/libc.so.7: Operation not permitted
chflags: ///lib/libcrypt.so.5: Operation not permitted
chflags: ///lib/libthr.so.3: Operation not permitted
chflags: ///libexec/ld-elf.so.1: Operation not permitted
chflags: ///libexec/ld-elf32.so.1: Operation not permitted
chflags: ///sbin/init: Operation not permitted
chflags: ///usr/bin/chpass: Operation not permitted
chflags: ///usr/bin/crontab: Operation not permitted
chflags: ///usr/bin/login: Operation not permitted
chflags: ///usr/bin/opieinfo: Operation not permitted
chflags: ///usr/bin/opiepasswd: Operation not permitted
chflags: ///usr/bin/passwd: Operation not permitted
chflags: ///usr/bin/su: Operation not permitted
chflags: ///usr/lib/librt.so.1: Operation not permitted
chflags: ///usr/lib32/libc.so.7: Operation not permitted
chflags: ///usr/lib32/libcrypt.so.5: Operation not permitted
chflags: ///usr/lib32/librt.so.1: Operation not permitted
chflags: ///usr/lib32/libthr.so.3: Operation not permitted
chflags: ///lib/libc.so.7: Operation not permitted
chflags: ///lib/libcrypt.so.5: Operation not permitted
chflags: ///lib/libthr.so.3: Operation not permitted
chflags: ///libexec/ld-elf.so.1: Operation not permitted
chflags: ///libexec/ld-elf32.so.1: Operation not permitted
chflags: ///sbin/init: Operation not permitted
chflags: ///usr/bin/chpass: Operation not permitted
chflags: ///usr/bin/crontab: Operation not permitted
chflags: ///usr/bin/login: Operation not permitted
chflags: ///usr/bin/opieinfo: Operation not permitted
chflags: ///usr/bin/opiepasswd: Operation not permitted
chflags: ///usr/bin/passwd: Operation not permitted
chflags: ///usr/bin/su: Operation not permitted
chflags: ///usr/lib/librt.so.1: Operation not permitted
chflags: ///usr/lib32/libc.so.7: Operation not permitted
chflags: ///usr/lib32/libcrypt.so.5: Operation not permitted
chflags: ///usr/lib32/librt.so.1: Operation not permitted
chflags: ///usr/lib32/libthr.so.3: Operation not permitted

What is going wrong here? I thought it was supposed to be possible to upgrade from within the jail?

With that failure, I decided to try upgrading it from the host, using the following commands:

Code:
freebsd-update -b /path/to/jail fetch install
freebsd-update -b /path/to/jail  --currently-running 13.0-RC4 -r 13.1-RELEASE upgrade
freebsd-update -b /path/to/jail install
service jail restart 
freebsd-update -b /path/to/jail install

Which worked! :) Python3.9 now works as it is supposed to! Happy to mark this thread as solved now, thanks all for your help!


I'm going to bet the files in /usr/freebsd-dist are from 13.0-RC4 and have probably never been updated.

Your wager was won! I would have expected those files to be upgraded when I upgraded the host, but apparently not. Now I am aware I will try to update those and create new jails.

For reference, the /usr/freebsd-dist older contains the following on my machine:
Code:
total 251518
-rw-r--r--  1 root  wheel       1046 Mar 29  2021 MANIFEST
-rw-r--r--  1 root  wheel  188592356 Apr 13  2021 base.txz
-rw-r--r--  1 root  wheel   68759384 Apr 13  2021 lib32.txz

And yes, they are quite old. These look like the same base archives as you get from the FTP server, so I replaced the above with the same files from
$FTP_SERVER/pub/FreeBSD/releases/amd64/13.1-RELEASE/ so new jails I build are already the new release. Just have to remember to update these files every time I do a release upgrade of the host.
 
Top