Jump to content

FreeNAS plugin


Luke

Recommended Posts

Hi , is there any update on when the following issue will be resolved for the Freenas version,  I am currently unable to use Emby 

https://emby.media/community/index.php?/topic/56481-securechannelfailure-on-freenas/page-2&do=findComment&comment=563950

 

The server update won't resolve it. It's the mono runtime that has to be updated in the package.

Link to comment
Share on other sites

Vidman

its on my todo list to update the freenas plugin to emby version 3.4.1.0

Will there be any fixes for the next version?
Link to comment
Share on other sites

josh4trunks

Will there be any fixes for the next version?

I will attempt to by updating mono to v4.8.1, adding boringSSL, and reapply the realtime filesystem scanning patches. But building plugins, especially with updated dependencies is getting really convoluted for FreeNAS 9 based plugins (which is what FreeNAS still uses).

 

So I can't guarantee if/when I will get this update done.

Link to comment
Share on other sites

I will attempt to by updating mono to v4.8.1, adding boringSSL, and reapply the realtime filesystem scanning patches. But building plugins, especially with updated dependencies is getting really convoluted for FreeNAS 9 based plugins (which is what FreeNAS still uses).

 

So I can't guarantee if/when I will get this update done.

 

I think there is a little more beyond updating as well, probably some configuration required to the runtime. We can use whatever was done for the Synology builds.

 

We are also very soon to put up a FreeBSD package for testing based on .NET Core. It will be a FreeBSD plugin, not specific to FreeNAS, but if that goes well we'll look at a FreeNAS plugin after that.

Link to comment
Share on other sites

adrianwi

Don't really know much about the jail systems, other than what I read on the FreeNAS forums, but with the change from warden to iocage it appears scripts can be used to build jails using the appropriate port/pkg dependencies.

Link to comment
Share on other sites

  • 2 weeks later...
xtralives

I seem to be having issues backing up my config and accessing app updates.

 

I opened the shell from the jail and can ping 8.8.8.8 and google.com.

 

I'm backing up to local storage on the FreeNAS server mounted in /media/backup from within the storage tab under "jails-emby_1-storage". I can access and play media files with no problem.

 

I've attached my log file too. If there's anything else I can do to help please let me know. :)

 

Thanks for all the hard work on such an awesome system!

Link to comment
Share on other sites

I seem to be having issues backing up my config and accessing app updates.

 

I opened the shell from the jail and can ping 8.8.8.8 and google.com.

 

I'm backing up to local storage on the FreeNAS server mounted in /media/backup from within the storage tab under "jails-emby_1-storage". I can access and play media files with no problem.

 

I've attached my log file too. If there's anything else I can do to help please let me know. :)

 

Thanks for all the hard work on such an awesome system!

 

Hi there, did you forget to attach the log? Thanks !

Link to comment
Share on other sites

Iattachicon.gifembyLog.txt didn't hit “attach this file”

 

Ok, you can follow this issue here:

https://emby.media/community/index.php?/topic/56481-securechannelfailure-on-freenas/

 

Short answer: the mono runtime in the freenas package needs to be updated, however, this is only affecting the check for updates and a couple other things so in the meantime it's not likely to impact your usage very much.

Link to comment
Share on other sites

  • 2 weeks later...
Vidman

Ok I can't put up with my emby plugin crashing everytime I add content any longer. It seems everytime a scan finds something new or I try to record live TV the my emby freenas plugin needs to be restarted, it takes hours of constant monitoring to add 1 season of a TV show. Please help!

Attached log2018-06-02 02_09_51.260.txt

Link to comment
Share on other sites

Ok I can't put up with my emby plugin crashing everytime I add content any longer. It seems everytime a scan finds something new or I try to record live TV the my emby freenas plugin needs to be restarted, it takes hours of constant monitoring to add 1 season of a TV show. Please help!

Attached logattachicon.gif2018-06-02 02_09_51.260.txt

 

You're running a really old version of the mono runtime. I would suggest updating that, and/or disabling the realtime monitor if the crashes are associated with new content. Please let us know if this helps. Thanks.

Link to comment
Share on other sites

Vidman

I have disabled all scheduled tasks (and real-time monitoring I think) that cause crashing but that still leaves me with the problem that I can't record anything or add content without issues. I am using the latest freenas plugin that has not been updated in some time and I've had this issue since I first updated to this version

Link to comment
Share on other sites

The mono runtime is a dependency, it is not part of the plugin. It is something you can update independently on your own.

Link to comment
Share on other sites

josh4trunks

@@Luke actually for the old plugins you usually can't update dependencies without doing any hacking. It probably could be done with a few commands though.

 

I do plan on updating the Emby plugin soon, and will try updating the version of mono bundled but it keeps getting delayed on my todo list. Got a baby on the way, so finishing some home project have taken a priority at the moment.

 

as another data point, i am using the emby plugin as well on 3 different systems (with realtime monitoring enabled) and have never experienced a crash on those. but i may not be updated to the latest available freenas version, so maybe their is an issue with that.

  • Like 1
Link to comment
Share on other sites

Vidman

@@Luke actually for the old plugins you usually can't update dependencies without doing any hacking. It probably could be done with a few commands though.

 

I do plan on updating the Emby plugin soon, and will try updating the version of mono bundled but it keeps getting delayed on my todo list. Got a baby on the way, so finishing some home project have taken a priority at the moment.

 

as another data point, i am using the emby plugin as well on 3 different systems (with realtime monitoring enabled) and have never experienced a crash on those. but i may not be updated to the latest available freenas version, so maybe their is an issue with that.

Sorry to bug you but I've had this issue for some time, do you have some eta or is there a way to revert to an older version of the plugin?
Link to comment
Share on other sites

josh4trunks

Sorry to bug you but I've had this issue for some time, do you have some eta or is there a way to revert to an older version of the plugin?

i do not know if emby itself is ok with downgrading. since it maintains its own database that might not be downgradeable.

 

I am running version 3.2.60 on my personal freenas, haven't bothered to update, but do upgrade occasionally.

 

* you can download a version of the emby PBI here.

https://download.freenas.org/plugins/9/x64/

* i would also download another PBI like for resilio

* upload the resilio PBI to the emby_1 jail on the jails tab

* stop the emby plugin on the plugins > installed tab

* delete the emby plugin

* upload the emby PBI to the emby_1 jail on the jails tab

* delete the resilio plugin on the Plugins > installed tab

* start the emby plugin

Link to comment
Share on other sites

I think it would be better to update the sever manually to 3.4.1, then turn off features you aren't using such as the dlna server, dlna play to, automatic port mapping, etc.

 

I am not sure the downgrade will be safe due to database changes made by the newer version that the older version will not be expecting.

Link to comment
Share on other sites

You can also try that without updating, so turn off features, then restart the server. I only mentioned updating because 3.4.1 will do a better job of disabling more internal functions when they're not being used.

Link to comment
Share on other sites

makarai

1st

 

add tuneables so jail can run with vnet and can multicast

post-165508-0-88464400-1528005339_thumb.png

 

2nd


#create jail
iocage create -n "emby_foo" -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.107/24" defaultrouter="192.168.0.1" vnet="on" allow_raw_sockets="1" boot="on"

iocage console emby_foo
pkg update
pkg upgrade

pkg install emby-server
service emby-server onestart
sysrc 'emby_server_enable=YES'
sysrc 'emby_server_user=emby'
service emby-server onestop


pw groupmod emby -n emby -g 1000 #1000 is my UID and GID
pw usermod emby -n emby -u 1000 -g 1000
chown -R emby:emby /var/db/emby-server

#skip this if you are interested in just the latest stable //skip from here
#or keep going for the latest stable
cd /tmp
fetch https://github.com/MediaBrowser/Emby/releases/download/3.4.1.10/Emby.Mono.zip 
#(swap with address of latest file found here: https://github.com/MediaBrowser/Emby/releases)
unzip -d /tmp/emby Emby.Mono.zip
cp -Rfp /tmp/emby/ /usr/local/lib/emby-server
rm -r /tmp/emby
rm /tmp/Emby.Mono.zip
service emby-server onestart

#skip to here

exit
#add storage (replace with your actual storage)
iocage fstab -a emby_foo /mnt/volume01/multimedia /multimedia01 nullfs rw 0 0
iocage fstab -a emby_foo /mnt/volume02/multimedia /multimedia02 nullfs rw 0 0
iocage fstab -a emby_foo /mnt/volume01/db/ssl/user-certs /certs nullfs rw 0 0

 

  • Like 1
Link to comment
Share on other sites

adrianwi

 

1st

 

add tuneables so jail can run with vnet and can multicast

attachicon.gifCapture.PNG

 

2nd


#create jail
iocage create -n "emby_foo" -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.107/24" defaultrouter="192.168.0.1" vnet="on" allow_raw_sockets="1" boot="on"

iocage console emby_foo
pkg update
pkg upgrade

pkg install emby-server
service emby-server onestart
sysrc 'emby_server_enable=YES'
sysrc 'emby_server_user=emby'
service emby-server onestop


pw groupmod emby -n emby -g 1000 #1000 is my UID and GID
pw usermod emby -n emby -u 1000 -g 1000
chown -R emby:emby /var/db/emby-server

#skip this if you are interested in just the latest stable //skip from here
#or keep going for the latest stable
cd /tmp
fetch https://github.com/MediaBrowser/Emby/releases/download/3.4.1.10/Emby.Mono.zip 
#(swap with address of latest file found here: https://github.com/MediaBrowser/Emby/releases)
unzip -d /tmp/emby Emby.Mono.zip
cp -Rfp /tmp/emby/ /usr/local/lib/emby-server
rm -r /tmp/emby
rm /tmp/Emby.Mono.zip
service emby-server onestart

#skip to here

exit
#add storage (replace with your actual storage)
iocage fstab -a emby_foo /mnt/volume01/multimedia /multimedia01 nullfs rw 0 0
iocage fstab -a emby_foo /mnt/volume02/multimedia /multimedia02 nullfs rw 0 0
iocage fstab -a emby_foo /mnt/volume01/db/ssl/user-certs /certs nullfs rw 0 0

What version of Mono and FFMpeg does this pkg install leave you with?  Although it takes a little longer (a few hours pressing enter to accept defaults, with only 2 ports requiring changes), I think installing emby with cd /usr/ports/multimedia/emby-server/ && make clean install is better as you end up with the latest version installed with the appropriate properties checked.  Certainly, from my experience, this tends to provide the best performance and emby experience.

Edited by adrianwi
Link to comment
Share on other sites

makarai

ffmpeg 3.4.2 

mono 5.2.0.215

 

both the latest from freshports after i 


Add folder 

pkg/repos/
vi /usr/local/etc/pkg/repos/FreeBSD.conf

FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}

pkg update
pkg upgrade

i know mono 5.8 is recommended but i have not run into any problems as of yet.

 

 

ffmpeg: with these flags

 ffmpeg -v
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
  configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-pic --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --cc=cc --disable-alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-chromaprint --disable-libdc1394 --disable-debug --enable-htmlpages --disable-libdrm --disable-libfdk-aac --enable-ffserver --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --disable-libfribidi --disable-libgme --disable-libgsm --enable-iconv --disable-libilbc --disable-jack --disable-libkvazaar --disable-ladspa --disable-libmp3lame --disable-libbluray --disable-librsvg --disable-libxml2 --enable-mmx --disable-libmodplug --disable-libmysofa --disable-openal --disable-opencl --enable-libopencv --disable-opengl --disable-libopenh264 --disable-libopenjpeg --enable-optimizations --enable-libopus --disable-libpulse --enable-runtime-cpudetect --disable-librubberband --disable-sdl2 --disable-libsmbclient --disable-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex --enable-sse --disable-libssh --disable-libtesseract --enable-libtheora --disable-libtwolame --enable-libv4l2 --enable-vaapi --enable-vdpau --disable-libvidstab --enable-libvorbis --disable-libvo-amrwbenc --enable-libvpx --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxcb --enable-libxvid --disable-outdev=xv --disable-libzimg --disable-libzmq --disable-libzvbi --disable-gcrypt --enable-gmp --disable-librtmp --enable-gnutls --disable-openssl --enable-version3 --disable-nonfree
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100

speaking of mono:

 

 

 

On Friday, 1 June 2018 07:10:22 my name wrote:
>  Hey DBN,

Hi my name

> I am writing you in order to convince you to update the
https://www.freshports.org/lang/mono port, is there anything i can do,
> maybe a bounty? There are several tools that i personally use that now
> require mono 5.8+


Thank you for expressing an interest in mono :-).  You don't need to convince 
me to update mono, I'm happy to do it :-D.  Unfortunately the limiting factor 
for me time.  Work of late has been very time consuming leaving me with little 
energy and time for working on FreeBSD related stuff.  

Thank you also for considering a bounty, but given what is limiting me a 
bounty won't help me specifically.  A bounty, however, may help with 
motivating other members of the community?  Perhaps you can reach out to 
Romain Tartiere?

One area that would help me is updating the ancially ports relating to mono.  
Please see portscout [1] for a list of ports that need updating.  The best way 
would be to create a PR [2] and assign that to me.  I can then run an exp-run 
to test the update.  I suggest starting with xsp, mod_mono and libgdiplus.  

Regards

[1] https://portscout.freebsd.org/mono@freebsd.org.html
[2] 
https://bugs.freebsd.org/bugzilla/enter_bug.cgi?component=Individual%20Port(s)&product=Ports%20&%20Packages
Edited by makarai
  • Like 1
Link to comment
Share on other sites

makarai

What version of Mono and FFMpeg does this pkg install leave you with?  Although it takes a little longer (a few hours pressing enter to accept defaults, with only 2 ports requiring changes), I think installing emby with cd /usr/ports/multimedia/emby-server/ && make clean install is better as you end up with the latest version installed with the appropriate properties checked.  Certainly, from my experience, this tends to provide the best performance and emby experience.

 

 

What are the differences, in the methods? i mean technically you could also load the plugin in freenas which is by far the easiest/fastest. Maybe you could whip up a quick tutorial.

Link to comment
Share on other sites

adrianwi

All the instructions that you need are in this thread, although pulling them together in one place might be a good idea.

 

As I see it, there are 2 main ways of getting emby running on FreeNAS:

 

1. create and configure a jail, or

2. install the plugin (which pretty much does option 1 for you)

 

To complicate things, and depending on the version of FreeBSD you are running, there are two ways to create a jail:

 

1.1  the old method using Warden (which is still available in the current 11.1 version, although the resulting jail would be created with a FreeBSD 11.0 template which is EOL so not recommended).  This is also what you'd get running the plugin on 11.1

1.2  the new method using iocage, which still has a few teething problems (around networking) and the beta GUI in 11.1 doesn't have all the functionality so you need to use the CLI

 

Once you've picked your jail method (which really should be iocage), you can then configure it in 2 different ways:

 

1.2.1 using ports to compile emby and its dependencies, which ensures you have the latest versions available but takes some time (90-120 mins for me) and requires regular intervention (hitting enter)

1.2.2 using the pkg manager to download emby and its dependencies, which downloads the latest version of the dependencies packaged with emby (last time I did this it was a 4.x version of Mono and a 3.x version of FFMpeg) but only takes a few minutes 

 

So for me, it's pretty much down to:

 

A.  speed of installation (Plugin > Jail > Pkg > Port)

B.  timeliness of the software updates (Port > Pkg > Jail > Plugin)

 

In defence of the plugin, as this is a plugin thread and I'm not trying to crap over the great work Josh does to maintain, it also has some changes to Mono so library scans are performed when new content is added to the FreeNAS datasets.  This is great, although for me not worth the other components being out of date.

 

In my humble opinion, 1.2.1 is the best option, and if you want an even newer version of emby use the fetch and copy method as described above, otherwise update the ports as things are notified via freshports.org.

 

I suppose another option is to run emby in a VM on FreeNAS, but you're adding complexity and overhead when it runs pretty well natively on FreeBSD.  I've tried it running an Ubuntu VM and then the emby Docker container, but didn't see any real benefit.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...