pkg not installed in Jail after upgrade from 12.2 to 13.0

cooter

Dabbler
Joined
Feb 28, 2016
Messages
29
I just upgraded Truenas to 13.1. After doing so I ran the iocage upgrade for all my jails. All worked well except my Plex jail. Plex is up and running, but I can't update any pkgs.

Here is the errors I get, seems to be an issue with certificates, but I am not sure how to resolve:
Code:
root@plexmediaserver-plexpass:~ # 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/latest, please wait...
pkg: Error loading revoked certificates
root@plexmediaserver-plexpass:~ #


And when I try to use PMS Updater:
Code:
root@plexmediaserver-plexpass:~ # ./PMS_Updater.sh -vv -a
Using URL https://plex.tv/api/downloads/5.json
Searching https://plex.tv/api/downloads/5.json for the FreeBSD download URL .....Certificate verification failed for /C=US/O=DigiCert Inc/CN=DigiCert TLS RSA SHA256 2020 CA1
34374492160:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:1915:
fetch: https://plex.tv/api/downloads/5.json?channel=plexpass&X-Plex-Token=XXXXXXXXXXXXXXXXXXXX: Authentication error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Python/python27.zip/json/__init__.py", line 291, in load
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Python/python27.zip/json/__init__.py", line 339, in loads
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Python/python27.zip/json/decoder.py", line 364, in decode
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Python/python27.zip/json/decoder.py", line 382, in raw_decode
ValueError: No JSON object could be decoded
Could not find a FreeBSD download link on page https://plex.tv/api/downloads/5.json?channel=plexpass&X-Plex-Token=XXXXXXXXXXXXXXXXXXXX
root@plexmediaserver-plexpass:~ #


Any thoughts on how to fix?
 
Joined
Oct 22, 2019
Messages
3,641
Can you try in the jail,
pkg bootstrap -f

Followed by,
pkg update

---

Also try restarting the jail before and after doing the above.
 

cooter

Dabbler
Joined
Feb 28, 2016
Messages
29
I restarted the jail multiple times as you mentioned, here is result:
Code:
root@plexmediaserver-plexpass:~ # pkg bootstrap -f
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/latest, please wait...
pkg: Error loading revoked certificates
root@plexmediaserver-plexpass:~ # 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/latest, please wait...
pkg: Error loading revoked certificates
root@plexmediaserver-plexpass:~ #
 
Joined
Oct 22, 2019
Messages
3,641
pkg: Error loading revoked certificates
This one is out of my wheelhouse.

Someone more well versed with FreeBSD might know how to refresh/update the reference to revoked certificates.
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
Is the clock set correctly ?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
In the Plex jail, does the /usr/share/keys/pkg/revoked directory exist?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Do you have a file in /usr/share/keys/pkg/trusted, named pkg.freebsd.org.2013102301, with contents:

Code:
# $FreeBSD$

function: "sha256"
fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"


and permissions
-rw-r--r-- 1 root wheel 112 May 12 04:29 pkg.freebsd.org.2013102301
 

cooter

Dabbler
Joined
Feb 28, 2016
Messages
29
Do you have a file in /usr/share/keys/pkg/trusted, named pkg.freebsd.org.2013102301, with contents:

Code:
# $FreeBSD$

function: "sha256"
fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"


and permissions
Code:
root@plexmediaserver-plexpass:/usr/share/keys/pkg/trusted # ls                  
pkg.freebsd.org.2013102301
root@plexmediaserver-plexpass:/usr/share/keys/pkg/trusted #


Code:
# $FreeBSD$

function: "sha256"
fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"

file "pkg.freebsd.org.2013102301", 4 lines, read only


Code:
root@plexmediaserver-plexpass:/usr/share/keys/pkg/trusted # ls -l
total 7
-rw-r--r--  1 root  wheel  112 Apr  9  2021 pkg.freebsd.org.2013102301
root@plexmediaserver-plexpass:/usr/share/keys/pkg/trusted #
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What's the date and time of your system?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Something's gone corrupt in that jail. Try recreating it from scratch.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Does the jail have internet access? Has the update changed some network/DNS settings?
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I think I'd probably rebuild it, and Plex shouldn't be too difficult to do. You should be able to copy across the plex user files too, or even better, move them to a dataset outside the jail and mount them back in.
 

cooter

Dabbler
Joined
Feb 28, 2016
Messages
29
I ended up rebuilding the jail which resolved the issue. One question I run into with my last jail and this new jail is when I run:

Code:
service plexmediaserver_plexpass status


I get:

Code:
root@plex:~ # service plexmediaserver_plexpass status
plexmediaserver_plexpass is not running.


But Plex is up and running. When I list services, this is the list of services the name is "plexmediaserver_plexpass". I can start and stop the service, but the status does not display properly. Thoughts on that one?

One thing I did when rebuilding it, was a backed up and restored my "Plex Media Server" directory/database. Not sure if that could impact this.
 
Top