Can't upgrade Plex (says I'm up to date)

Toydoll

Dabbler
Joined
Sep 17, 2015
Messages
33
Hi


Short story
When I do pkg upgrade on my plex jail it tells me:
Code:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.

pkg info (and plex gui) says I'm on 1.15.x.x which is over a year old. Not up to date in other words.
How do I start to troubleshoot?



Long story
Against better judgment I decided to upgrade from 11.2U2 to 11.3U1. I did that via an update to 11.2U7 (or was it U8?) which was recommended.

Sadly my experience with upgrades of Freenas usually means a bunch of hours on the forums and google to try and fix things, this time is no worse. First it failed to find one hard drive, but that fixed itself after half an hour.

Anyway.

My initial problem:
I couldn't update Plex that's in a jail I created a long time ago.

My initial try to fix this:
After some reading the problem seemed to be that the jail itself was old, which it was. So I upgraded it using the gui which made it to 11.2-p15. Which proved not to be enough.
I read some more and tried some more, that seemed to be harmless, commands. Nothing helped.
I then followed a small guide here in the forum (which I sadly can't find again) that had helped others. The terminal then spat out what seemed like several hunderds of lines and then suddenly stop, went black and all that was written was "more" and something else. I walked away for 15 minutes thinking it needed time or something. When I came back the terminal had diconnected and plex had stopped working all together.

I then used an old snapshot, maybe that was bad?
I decided to roll back the jail to a point before I started to make changes, which was before I upgraded to 11.3. Now Plex works but I'm met with a new problem.

My current problem:
I still can't upgrade plex. When I do pkg upgrade it says I'm up to date, which I'm not. My plex version is 1.15.something which is over a year old.


Where do I begin to fix this mess?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
You can bang around on this, make sure the jail itself is on 11.3 (iocage upgrade plexjailname -r 11.3-RELEASE), pkg is set to current not quarterly (/usr/local/etc/pkg/repos/FreeBSD.conf, create from /etc/pkg/FreeBSD.conf and set to latest if it doesn't exist), and so on.

Or you could, at least as a side effort, create a dataset for Plex metadata, and create a new Plex (base) jail, link your old metadata in, and be off to the races. Sometimes banging your head against it ain't worth it.

There are a number of scripts to handle Plex jails, I like this one: https://github.com/danb35/freenas-iocage-plex . If you use that, I'd create a dataset for plex_data and point the script at it, just for ease of snapshotting, no Windows permissions, and so on.

That'll create a jail and an external dataset. You can then stop both plex jails, rsync your metadata into the new (external to the jail) dataset, start the new Plex jail, and after some testing, retire the old one.

I did this recently, from plugin to jail, just manually and minus the script. If you prefer manual work, that works just as well. You'll have two mount points: One for media and one for metadata.

rsync -ha can take a few hours, be prepared for that. Discussion of rsync is here: https://www.ixsystems.com/community...o-dataset-while-preserving-permissions.47730/

I'm glad I made the switch. Now if my Plex install ever gets completely confused, I can create a new jail and just mount the metadata in that I already have outside the jail.
 

Toydoll

Dabbler
Joined
Sep 17, 2015
Messages
33
Now that I see it I remember that "iocage upgrade plexjailname -r 11.3-RELEASE" is what made my terminal crash before, when it went dark and only gave me the word "more" an something else.

But I tried it again and made some kind of progress. I had to answer "yes" to a question (which I should according to the forum) and then it got to work for a while. It then said:

Code:
Applying patches... done.
Fetching 619 files... done.
Attempting to automatically merge changes in files... done.
The following files will be removed as part of updating to
11.3-RELEASE-p7:
/boot/loader.help
/usr/include/c++/v1/experimental/dynarray
/usr/include/pcap/export-defs.h
/usr/lib/clang/6.0.0
/usr/lib/clang/6.0.0/include
/
/and ≈40 similar lines
/
/usr/lib/clang/6.0.0/include/clzerointrin.h
/usr/lib/clang/6.0.0/include/cpuid.h
/usr/lib/clang/6.0.0/include/emmintrin.h
--More--(byte 2485)


I guess that's where the word "more" came from. But how do I proceed from this? While I've had freenas for a while I'm still quite bad at it, if it for some reason got passed anyone...
What exactly does "more (byte xxxx) means? I tried to scroll and press the arrow key. When I pressed the key down the byte number got bigger and bigger but it didn't seem to stop.

I speak two languages, swedish and english, this is more like greek to me...




I did think about creating a new jail and copy all the old metadata to that one but then I remembered that I tried it for some reason a few years ago and I never got it to work. I found a step by step guide that was written for idiots like me and yet it didn't fully work. But that was some time ago, maybe it's time to give it another try.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
When you see "more" you can just press the spacebar.

Screen going dark - you are doing this from the UI console I just realized. That is risky, because if it disconnects on you, you're in a bad spot. Enable the SSH service and SSH in with a good client of choice. That way, when you do CLI work the session won't die on you mid-work.
 

Toydoll

Dabbler
Joined
Sep 17, 2015
Messages
33
Yey, it worked :) The jail is now 11.3-p7.

Didn't solve my base problem though, it still says
Code:
root@Plex:/ # pkg upgrade plexmediaserver-plexpass
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.

even though there are several newer versions available.


And btw, I did actually use the terminal on my mac when it crashed (or whatever it did).

But now it's way past bedtime. Good night.


Edit:
I'll throw in this while I'm at it.
Code:
root@Plex:/ # pkg info
pkg-1.10.5_5                   Package manager
plexmediaserver-plexpass-1.15.2.793_1 Plex Media Server component
root@Plex:/ # 
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
When you are awake again, check FreeBSD.conf and make sure it's current, not quarterly, see above.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Agreed. That’s what I meant by “pkg is set to current not quarterly (/usr/local/etc/pkg/repos/FreeBSD.conf, create from /etc/pkg/FreeBSD.conf and set to latest if it doesn't exist)”, and thanks for the link, that’s more useful to someone who hasn’t dealt with it before than the shorthand I posted.

Though I have to question your use of ee. vi is the Editor Of The Righteous. It Is Known.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
ee is simple to use for a beginner especially for just a quick edit like I posted above and there is no learning curve. If you need to use an editor on a regular basis then it would make sense to use something else.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Teach me to try and use nerd humor without /s or smilies ... and I happen to agree, if I’m not trying to be funny.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
vi is the Editor Of The Righteous.
I thought emacs was the One Editor to Rule Them All. (honestly, I use nano most of the time--where should I hand in my geek card?)
 

Toydoll

Dabbler
Joined
Sep 17, 2015
Messages
33
Thanks for the replies.

According to freshports the oldest update after my Plex version is more than a year old, so even if it is quarterly shouldn't it be downloaded?

But anyway, since I want the latest version I decided to change to "latest" by following Jailers instructions
mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/FreeBSD.conf

Add the following code:
Code:
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}


Then run pkg upgrade and finish the installation.

But I still can't upgrade, at least now I get an error istead of it just telling me I'm up to date:

Code:
root@Plex:/ # pkg upgrade
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
[Plex] Fetching meta.txz: 100%    916 B   0.9kB/s    00:01    
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
[Plex] Fetching packagesite.txz: 100%    6 MiB   2.2MB/s    00:03    
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!


Not sure if ut's any help but:
/var/db/pkg/FreeBSD.meta said:
version = 2;
packing_format = "txz";
manifests = "packagesite.yaml";
filesite = "filesite.yaml";
manifests_archive = "packagesite";
filesite_archive = "filesite";


Any idea for a fix?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Below is what cat /etc/pkg/FreeBSD.conf shows me.

Typically I:

mkdir -p /usr/local/etc/pkg/repos
cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/
ee /usr/local/etc/pkg/repos

Change to latest

That way you know it's correctly formatted for the jail version you are on.


Code:
root@Plex-Transcode:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
# $FreeBSD: releng/11.3/etc/pkg/FreeBSD.conf 347034 2019-05-02 23:59:44Z gjb $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
root@Plex-Transcode:~ # cat /etc/pkg/FreeBSD.conf
# $FreeBSD: releng/11.3/etc/pkg/FreeBSD.conf 347034 2019-05-02 23:59:44Z gjb $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
 

Toydoll

Dabbler
Joined
Sep 17, 2015
Messages
33
Solution (which might have broken something else)

I was adviced sometwhere else to try "pkg bootstrap -f" and after doing that "pkg upgrade" worked fine. Now I have the latest version of Plex: 1.19.1.2589

But...

New problem
Plex doesn't work, at all. Since that's a whole new problem I created a new thread for it: https://www.ixsystems.com/community/threads/cant-start-plex-after-upgrade.83668/
 

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
700
I have been using the standard Plex plug in and then the PMS updater "mod" to keep up to date with plex (plexpass) without issue for quite awhile now
 
Top