Our forum migration to Discourse is underway and scheduled to last through June 21. During the migration, the forums will be read-only, except for a single temporary forum (contents of which will not be getting transferred). Read our announcement post for more information about the forum migration.
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex reliably fails to transcode for streaming in FreeBSD jails

durin42durin42 Members Posts: 4

Steps to reproduce:
1) Make a pristine FreeBSD VM
2) Install ezjail (or some other mechanism for creating a jail)
3) Install plex in the jail
4) Give that plex something that needs to be transcoded to play
5) Try and watch that file

Expected results:
I get some lovely streaming plex output.

Observed results:
The transcoder runs and uses CPU like I'd expect, and I see a transcode session in /usr/local/plexdata/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-$SOME_NOISE-$SOME_UUID, which contains a bunch of .m4s files. At some point the transcoder exits (I think when it finishes transcoding the entire file?) and then PMS decides the transcoder crashed, but the UI never gives any indication that anything went wrong, I just see the orange spinner forever.

This is a recent-ish regression: I know this was working a few months ago (I haven't had time to go hunting until now), and if it'd help I can try and find a version that works to facilitate bisection of the defect on your end.

It looks like FreeNAS users are able to get this working by giving the jail a virtualized network stack, but that's not enabled (yet) by default in FreeBSD, but that's at least suggestive of some sort of networking antics? Enabling raw sockets in the jail did not help.

How do the transcoder and main server communicate? Is there a decent way for me to try and spy on that channel and figure out what's going wrong there?

Answers

  • durin42durin42 Members Posts: 4

    Forgot to attach logs, they're on this comment.

  • ctphillipsctphillips Members, Plex Pass Posts: 14 Plex Pass
    edited May 10

    I think this issue is affecting me as well. @durin42 Is there a guide you can point me to "(give) the jail a virtualized network stack?"

    EDIT: I may have this enabled already? VIMAGE is checked in my PMS jail (advanced settings). Still, I'm experiencing pretty much the same symptoms you are.

  • durin42durin42 Members Posts: 4

    This is weird, but I found a fix: make sure to:
    1. Assign an IP from the 127/8 space to the jail (I used 127.0.0.2)
    2. Make that be the first IP assigned to the jail (so it's LAN IP is assigned second)

    Doing those two things resolved my issue, and things now work. Maybe the PMS side of things is checking the peer's IP and rejecting things that don't appear to be from localhost?

    In any event, it's working now on 11.1 with the GENERIC kernel in a jail. :)

  • AstroZombie1AstroZombie1 Members, Plex Pass Posts: 83 Plex Pass

    @durin42 said:
    This is weird, but I found a fix: make sure to:
    1. Assign an IP from the 127/8 space to the jail (I used 127.0.0.2)
    2. Make that be the first IP assigned to the jail (so it's LAN IP is assigned second)

    Doing those two things resolved my issue, and things now work. Maybe the PMS side of things is checking the peer's IP and rejecting things that don't appear to be from localhost?

    In any event, it's working now on 11.1 with the GENERIC kernel in a jail. :)

    Can you expand on this i'm pulling my hair out here I've deleted and re-installed the plugin, mounted storage and messed with permissions nothing is working to get anything to transcode and there's very little anywhere pointing to why this is happening on here, or the freenas forums.

  • YupsterXJYupsterXJ Members Posts: 1

    I'm running an iocage jail of plex on freenas 11.1 and I'm having a similar issue. I tried assigning 2 ip addresses like durin42 suggested but had no luck. @AstroZombie1 I also tried the freenas plug-in with no success. I've been searching and coming up empty. I eventually tried setting it up on my windows 10 system and when it's configured as a plex server transcoding works fine. I did that just to test and see if my mkv on the freenas could be transcoded properly.

    @durin42 was there any other magic you did whilst finding your solution?

    What I'm seeing when trying to transcode is that the Trasncode/Sessions folder is modified and a temp transcode session folder is made but no files are created in the folder (that I can tell) and then the transcode fails. Permissions seem to be ok since the folder modified date is updated.
    I followed these instructions from the freenas forum for my install:
    https://forums.freenas.org/index.php?threads/sorta-fresh-plex-in-iocage.60000/#post-425405

    I REALLY don't want to convert all my mkv files.

Sign In or Register to comment.