DNS Error When Trying To Install PLEX

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
Hello everyone,

I'm new to all of this so I request your patience. Anyway, here are my specs:
TrueNAS 13.0 U4
MOBO: MSI B450M PRO-VDH MAX
CPU: Ryzen 5 3600
RAM: G.Skill aegis 2x8Gb 3000 CL 16
System Drive: Team group MP33 256Gb
Storage: x4 WD Red PLUS NAS 4TB

So I've been trying to install plex plug-in on my server for quite sometime and I've reached my limits. The problem is it would reach %50 and then I'd get this error:

"Error: plex had a failure Exception: RuntimeError Message: DNS Exception: The DNS operation timed out after 30.099679946899414 seconds pkg.FreeBSD.org could not be reached via DNS, check your network Partial plugin destroyed"

I've searched high and low on these forums and others, I've tried different stuff to no avail. What i tried so far:

1- Simply leave everything on default, checked DHCP I'd get this error: "Error: plex had a failure Exception: RuntimeError Message: + Acquiring DHCP address: FAILED, address received: ERROR, check jail logs Stopped plex due to DHCP failure Partial plugin destroyed"

2- I checked NAT I'd get the same DNS error message.

3- I assigned a static IP and I'd get the DNS error.

4- I tried advanced installation and unchecked DHCP, NAT, VNET, BPF and still get the DNS error.

I've attached a screen shot of my network settings, I tried different nameserver and still the same. Note that I'm able to successfully ping google, pkg.freeBSD.org and my router.
Please note that I'm using a second router which is connected to the router that have the internet connection, and this is about the only thing I can think of but I don't know what to do or how to test it.


I'm really about to give up on this so please any help is much appreciated.
 

Attachments

  • Screen Shot 2023-04-14 at 2.17.02 PM.png
    Screen Shot 2023-04-14 at 2.17.02 PM.png
    79.8 KB · Views: 134

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
install plex plug-in
You should not be using, or trying to use, plugins. They're a dead-end road, "all but deprecated", and "a path to sadness," the latter two being direct quotes from iX SVP of Engineering. See:

But that isn't the reason for your problem. The Realtek NIC is also known to be problematic, but unlikely to be the reason for your problem. What happens if you just create a jail? If you're able to do that successfully, see if you can ping, say, google.com from inside it.
 

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
You should not be using, or trying to use, plugins. They're a dead-end road, "all but deprecated", and "a path to sadness," the latter two being direct quotes from iX SVP of Engineering. See:

But that isn't the reason for your problem. The Realtek NIC is also known to be problematic, but unlikely to be the reason for your problem. What happens if you just create a jail? If you're able to do that successfully, see if you can ping, say, google.com from inside it.
Yeah I saw that qoute before but what does that mean exactly, I really dont know, is there an alternative to plug-ins?

Anyway, I can create jails no problem and I was able to ping google, I used a static IP with vnet checked. Just to make sure, I would ping it using the shell from the jail, correct?
 

Attachments

  • Screen Shot 2023-04-14 at 3.21.42 PM.png
    Screen Shot 2023-04-14 at 3.21.42 PM.png
    301.4 KB · Views: 126

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
There are several alternatives to plugins. To name just a few:
I see. Well during my search I came across the manual install. I read it, and even tried to install it but I have no idea what any of it means. I truly dont understand the instruction.
As for the other options, they seem to be just as complicated and out of my reach.

I just want to run plex, without all this comlication. I'm willing to try the manual install but I need help doing that. If I can just fix this DNS issue that would ideal though.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
How is the script "just as complicated"? Or in SCALE, it's a pushbutton thing.

If I can just fix this DNS issue that would ideal though.
No, it wouldn't, because you'd still be using a plugin, which remains a dead feature walking.
 

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
How is the script "just as complicated"? Or in SCALE, it's a pushbutton thing.


No, it wouldn't, because you'd still be using a plugin, which remains a dead feature walking.
I know how I'm sounding and I really hate that but I don't know anything about this but its really difficult to understand.

I'm looking at the manual installation on gitub, first thing it says is "download this script using git clone https://github.com/danb35/freenas-iocage-plex" I dont understand this at all. What is "git clone" and where exactly do I download it from. Then it says create a config file, how? and then what do I do with this, how does install the app?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
@HasanM, these are commands to run inside a generic jail. First, destroy your Plex plugin. Next create a generic 13.1-RELEASE jail. Once the jail is up, go into the jail shell, and run:
  • pkg bootstrap - This sets up the pkg software manager
  • pkg update -y - This updates the software in the jail to the latest versions
  • pkg install git - This installs git and its dependencies
  • mkdir -p /opt/plex - Create a directory for the Plex application
  • cd /opt/plex - Change location to the Plex directory
  • git clone https://github.com/danb35/freenas-iocage-plex - install @danb35's Plex script into /opt/plex
Once all the script pieces have downloaded, create the installation configuration file using nano plex-config, per the directions in the github link. Once the config file is saved, exit out of nano, and run ./plex-jail.sh to kick off the install. The install script plex-jail.sh will complain if the config file has syntax errors.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
these are commands to run inside a generic jail.
No, they are not. The script runs on the NAS itself, not inside a jail, just like my Nextcloud, Caddy, and Heimdall scripts. It creates a jail, it doesn't run inside a jail.

The commands would be, at the TrueNAS shell:
  • cd /mnt/poolname, where poolname is, well, whatever your main pool is called
  • git clone https://github.com/danb35/freenas-iocage-plex - download the script
  • cd freenas-iocage-plex - change to the directory where you downloaded it
  • nano plex-config - start the nano editor to create/edit the config file
  • Follow the instructions on the github page for the contents of the config file, then Ctrl-X to exit nano and save
  • ./plex-jail.sh
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

victort

Guru
Joined
Dec 31, 2021
Messages
973
I know how I'm sounding and I really hate that but I don't know anything about this but its really difficult to understand.

I'm looking at the manual installation on gitub, first thing it says is "download this script using git clone https://github.com/danb35/freenas-iocage-plex" I dont understand this at all. What is "git clone" and where exactly do I download it from. Then it says create a config file, how? and then what do I do with this, how does install the app?
I also started out not knowing anything. But trust me, the script versions of Nextcloud, Plex, and anything else is well worth reading the instructions a few times and asking any questions you might have.
 

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
@danb35 and @Samuel Tai thank you both so much, I really really appreciated it.
Can you clarify one thing, so after I run this command: nano plex-config it will create the config file? or do I create it on my pc and then upload it?
There are also optional things on the config file, so if I don't put those is it just gonna use what is specified to default?

BTW, I work in a remote area so I won't be able to try this until next week.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Nano is just a text editor. After creating the file, look at the bottom of the edit screen; there will be function key prompts to save and quit.

Any options omitted from the config will use the built-in defaults in the script.
 

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
I also started out not knowing anything. But trust me, the script versions of Nextcloud, Plex, and anything else is well worth reading the instructions a few times and asking any questions you might have.
Well, I don't mind learning new things and actually I could get deep into a subject. But when it comes to anything related to coding the words ricochet off my eyes, I just cant get into it.
But I'm pleasantly surprised by the replies and the help I'm getting so I'm optimistic :smile:
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Nano is just a text editor. After creating the file, look at the bottom of the edit screen; there will be function key prompts to save and quit.

Any options omitted from the config will use the built-in defaults in the script.
That “nano” editor was a bit of a challenge the first time I tried using it so I just used “edit”.

You can do
Code:
edit plex-config

Then once you have set all your options, just press the ESC key on your keyboard, and hit save.

I would still highly recommend the nano editor.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
...which is why I say "with your favorite text editor." I like nano; it's simple (at least for me). But if you're a masochist, you can use vi. Or there's ee, or edit, or probably others.
 

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
Hello guys, I'm happy to report that I successfully run the script and its complete! Thank you so much for the help.

Now one more thing. It says: "Mount your media folder into the jail, then start the jail" How would I go about that? Can someone explain breifly what the jail is, does plex run inside it? why would that be? or is it for where you store the media file?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
"Mount your media folder into the jail, then start the jail" How would I go about that?

Can someone explain breifly what the jail is, does plex run inside it? why would that be?
A jail is a FreeBSD container, kind of like a Docker container (though different in many ways). Since TrueNAS doesn't support installing additional software into the base system, you install it in jails instead. Plugins are also jails, they're just preconfigured and give you minimal ability to change them.
 

HasanM

Dabbler
Joined
Apr 14, 2023
Messages
13
Alright, so I'm stuck again. So I've opened plex web and connected it to the server, and I'm trying to set up my libaray and link it to plex. I'm following a video on yotube and the guy said first we need to edit the permissions for the media folder. The problem is there is no media folder under iocage. When I mounted the media into the jail, I saw the media folder but its under root folder. So when I try to edit the permissions for root folder I get this: "Error: [EPERM] Changing permissions on jail dataset paths is not permitted"
I tried creating a folder under iocage and edit the permission for it and I still get the same error.

This is the video I'm following:
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Stop the jail.
Expand the jail, and click Mount Points:
JailsOptions.png


You can then map your media dataset into a directory inside the jail.

DO NOT move anything under iocage, or try to modify permissions under iocage.
 
Top