Jump to content

FreeNAS iocage plugin Emby 3.5.3.0 ffmpeg SOLUTION


gbarone123

Recommended Posts

Well these last tips got Emby finally working on XBOX and android. Unfortunately broke all my kodi devices i use for TV. The hours spent on this , or months now has made me realize emby on freenas platform is not working for me.. I need to stop hosting on freenas.  Seems this is where all the issues have started. First with waiting for Freenas 11.2 to rollout and not be broken just to put emby in there that is broken.  . Add up the months its sizable time comittement with little success..  I am  giving up on freenas before I give up on emby.

Link to comment
Share on other sites

makarai

Well these last tips got Emby finally working on XBOX and android. Unfortunately broke all my kodi devices i use for TV. The hours spent on this , or months now has made me realize emby on freenas platform is not working for me.. I need to stop hosting on freenas.  Seems this is where all the issues have started. First with waiting for Freenas 11.2 to rollout and not be broken just to put emby in there that is broken.  . Add up the months its sizable time comittement with little success..  I am  giving up on freenas before I give up on emby.

 

Have you installed the kodi addon for emby, in emby post-165508-0-04906000-1547453811_thumb.jpg ? without it it wont work.

 

I am running freenas with emby in a native jail, with all the clients and casting devices possible behind a reverse proxy, and it works like a charm!

Edited by makarai
Link to comment
Share on other sites

gbarone123

RSVP, what are your issues with freenas? I’ve been hosting Emby for well over a year now without issue on freenas. There were very few issues along the way. I wrote this thread after solving the only playback issues I have had. I was running Plex and Emby in tandem for the first few months, and stayed with Emby, dumping Plex. If you detail your specific issues, I can probably help you solve them. My freenas box is pretty much set it and forget it.

Link to comment
Share on other sites

Well old version of freenas didn't update the plugin.  And all Apps stopped working.  Freenas updated to 11.2.. All apps didnt work with the IOCAGE plugin.  With this beta version.. Having problems with always asking to sign in the app in kodi. And it has problems refreshing when library gets new items. So all in all I would say its been close to a year of problems.

Link to comment
Share on other sites

gbarone123

Rsvp,

 

A few questions. What plugins are you running? What kind of hardware are you running on? Did you make any changes to the base os?

Link to comment
Share on other sites

  • 1 month later...
stuartsjg

Hello, I used this post and successfully updated.  However, i still had issues with ffmpeg and i spotted this thread which shown promise.

 

However the process failed at the "make install clean" which i felt was due to being on freenas 11.1 not 11.2.  I upgraded to 11.2-U2 but now emby wont load at the IP address.  Ive tried to install a new emby 3.5.3.0 via the plugin GUI  i get this error:

 

5c6f340dde04c_Embyfail.png

 

 

If i try the above instructions, the portsnap fails:

[root@[member="freenas"] ~]# jls
   JID  IP Address      Hostname                      Path
     2                  emby-server                   /mnt/iocage/jails/emby-server/root
[root@[member="freenas"] ~]# jexec 2
# portsnap fetch extract
Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap.FreeBSD.org... failed.
No mirrors remaining, giving up.
#

I tried a fresh CLI install based upon the emby home page instructions, however when i run

sudo pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw

i get the message coming back

Sorry, user root is not allowed to execute '/usr/sbin/pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw' as root on freenas.stuartjgraham.com.
[root@[member="freenas"] ~]# sudo pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw

So perhaps my permissions are mucked up somewhere and thats stopping things from working.

 

I only get a few hours a month to work on this due to work and family commitments and i wish i had never upgraded as it was such a simple thing back in October.... :(

Edited by stuartsjg
Link to comment
Share on other sites

gbarone123

Stuart,

 

There are some issues being ironed out with 11.2u2 with iocage jails, apparently. That being said, seems like you have the jail networking issues worked out. Other threads have pointed out that unchecking and re-checking the auto button on DHCP for the jails somehow allows it to function again properly. Also, there were autostart on boot issues for iocage jails in u2.

 

As for the permission issues, are you using ssh or the GUI? I’d recommend trying the GUI shell instead of ssh. There are also threads you could read about editing the sudoers file. Not sure why root would not be elevated privileges already, but u2 seems to have some bugs. Worth a read through of the threads. For starters though, try the GUI shell.

Link to comment
Share on other sites

gbarone123

Stuart,

 

Having read the code lines more carefully, it looks like you are running the install command from the base OS?? Root@@freenas???

 

Big no no. Create a new jail and run the commands inside the jail.

Link to comment
Share on other sites

stuartsjg

Hi,

 

Yes - thanks, after some mucking about with the IP address settings i was able to access emby.  Theres a good amount on the bug at this freenas post.

 

I am not clear what you mean by running commands inside the jail, this doesnt work either as in either the existing emby (plugin installed) jail i get a "sudo: command not found" and likewise if i create a new jail from scratch and run the sudo command first.

 

This is where i thought it had to be ran from outside the jail so looked about and found if i run without "sudo" (suggested here) i.e. just "pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw"

 

Then i get mismatches (package 1102000, kernel 1101001 (i say Y) and things then appear to go well.

 

I reboot emby and still no resolution to playback issues.  But now the steps above appear to work and i dont get errors after portsnap fetch extract.

 

Things then go wrong when i follow the ffmpeg steps:

# cd /usr/ports/multimedia/ffmpeg
# make install clean
===> Building/installing dialog4ports as it is required for the config dialog
===>  Cleaning for dialog4ports-0.1.6
===> Skipping 'config' as NO_DIALOG is defined
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.

*** Error code 1

Stop.
make[3]: stopped in /usr/ports/ports-mgmt/dialog4ports
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/dialog4ports
===> Options unchanged
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.

*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/ffmpeg
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/ffmpeg
#
/usr/ports/x11-toolkits/fltk-devel/

looks like i need to find a different version?

Edited by stuartsjg
Link to comment
Share on other sites

stuartsjg

For reference, i rebooted freenas in 11.1 RC1 boot environment and got the same error when i tried 

 

I did notice i was not on 11.2 RC2 as the post above suggests but a newer version.  Will try with RC2.

Link to comment
Share on other sites

gbarone123

Stuart,

 

Ok, let's start from scratch. Delete the plugin jail you created and create a new iocage jail via the GUI. Once you have done so, mount your storage (folder where your media is located) to the /media folder of the jail. I can give detailed instructions if you aren't sure how to do this. Note, you'll have to stop the jail to add the storage, then restart it before going on. Then go into the shell of the jail.

 

From within the shell of the jail run the following commands. Also, forget sudo, you are root. No need, and unless you've installed sudo and edited the config file, not sure it would work anyway, which is why you keep getting command not found errors.

 

pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw

 

 

sysrc emby_server_enable="YES"
service emby-server start
 
That should do it. Also, I would stick with 11.2u1 for now. There are some bugs with u2 and u3 will be out next month (3 weeks I've read).
Link to comment
Share on other sites

stuartsjg

Hello

 

I changed version to 11.2u1 (that was an interesting experience but i got there).  Installed emby OK using the method you describe but then i do a rsync to copy the server data over and then i only get this site cant be reached, but i can ping.

 

(my rsync is "rsync -vrlpogth /mnt/iocage/jails/emby-server/root/var/db/emby-server/ /mnt/iocage/jails/emby-mediaserver/root/var/db/emby/" )

 

"emby-server" jail is 4.1.0.8 but with the playback issues.  "emby-mediaserver" is the install per your method which did work, then didnt after the sync.

 

So, the routes are either fix the playback issues, or find a way to import the data without killing the new install.  I done that before but cannot replicate it.

 

Again i tried the proposed fix above, but the "make install clean" fails with the "ports collection support for your FreeBSD version has endee" message - i had wondered if this may work with u1 where it didnt on rc1

Link to comment
Share on other sites

gbarone123

The new version of Emby (beyond 3.5.3.0) comes packaged with a working version of ffmpeg. This fix was a short term in response to version control issues between Emby and freenas and which release was being used.

 

At this point, you may be able to try installing via plugin, then from the Emby jail run “pkg install libraw” and then run the upgrade command “pkg add -f...” from previous response, then restart the jail. This would get you to the newest version with the appropriate ffmpeg. I can test this later to be sure (I’m on u1 currently). Haven’t tried doing the plugin since RC2.

Link to comment
Share on other sites

gbarone123

Also, what exactly are you trying to copy over with rsync? Is it users? You should just add the libraries again and after a scan, you should be back to normal. As long as you don’t have a ton of users, I’d recommend just re-creating their accounts once you have everything up and running.

Link to comment
Share on other sites

stuartsjg

 

 

I've been using emby for 3 years so I have playback history, playlists, tweeked meta data etc, not to mention all the content such as thumbnails which comes is in the GBs whilst I'm on metered 4G connection (direct fibre to house a few months away yet) which I don't want to download again.

 

I am going to try and upgrade the freshly installed jail and then again try and copy the files over. I'll have a dig further to see what I done which allowed it to work the last time.

Link to comment
Share on other sites

makarai

Hello

 

I changed version to 11.2u1 (that was an interesting experience but i got there).  Installed emby OK using the method you describe but then i do a rsync to copy the server data over and then i only get this site cant be reached, but i can ping.

 

(my rsync is "rsync -vrlpogth /mnt/iocage/jails/emby-server/root/var/db/emby-server/ /mnt/iocage/jails/emby-mediaserver/root/var/db/emby/" )

 

"emby-server" jail is 4.1.0.8 but with the playback issues.  "emby-mediaserver" is the install per your method which did work, then didnt after the sync.

 

So, the routes are either fix the playback issues, or find a way to import the data without killing the new install.  I done that before but cannot replicate it.

 

Again i tried the proposed fix above, but the "make install clean" fails with the "ports collection support for your FreeBSD version has endee" message - i had wondered if this may work with u1 where it didnt on rc1

 

Please check the Path in your destination folder!

 

(my rsync is "rsync -vrlpogth /mnt/iocage/jails/emby-server/root/var/db/emby-server/ /mnt/iocage/jails/emby-mediaserver/root/var/db/emby-server/" )

 

 

 

Also If you install a new jail try the easy method first, dont use the very outdated plugin installation from freenas.

 

 

 

This Installation method will create a Jail that is fully configurable via the FreeNAS GUI

LATEST STABLE (4020)

cd /tmp
wget https://raw.githubusercontent.com/ma-karai/iocage-plugin-emby/master/emby-server.json
iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server.json --branch 'master' 

LATEST BETA (4.1.0.10)

cd /tmp
wget https://raw.githubusercontent.com/ma-karai/iocage-plugin-emby/beta/emby-server-beta.json
iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server-beta.json --branch 'beta' 
Edited by makarai
Link to comment
Share on other sites

stuartsjg

Ok, gave this a quick bash... no luck.  Something is against me.

 

I created a folder via windows on a mapped drive, and added that folder as storage to the jail.  This failed to backup:

2019-02-26 22:47:48.100 Error TaskManager: Error
	*** Error Report ***
	Version: 4.1.0.8
	Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffdetect /usr/local/lib/emby-server/bin/ffdetect -ffmpeg /usr/local/lib/emby-server/bin/ffmpeg -ffprobe /usr/local/lib/emby-server/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz
	Operating system: Unix 11.2.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 5.10.1.57 (5.10.1.57 Thu Feb  7 10:13:31 UTC 2019)
	Processor count: 12
	Program data path: /var/db/emby-server
	Application directory: /usr/local/lib/emby-server/system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path "/media/emby_backup/Emby Backup - 2019-02-26 10.47.48 - Auto" is denied.
	  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.IO.ManagedFileSystem.CreateDirectory (System.String path) [0x0001b] in <da8ec2ecd86a4f4f8ecf1e860bebd672>:0 
	  at MBBackup.ServerEntryPoint+<ExecuteBackup>d__61.MoveNext () [0x00199] in <b48c1b9ae14d440baa732016b620ddb8>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at MBBackup.Entities.ScheduledBackupTask+<Execute>d__8.MoveNext () [0x00085] in <b48c1b9ae14d440baa732016b620ddb8>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>d__68.MoveNext () [0x00188] in <da8ec2ecd86a4f4f8ecf1e860bebd672>:0 
	Source: mscorlib
	TargetSite: Void Throw()
	
2019-02-26 22:47:48.100 Info TaskManager: Configuration Backup Failed after 0 minute(s) and 0 seconds

Thinking it was perhaps a permissions issue, before getting into that, i tried backing up to a folder within the jail, so i created (mkdir) a new folder in emby-server/root/backup which failed too:

2019-02-26 23:04:33.164 Error TaskManager: Error
	*** Error Report ***
	Version: 4.1.0.8
	Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffdetect /usr/local/lib/emby-server/bin/ffdetect -ffmpeg /usr/local/lib/emby-server/bin/ffmpeg -ffprobe /usr/local/lib/emby-server/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz
	Operating system: Unix 11.2.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 5.10.1.57 (5.10.1.57 Thu Feb  7 10:13:31 UTC 2019)
	Processor count: 12
	Program data path: /var/db/emby-server
	Application directory: /usr/local/lib/emby-server/system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path "/backup/Emby Backup - 2019-02-26 11.4.33 - Auto" is denied.
	  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.IO.ManagedFileSystem.CreateDirectory (System.String path) [0x0001b] in <da8ec2ecd86a4f4f8ecf1e860bebd672>:0 
	  at MBBackup.ServerEntryPoint+<ExecuteBackup>d__61.MoveNext () [0x00199] in <b48c1b9ae14d440baa732016b620ddb8>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at MBBackup.Entities.ScheduledBackupTask+<Execute>d__8.MoveNext () [0x00085] in <b48c1b9ae14d440baa732016b620ddb8>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>d__68.MoveNext () [0x00188] in <da8ec2ecd86a4f4f8ecf1e860bebd672>:0 
	Source: mscorlib
	TargetSite: Void Throw()
	
2019-02-26 23:04:33.164 Info TaskManager: Configuration Backup Failed after 0 minute(s) and 0 seconds

I really don't get why its so hard when i am following the same commands others are doing with ease and success.

Link to comment
Share on other sites

stuartsjg

Had another idea to try a smaller move of files from ../db/emby-server by copying my current working but not playback server to an intermediate location, then delete the folders in the new server, then move the 3 folders over and check they were all good:

rsync -vrlpogth /mnt/iocage/jails/emby-server/root/var/db/emby-server/config/ /mnt/iocage/jails/emby-serverdb/config/
rsync -vrlpogth /mnt/iocage/jails/emby-server/root/var/db/emby-server/data/ /mnt/iocage/jails/emby-serverdb/data/
rsync -vrlpogth /mnt/iocage/jails/emby-server/root/var/db/emby-server/plugins/ /mnt/iocage/jails/emby-serverdb/plugins/

rm -rf /mnt/iocage/jails/emby-server_2/root/var/db/emby-server/config/
rm -rf /mnt/iocage/jails/emby-server_2/root/var/db/emby-server/data/
rm -rf /mnt/iocage/jails/emby-server_2/root/var/db/emby-server/plugins/

rsync -vrlpogth /mnt/iocage/jails/emby-serverdb/config/ /mnt/iocage/jails/emby-server_2/root/var/db/emby-server/config/
rsync -vrlpogth /mnt/iocage/jails/emby-serverdb/data/ /mnt/iocage/jails/emby-server_2/root/var/db/emby-server/data/
rsync -vrlpogth /mnt/iocage/jails/emby-serverdb/plugins/ /mnt/iocage/jails/emby-server_2/root/var/db/emby-server/plugins/

No luck either, just my regular message "This site can't be reached".   There must be something in here which is mucking up the web server?

Link to comment
Share on other sites

Hello, I used this post and successfully updated.  However, i still had issues with ffmpeg and i spotted this thread which shown promise.

 

However the process failed at the "make install clean" which i felt was due to being on freenas 11.1 not 11.2.  I upgraded to 11.2-U2 but now emby wont load at the IP address.  Ive tried to install a new emby 3.5.3.0 via the plugin GUI  i get this error:

 

5c6f340dde04c_Embyfail.png

 

 

If i try the above instructions, the portsnap fails:

[root@[member="freenas"] ~]# jls
   JID  IP Address      Hostname                      Path
     2                  emby-server                   /mnt/iocage/jails/emby-server/root
[root@[member="freenas"] ~]# jexec 2
# portsnap fetch extract
Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap.FreeBSD.org... failed.
No mirrors remaining, giving up.
#

I tried a fresh CLI install based upon the emby home page instructions, however when i run

sudo pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw

i get the message coming back

Sorry, user root is not allowed to execute '/usr/sbin/pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw' as root on freenas.stuartjgraham.com.
[root@[member="freenas"] ~]# sudo pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi libraw

So perhaps my permissions are mucked up somewhere and thats stopping things from working.

 

I only get a few hours a month to work on this due to work and family commitments and i wish i had never upgraded as it was such a simple thing back in October.... :(

 

 

Now that we're back in freebsd ports, I would just install from there. Thanks.

Link to comment
Share on other sites

makarai

Now that we're back in freebsd ports, I would just install from there. Thanks.

 

I agree with this. @stuartsjg if you encounter the  bridge_cmd error please execute this from shell

/bin/sh -c 'export JAILS="$(iocage list -h | cut -f 2)"; for jail in $JAILS; do iocage set vnet_default_interface=auto $jail; done; iocage set vnet_default_interface=auto default'

Edited by makarai
Link to comment
Share on other sites

stuartsjg

Hi - i appreciate your patience with this.  I do a bit of C for embedded uProcessors so what some of this means is a mystery to me.

 

I ran the command you suggested and it gave the following error, im not sure if i was supposed to change some of the arguements?

 

"Please provide a valid NIC to be used with vnet

Default Property: vnet_default_interface has been updated to auto

jail 'default' not found!"

 

I decided to try again with the plugin route, but when i try to install the plug in i get this message:

 

"Install

[EFAULT] Exception: RuntimeError: Stopped emby due to VNET failure occured, destroyed emby"
 
If i manually set the IP address then the install does start (initially i just use DHCP for ease then swap out the address for the one i want to use).
 
When i shut down my existing emby installation (so i could check the mount points for setting up the newly installed one) and i got this error on shutting down:
 
 RuntimeError 
Stopped emby-server due to VNET failure

Error: concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
    res = loop.run_until_complete(coro)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
    return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 542, in start
    iocage.start()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1654, in start
    callback=self.callback
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 66, in __init__
    self.__start_jail__()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 481, in __start_jail__
    _callback=self.callback)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 81, in logit
    _callback(content, exception)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
    raise callback_exception(message)
RuntimeError: 
Stopped emby-server due to VNET failure
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 161, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1109, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1046, in _call
    return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1073, in _call_worker
    job,
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1004, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 989, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError: 
Stopped emby-server due to VNET failure

So, i think the command has caused more issues...  Any clue as to what went wrong?

Link to comment
Share on other sites

stuartsjg

Been working on this a bit more to either fix the install which has all my libraries etc as i want them preserved, or move them over to another jail.

 

Ive tried moving the contents of the ../var/db/emby-server folder over one folder at a time then starting to server to see when it fails to load but that was inconclusive.  Ive also created a new jail (both by CLI (and then too, both from freenas shell method and GUI jail creation then jail CLI) and plugin install), copied the emby-server folder over (which breaks the new installs) then tried a few methods to reinstall in a hope the installation process repairs or puts right what the rsync process upsets - it doesn't.

 

- - - - -

 

This is the error i had hoped this thread would fix.

2019-02-27 23:26:22.162 Debug App: CodecValidation: FindVideoDecoder - MediaType: mpeg4, Mode: 0
2019-02-27 23:26:22.167 Debug App: CodecValidation: FindVideoDecoder - Checking: 'Automatic software decoder' (Priority: 0)
2019-02-27 23:26:22.168 Debug App: CodecValidation: FindVideoDecoder - Check successful - selecting 'Automatic software decoder'
2019-02-27 23:26:22.169 Debug App: CodecValidation: FindVideoEncoder - Media: h264, UseHardwareCodecs: True, Mode: 0
2019-02-27 23:26:22.173 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 4.0.2.0
	Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffdetect /usr/local/lib/emby-server/bin/ffdetect -ffmpeg /usr/local/lib/emby-server/bin/ffmpeg -ffprobe /usr/local/lib/emby-server/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz
	Operating system: Unix 11.2.0.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 5.10.1.57 (5.10.1.57 Thu Feb  7 10:13:31 UTC 2019)
	Processor count: 12
	Program data path: /var/db/emby-server
	Application directory: /usr/local/lib/emby-server/system
	System.Exception: System.Exception: No video encoder found for 'h264'
	
	
	>>>>>>  FindVideoDecoder - MediaType: mpeg4, Mode: 0
	Info    FindVideoDecoder - Checking: 'Automatic software decoder' (Priority: 0)
	Info    FindVideoDecoder - Check successful - selecting 'Automatic software decoder'
	
	>>>>>>  FindVideoEncoder - Media: h264, UseHardwareCodecs: True, Mode: 0
	
	  at Emby.Server.MediaEncoding.Encoder.EncodingHelper.GetVideoEncoder (Emby.Server.MediaEncoding.Encoder.EncodingJobInfo state, MediaBrowser.Model.Configuration.EncodingOptions encodingOptions) [0x0005b] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	  at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetCommandLineArguments (System.String outputPath, MediaBrowser.Model.Configuration.EncodingOptions encodingOptions, Emby.Server.MediaEncoding.Api.StreamState state, System.Boolean isEncoding) [0x00014] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	  at Emby.Server.MediaEncoding.Api.BaseStreamingService.GetOutputFilePath (Emby.Server.MediaEncoding.Api.StreamState state, MediaBrowser.Model.Configuration.EncodingOptions encodingOptions, System.String outputFileExtension) [0x00016] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	  at Emby.Server.MediaEncoding.Api.BaseStreamingService+<GetState>d__81.MoveNext () [0x0082b] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService+<GetDynamicSegment>d__14.MoveNext () [0x000ee] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.Services.ServiceExecGeneral+<GetTaskResult>d__3.MoveNext () [0x00081] in <5837600bbe23491d837720283845e3f2>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.Services.ServiceHandler+<ProcessRequestAsync>d__14.MoveNext () [0x0023e] in <5837600bbe23491d837720283845e3f2>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>d__56.MoveNext () [0x00af1] in <5837600bbe23491d837720283845e3f2>:0 
	Source: mscorlib
	TargetSite: Void Throw()
	  at Emby.Server.MediaEncoding.Encoder.EncodingHelper.GetVideoEncoder (Emby.Server.MediaEncoding.Encoder.EncodingJobInfo state, MediaBrowser.Model.Configuration.EncodingOptions encodingOptions) [0x0005b] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	  at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetCommandLineArguments (System.String outputPath, MediaBrowser.Model.Configuration.EncodingOptions encodingOptions, Emby.Server.MediaEncoding.Api.StreamState state, System.Boolean isEncoding) [0x00014] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	  at Emby.Server.MediaEncoding.Api.BaseStreamingService.GetOutputFilePath (Emby.Server.MediaEncoding.Api.StreamState state, MediaBrowser.Model.Configuration.EncodingOptions encodingOptions, System.String outputFileExtension) [0x00016] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	  at Emby.Server.MediaEncoding.Api.BaseStreamingService+<GetState>d__81.MoveNext () [0x0082b] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService+<GetDynamicSegment>d__14.MoveNext () [0x000ee] in <8d3c2eae278a44b89027f6e03c623f02>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.Services.ServiceExecGeneral+<GetTaskResult>d__3.MoveNext () [0x00081] in <5837600bbe23491d837720283845e3f2>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.Services.ServiceHandler+<ProcessRequestAsync>d__14.MoveNext () [0x0023e] in <5837600bbe23491d837720283845e3f2>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>d__56.MoveNext () [0x00af1] in <5837600bbe23491d837720283845e3f2>:0 

I have used this set of commands to upgrade my existing working install to 4.0.2 in the hope the installation may fix the playback issue:

root@emby-server:~ # service emby-server stop
Stopping emby_server.
Waiting for PIDS: 19140.
root@emby-server:~ # pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/4.0.2.0/emby-server-freebsd_4.0.2.0_amd64.txz

[emby-server] Fetching emby-server-freebsd_4.0.2.0_amd64.txz:   0%  120 KiB 122.[emby-server] Fetching emby-server-freebsd_4.0.2.0_amd64.txz:  19%    3 MiB   3.[emby-server] Fetching emby-server-freebsd_4.0.2.0_amd64.txz:  44%    7 MiB   4.[emby-server] Fetching emby-server-freebsd_4.0.2.0_amd64.txz:  65%   11 MiB   3.[emby-server] Fetching emby-server-freebsd_4.0.2.0_amd64.txz:  86%   14 MiB   3.[emby-server] Fetching emby-server-freebsd_4.0.2.0_amd64.txz: 100%   17 MiB   3.5MB/s    00:05
[emby-server] Installing emby-server-4.0.2.0_1...
Newer FreeBSD version for package emby-server:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1102000
- running kernel: 1101001
Allow missmatch now?[Y/n]: package emby-server is already installed, forced install
===> Creating groups.
Using existing group 'emby'.
===> Creating users
Using existing user 'emby'.
[emby-server] Extracting emby-server-4.0.2.0_1: 100%
root@emby-server:~ # pw groupmod emby -n emby -g 1101
root@emby-server:~ # pw usermod emby -n emby -u 1101 -g 1101
root@emby-server:~ # chown -R emby:emby /var/db/emby-server
sysrc 'emby_server_user=emby'
root@emby-server:~ # sysrc 'emby_server_user=emby'
emby_server_user: emby -> emby
root@emby-server:~ # service emby-server start
Starting emby_server.

There must be some way to fix the "No video encoder found for 'h264" issue, then i dont need to worry about trying to backup or transfer files over to another jail etc which also appears to fail.

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...