[Ubuntu 16.04 (SmartOS)] Plex Media Server crashes while adding a Premium Music

server-linux

#1

When adding a Premium Music Library, Plex Media Server crashes while scanning the audio files. Adding a Standard Music Library works fine. After the Plex Media Server crashes and restarts, I can "Scan Library Files" and it will continue for a while until it crashes again. Repeating this scan process about 40 times, I was eventually able to add all 725 albums in my music library. I'm concerned about the stability of the system, so I'd like to prevent these crashes.

OS: Ubuntu 16.04 with latest updates running inside a SmartOS LX Branded Zone
SmartOS: 20171221T020409Z
Plex Media Server: 1.11.0.4666-fc63598ba
RAM: 8GB allocated to the zone

Attached are the Plex logs and the JSON file I used to create the Ubuntu 16.04 zone (actual domain named changed to "mydomain.com"). After creating the zone, I updated the system (apt get update, apt-get upgrade), configured the hostname and time zone, installed the udev package, rebooted, and finally installed Plex Media Server.

I also tried creating a CentOS 7 zone and the same crash occurs. I installed Ubuntu 16.04 on VMware Fusion 10.1.0 and was able to scan the same music library without crashing. The music library is originally from a Mac running iTunes. The library was copied to a 2010 Mac Pro running Plex Media Server on macOS 10.12.6 under ESXi 6.5 and it worked fine there, too. I tried migrating Plex from that Mac to Ubuntu under SmartOS, and everything came over fine except the Premium Music Library. So, I created this "test" zone to diagnose the problem. I ran the entire music library through FileBot to clean up the naming. I'm using a subset of the library ("Various Artists") for testing.

Can you please help me fix this?

Thank you.


#2

I don’t know what you’re doing there but it doesn’t look standard by any means.

  1. What’s the ESXi adapter type? It should be e1000e for Ubuntu

If you’re using some other variant of linux, as reported here, then I have know way of knowing what’s happing. I don’t even know what distro it’s based off of. If I don’t know what distro base, there’s no way to help other than tell you what I see:

This tells me you local loopback adapter is going nuts. 127.0.0.1 should exist as a singular point, not a subnet. However that was defined, it’s incorrect.

Dec 30, 2017 12:44:41.615 [0x7fffdba00700] DEBUG - Auth: authenticated user 1 as plexiverse
Dec 30, 2017 12:44:41.615 [0x7fffdae00700] DEBUG - Auth: authenticated user 1 as plexiverse
Dec 30, 2017 12:44:41.615 [0x7fffb8a00700] DEBUG - Request: [10.0.1.11:60735 (Subnet)] GET /status/sessions/background (13 live) GZIP Signed-in Token (plexiverse)
Dec 30, 2017 12:44:41.615 [0x7fff9e200700] DEBUG - Request: [10.0.1.11:60725 (Subnet)] GET /status/sessions/background (13 live) GZIP Signed-in Token (plexiverse)
Dec 30, 2017 12:44:41.616 [0x7fffdae00700] DEBUG - Completed: [10.0.1.11:60735] 200 GET /status/sessions/background (13 live) GZIP 1ms 397 bytes (pipelined: 39)
Dec 30, 2017 12:44:41.617 [0x7fffdae00700] DEBUG - Completed: [10.0.1.11:60725] 200 GET /status/sessions/background (13 live) GZIP 1ms 397 bytes (pipelined: 208)
Dec 30, 2017 12:44:41.711 [0x7fffca200700] WARN - NetworkServiceBrowser: Error sending out discover packet from 127.0.0.1 to 127.255.255.255: Network is unreachable
Dec 30, 2017 12:44:41.711 [0x7fffca200700] WARN - NetworkServiceBrowser: Error sending out discover packet from 127.0.0.1 to 127.255.255.255: Network is unreachable
Dec 30, 2017 12:44:41.972 [0x7fffc3200700] DEBUG - HTTP 200 response from GET http://127.0.0.1:48807/:/plugins/com.plexapp.agents.localmedia/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_

Here, PMS is attempting to perform its tasks and can’t because of the lookback adapter configuration

Dec 30, 2017 12:41:39.781 [0x7fffdba00700] DEBUG - Completed: [10.0.1.11:60691] 200 PUT /updater/check?download=0 (11 live) GZIP 728ms 195 bytes (pipelined: 3)
Dec 30, 2017 12:41:40.577 [0x7fffd2600700] DEBUG - HTTP 200 response from POST http://127.0.0.1:32600/devices/discover
Dec 30, 2017 12:41:41.711 [0x7fffca200700] WARN - NetworkServiceBrowser: Error sending out discover packet from 127.0.0.1 to 127.255.255.255: Network is unreachable
Dec 30, 2017 12:41:41.711 [0x7fffca200700] WARN - NetworkServiceBrowser: Error sending out discover packet from 127.0.0.1 to 127.255.255.255: Network is unreachable
Dec 30, 2017 12:41:46.711 [0x7fffca200700] WARN - NetworkServiceBrowser: Error sending out discover packet from 127.0.0.1 to 127.255.255.255: Network is unreachable
Dec 30, 2017 12:41:46.711 [0x7fffca200700] WARN - NetworkServiceBrowser: Error sending out discover packet from 127.0.0.1 to 127.255.255.255: Network is unreachable
Dec 30, 2017 12:41:47.959 [0x7fffd6200700] DEBUG - Gracenote: Loading 29 locales in 16.0 seconds.
Dec 30, 2017 12:41:48.070 [0x7fffdae00700] DEBUG - Auth: authenticated user 1 as plexiverse

If you look through Plex Media Server.1.log, you will see the Scanner is matching your entries via Gracenote as it should. Other than a few minor errors where it disagrees about discs/album count, there is nothing ‘crashing’

Nowhere in any of your logs do I see ant signs of a “Crash”.

Had it actually hard crashed, upon restart it would have found the crash dump file and attempted to upload it or stated that crash upload is disabled.
I find no crash dump entries.

Please explain further or does this give you enough information?


#3

Hello ChuckPA, thank you for responding promptly and for the information. I appreciate it.

Sorry for the confusing post. I’ve been running a lot of different tests to determine the problem, so I included too much information in the first post. This test system isn’t running in VMware, it’s running under SmartOS in an LX Zone with Ubuntu 16.04. Basically, it’s an OpenSolaris distribution running a “zone” that translates Linux system calls to Solaris system calls in real time. I realize that this is a non-standard configuration. Other than the scanner issue, Plex works great (and I saw other posts here by people using SmartOS), so I hope we can figure this out.

  1. Here’s some information on my loopback and host configuration:

     root@test:~# ifconfig lo
     lo        Link encap:Local Loopback  
               inet addr:127.0.0.1  Mask:255.0.0.0
               inet6 addr: ::1/128 Scope:Host
               UP LOOPBACK RUNNING MULTICAST  MTU:8232  Metric:1
               RX packets:0 errors:0 dropped:0 overru0 frame:0
               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0 
               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
     root@test:~# cat /etc/hostname
     test
    
     root@test:~# cat /etc/hosts
     127.0.0.1       localhost test.mydomain.com
     ::1             localhost ip6-localhost ip6-loopback
     ff02::1         ip6-allnodes
     ff02::2         ip6-allrouters
    

Does this look ok?

  1. With regards to crashing, SmartOS apparently stores the core files in a zone-specific directory instead of the “Crash Reports” directory. Plex Media Server did crash, and I see core files here:

     [root@smartos01 ~]# ls -al /zones/761f6a13-1db5-6e20-beae-d17d0eb6e99b/cores
     total 150820
     drwxr-xr-x   2 root     root           4 Dec 30 22:09 .
     drwx------   6 root     root           7 Dec 30 20:10 ..
     -rw-------   1 root     root     139156596 Dec 30 20:44 core.Plex Media Serve.85816
     -rw-------   1 root     root     118775796 Dec 30 22:10 core.Plex Media Serve.95959
    

Would it be helpful if I submit the core files manually using CrashUploader?

Thank you again for your help.


#4

I see what’s happening.

127.0.0.1       localhost test.mydomain.com

The loopback can’t accept a domain name because it is of scope Host

what is “SmartOS” ?

It’s not something I know we officially support.


#5

I changed it to

127.0.0.1       localhost

and was able to scan the “Various Artists” subset of my music library without crashing. :smile:

SmartOS is an OpenSolaris distribution primarily used in cloud computing. I’m using it to get the benefits of the ZFS file system and to use zones for light-weight virtualization without the overhead of a virtual machine. You can find more information at the SmartOS Wiki.

Now, I’m going to test my entire music library. Thanks, ChuckPA!


#6

ChuckPA, I tried running adding a Premium Music Library on the with my entire music library (instead of just a subset), and Plex Media Server crashed after creating 39 albums out of about 720. Attached are the latest logs.

Do you see anything else that I need to fix?


#7

@plexiverse said:
I changed it to

127.0.0.1       localhost

and was able to scan the “Various Artists” subset of my music library without crashing. :smile:

SmartOS is an OpenSolaris distribution primarily used in cloud computing. I’m using it to get the benefits of the ZFS file system and to use zones for light-weight virtualization without the overhead of a virtual machine. You can find more information at the SmartOS Wiki.

Now, I’m going to test my entire music library. Thanks, ChuckPA!

What you’re attempting will never work fully. You have Unix, not Linux. It’s compiled based on different runtime libraries. Sure, you’re getting some functionality but you’ll never have 100%. This explains the problems.

SmartOs is a derivation of OpenSolaris which is a derivation of Sun Solaris which is a derivation Sun SunOS which is a derivation of Berkeley (standard) BSD Unix .

I used BSD unix and SunOS in the 1980’s, and Solaris in the 1990’s.

FreeBSD is the closest thing to SunOS I know of to your OS and that is still a huge gap.

You’re trying to use a Linux-based binary on a Unix-based host. The closest you might get is the FreeBSD binary of PMS. The Ubuntu build you have is doomed at the start.

I’m not equipped to handle supporting this nor is any part of Plex.


#8

@plexiverse
I selected Proxmox to do the same like you are trying to do with SmartOS.
I am using ZFS for “NAS” type of storage, LXC Containers for lightweight virtualization.
The latter works including GPU acceleration passthrough for Plex. In case you do want to switch, I put a guide for setting the Plex LXC container together


#9

@ChuckPA said:

@plexiverse said:
I changed it to

127.0.0.1       localhost

and was able to scan the “Various Artists” subset of my music library without crashing. :smile:

SmartOS is an OpenSolaris distribution primarily used in cloud computing. I’m using it to get the benefits of the ZFS file system and to use zones for light-weight virtualization without the overhead of a virtual machine. You can find more information at the SmartOS Wiki.

Now, I’m going to test my entire music library. Thanks, ChuckPA!

What you’re attempting will never work fully. You have Unix, not Linux. It’s compiled based on different runtime libraries. Sure, you’re getting some functionality but you’ll never have 100%. This explains the problems.

SmartOs is a derivation of OpenSolaris which is a derivation of Sun Solaris which is a derivation Sun SunOS which is a derivation of Berkeley (standard) BSD Unix .

I used BSD unix and SunOS in the 1980’s, and Solaris in the 1990’s.

FreeBSD is the closest thing to SunOS I know of to your OS and that is still a huge gap.

You’re trying to use a Linux-based binary on a Unix-based host. The closest you might get is the FreeBSD binary of PMS. The Ubuntu build you have is doomed at the start.

I’m not equipped to handle supporting this nor is any part of Plex.

this is completely inaccurate for anyone that comes here looking to see if Plex will work in a virtual environment hosted by the SmartOS hypervisor. The lx brand uses the branded zones framework to enable Linux binary applications to run unmodified on a machine with the SmarOS Unix kernel. So anything that runs on linux (ubuntu, centos, debian, etc) will also work in these lx branded zones. Usually they run even faster since the SmartOS hypervisor provides bare-metal performance to these zones.

So just choose the lx-ubuntu or lx-centos zone and once logged in run the standard ubuntu install like normal and you should be fine.


#10

@chrisjmccrum said:

@ChuckPA said:

@plexiverse said:
I changed it to

127.0.0.1       localhost

and was able to scan the “Various Artists” subset of my music library without crashing. :smile:

SmartOS is an OpenSolaris distribution primarily used in cloud computing. I’m using it to get the benefits of the ZFS file system and to use zones for light-weight virtualization without the overhead of a virtual machine. You can find more information at the SmartOS Wiki.

Now, I’m going to test my entire music library. Thanks, ChuckPA!

What you’re attempting will never work fully. You have Unix, not Linux. It’s compiled based on different runtime libraries. Sure, you’re getting some functionality but you’ll never have 100%. This explains the problems.

SmartOs is a derivation of OpenSolaris which is a derivation of Sun Solaris which is a derivation Sun SunOS which is a derivation of Berkeley (standard) BSD Unix .

I used BSD unix and SunOS in the 1980’s, and Solaris in the 1990’s.

FreeBSD is the closest thing to SunOS I know of to your OS and that is still a huge gap.

You’re trying to use a Linux-based binary on a Unix-based host. The closest you might get is the FreeBSD binary of PMS. The Ubuntu build you have is doomed at the start.

I’m not equipped to handle supporting this nor is any part of Plex.

this is completely inaccurate for anyone that comes here looking to see if Plex will work in a virtual environment hosted by the SmartOS hypervisor. The lx brand uses the branded zones framework to enable Linux binary applications to run unmodified on a machine with the SmarOS Unix kernel. So anything that runs on linux (ubuntu, centos, debian, etc) will also work in these lx branded zones. Usually they run even faster since the SmartOS hypervisor provides bare-metal performance to these zones.

So just choose the lx-ubuntu or lx-centos zone and once logged in run the standard ubuntu install like normal and you should be fine.

Hello @chrisjmccrum,

Thank you for your post. I tried both the lx-ubuntu and lx-centos zones and had the same crashing problem when updating metadata in Plex. I’ve resorted to running a KVM zone with Ubuntu and it works fine except for the additional overhead. Someday, I may try to run it in lx-ubuntu or lx-centos zone again and if it still fails, I may switch from a KVM zone to a bhyve zone.

Plex is the only software I’ve come across with issues running in a lx-branded zone. Everything else I’ve tried has run perfectly.


#11

@plexiverse

You’re running in a hypervisor which none of us have tried. Per the description of SmartOS hypervisor, “A lightweight container”.

Is it a true container like Docker and LXC?


#12

@ChuckPA

Yes, SmartOS is “A converged container and virtual machine hypervisor.”

I was able to get PMS working in Docker under SmartOS. Recently, the SmartOS imgadmin tool was updated to support Docker v2 registry images. So, I was able to create a SmartOS container from plexinc/pms-docker:plexpass, transfer my Plex configuration from my kvm instance, and keep my media stored in ZFS. I scanned my entire media library and PMS didn’t crash. This PMS docker container works great!

Here’s a summary of how I did it:

Add docker hub source

imgadm sources --add-docker-hub

Import docker image

imgadm import plexinc/pms-docker:plexpass

Create ZFS datasets

zfs create zones/data
zfs create zones/data/plex
zfs create zones/data/plex/config
zfs create zones/data/plex/data #skip this if moving media from another location
zfs create zones/data/plex/transcode

Copy existing PMS configuration

rsync -av (source) /zones/data/plex/config

Move media

zfs rename (source) zones/data/plex/data

Create a container using the manifest attached to this post

vmadm create -f plex-docker.json

Thank you.

plex-docker.zip (1.1 KB)