Jump to content

FreeNAS plugin


Luke

Recommended Posts

josh4trunks

I am on Freenas 9.3 mediabrowser and emby have worked perfect up to now, with this latest realese its a no go. After I insert an IP and the corect gateway I start up emby in the jails but it when I try to start up in installed plugins section it want proparly start.

in your emby jail can you ping out, say 8.8.8.8

 

what happens when you try

service emby-server onestart

Link to comment
Share on other sites

Eternally

Using that command worked it started up, but  emby is not listed in Freenas on the left side of the interface I now have to manually enter the ip in order to get into emby.

 

But truly thanks for the help doing it this way is defaintly better then nothing. I was thinking about one way I could solve this that I could maybe add a script for that command right after I start up the emby in the jail.

Edited by Eternally
Link to comment
Share on other sites

what is the root problem? (i'm not experienced with freenas, just curious).

Link to comment
Share on other sites

josh4trunks

Using that command worked it started up, but  emby is not listed in Freenas on the left side of the interface I now have to manually enter the ip in order to get into emby.

 

But truly thanks for the help doing it this way is defaintly better then nothing. I was thinking about one way I could solve this that I could maybe add a script for that command right after I start up the emby in the jail.

Does it appear in the left menu if you restart the jail and refresh the page?

 

As for the solution you propose, you don't need a custom script to do, this.

The jail init system already has script that does starts Emby (/usr/local/etc/rc.d/emby-server)

All you need to do is enable the service in the jail

sysrc emby_server_enable=YES
Link to comment
Share on other sites

josh4trunks

what is the root problem? (i'm not experienced with freenas, just curious).

I think in this case, it is the daemon that communicates between freenas and the jail.

 

In the plugins it's usually a python daemon that run as root in the jail that..

* edit configs (if needed, but not in Emby's case)

* enable+start and disable+stop a service

  • Like 1
Link to comment
Share on other sites

Eternally

 

Does it appear in the left menu if you restart the jail and refresh the page?

 

As for the solution you propose, you don't need a custom script to do, this.

The jail init system already has script that does starts Emby (/usr/local/etc/rc.d/emby-server)

All you need to do is enable the service in the jail

sysrc emby_server_enable=YES

It worked with that command now it auto starts after the jail is started but ts not listed on the left side of the menu. I have noticed before also of what you just said that python runs as root on the plugins. I have been thinking a little about this last year when I intstalled mediabrowser for the first time and I read on the freenas forums that they used mono-sgen as user could that be a problem now since mediabrowser has been changed to emby.

Link to comment
Share on other sites

josh4trunks

 

 

Does it appear in the left menu if you restart the jail and refresh the page?

 

As for the solution you propose, you don't need a custom script to do, this.

The jail init system already has script that does starts Emby (/usr/local/etc/rc.d/emby-server)

All you need to do is enable the service in the jail

sysrc emby_server_enable=YES

It worked with that command now it auto starts after the jail is started but ts not listed on the left side of the menu. I have noticed before also of what you just said that python runs as root on the plugins. I have been thinking a little about this last year when I intstalled mediabrowser for the first time and I read on the freenas forums that they used mono-sgen as user could that be a problem now since mediabrowser has been changed to emby.

 

FreeNAS WebUI <-> python running as root in jail (this API can actually be implemented in any language) <-> emby (exe which is interpreted by mono)

 

I think you have a slight misunderstanding. your issue is somewhere between freenas and the API daemon running in the jail. I know this, because this is also the daemon that provides the Emby icon you are missing in the FreeNAS left panel.

I'm not sure what is actually causing the miscommunication, usually something with networking setup of the jail. But it definitly is not the mono+Emby layer in the jail, that works as expected.

 

At least the Emby part works. The in between layer is the part that usually has issues but isn't needed unless you plan on starting/stopping the service often.

Link to comment
Share on other sites

Eternally

Your right I wasen't thinking clearly, Thanks for the help this really did annoy me for a while. Missing that on the left of the interface is really not that big of a deal for me. :) :)

Edited by Eternally
Link to comment
Share on other sites

josh4trunks

Your right I wasen't thinking clearly, Thanks for the help this really did annoy me for a while.

No prob. Glad it works well enough now.

Link to comment
Share on other sites

jhevener

Link to "more information" resolves to the downloads page. I can't get there from here. :)

 

Any help?

 

TIA

Link to comment
Share on other sites

Baenwort

 

@@giga12 I posted a minor revision to the Emby plugin in the FreeNAS Repo, version 3.0.5572.0_1. It should be available tomorrow.

 

Here's migration steps that should work after tomorrow

  1. Install Emby
  2. copy over your data-directory, edit paths below as needed
    cp -r /mnt/tank/jails/mediabrowser_1/var/db/mediabrowser /mnt/tank/jails/emby_1/var/db/mediabrowser
    chown -R 989:989 /mnt/tank/jails/emby_1/var/db/mediabrowser
    
  3. delete the mediabrowser plugin
  4. (optional) change IP of emby jail, restart jail
  5. set data-directory in emby jail
    sysrc 'emby_server_data_dir=/var/db/mediabrowser'
    
  6. enable emby plugin

 

 

 

I am on Freenas 9.3 mediabrowser and emby have worked perfect up to now, with this latest realese of emby its a no go. After I insert an IP and the corect gateway I start up emby in the jails but when I try to start up emby in the installed plugins section it want proparly start.

 

 

Using that command worked it started up, but  emby is not listed in Freenas on the left side of the interface I now have to manually enter the ip in order to get into emby.

 

But truly thanks for the help doing it this way is defaintly better then nothing. I was thinking about one way I could solve this that I could maybe add a script for that command right after I start up the emby in the jail.

 

So I've been having a similar issue that after the last update has brought me here to troubleshoot. I updated from the MB plugin to the Emby plugin per your above instructions and everything was fine on the first versions.  However, since 3.0.558 I've had the described missing link to Emby under the plugin tree on the left control area of FreeNAS.  In-addition (I was willing to live without it as I used bookmarks and apps to actually access Emby) since the most recent update I've had Emby, after the first log in of a user/admin, peg a single core of my FreeNAS sever continuously. All syncs are disabled, all the scheduled tasks are completed, and no streams are being transcoded.  This continues for upto 12 hours (at which point I reset the plug in) and it then continues at 0-2% usage until the first person logs into Emby. This is what led me to find out that under the top control bar > Plugins > Installed would no longer start the plug in.  It would give the moving bars and then return to the off position. I am also unable to shut down the plug in from this control. It does shut down successfully from within the Emby Dashboard.

 

Starting via the command line in the jail does work. However, even when I do "sysrc emby_server_enable=YES" when I reboot the FreeNAS box Emby does not restart.

 

What logs would you like?

Edited by Baenwort
Link to comment
Share on other sites

josh4trunks

So I've been having a similar issue that after the last update has brought me here to troubleshoot. I updated from the MB plugin to the Emby plugin per your above instructions and everything was fine on the first versions. However, since 3.0.558 I've had the described missing link to Emby under the plugin tree on the left control area of FreeNAS. In-addition (I was willing to live without it as I used bookmarks and apps to actually access Emby) since the most recent update I've had Emby, after the first log in of a user/admin, peg a single core of my FreeNAS sever continuously. All syncs are disabled, all the scheduled tasks are completed, and no streams are being transcoded. This continues for upto 12 hours (at which point I reset the plug in) and it then continues at 0-2% usage until the first person logs into Emby. This is what led me to find out that under the top control bar > Plugins > Installed would no longer start the plug in. It would give the moving bars and then return to the off position. I am also unable to shut down the plug in from this control. It does shut down successfully from within the Emby Dashboard.

 

Starting via the command line in the jail does work. However, even when I do "sysrc emby_server_enable=YES" when I reboot the FreeNAS box Emby does not restart.

 

What logs would you like?

let's deal with the CPU being pegged and the plugin not starting as two different issues.

 

####

 

if starting/stopping it from the command line works, doing it from the Plugins>Installed tab should be no different. So, likely the plugin middleware is broken.

* does the emby icon appear in the left panel of the freenas webui?

 

* can you try a second instance of emby and see if it exhibits the same 2 issues

 

* can you verify the process that is consuming 100% CPU with 'top' and 'ps aux'?

Edited by josh4trunks
Link to comment
Share on other sites

Baenwort

let's deal with the CPU being pegged and the plugin not starting as two different issues.

 

####

 

if starting/stopping it from the command line works, doing it from the Plugins>Installed tab should be no different. So, likely the plugin middleware is broken.

* does the emby icon appear in the left panel of the freenas webui?

 

* can you try a second instance of emby and see if it exhibits the same 2 issues

 

* can you verify the process that is consuming 100% CPU with 'top' and 'ps aux'?

1) The Emby icon does not appear.

 

2) Second instance of Emby plug in installed.

     i)This one also is unable to be started from Plugins > Installed. I am able to start it from within it's (emby_2) jail. It also does not show an icon in the plug in drop down in the left control area. My one non-emby plug in does.

     ii) I've added storage to the jail and directed it to my collection which has the meta data store locally. The second plug in does not seem to have the same problem with hogging a core after I logged into the webapp and started a video, closed the video, and checked the usage. I haven't played with any settings beyond naming the user and setting up a library.

3) per top s0ibPfM.png

 

and what kind of output would you like from 'ps aux'?

 

It is not consuming 100% cpu but rather an entire core of the FreeNAS' i3-4130 with transcoding set to not throttle as can be seen by the earlier spike when I watched a video that needed transcoding to an android device via the app and another when I did a short test via the webapp using Firefox on a desktop. Emby is the only major load on the system.

Edited by Baenwort
Link to comment
Share on other sites

josh4trunks

1) The Emby icon does not appear.

 

2) Second instance of Emby plug in installed.

A)This one also is unable to be started from Plugins > Installed. I am able to start it from within it's (emby_2) jail. It also does not show an icon in the plug in drop down in the left control area. My one other plug in does.

B) I've added storage to the jail and directed it to my collection which has the meta data store locally. I'll report back on CPU usage and releasing when the scan completes overnight.

 

3) per top s0ibPfM.png

 

and what kind of output would you like from 'ps aux'?

 

It is not consuming 100% cpu but rather an entire core of the FreeNAS' i3-4130 with transcoding set to not throttle as can be seen by the earlier spike when I watched a video that needed transcoding to an android device via the app and another when I did a short test via the webapp using Firefox on a desktop. Emby is the only major load on the system.

so other plugins do show in the left panel?

can you do me a favor and try disabling VIMAGE, choosing an interface, and restarting the jail, for one the emby instances?

 

####

 

I meant 100% of a core.

 

I was thinking you could use top and ps to see exactly the command causing the 100% cpu usage (of a core).

Link to comment
Share on other sites

Baenwort

so other plugins do show in the left panel?

can you do me a favor and try disabling VIMAGE, choosing an interface, and restarting the jail, for one the emby instances?

 

####

 

I meant 100% of a core.

 

I was thinking you could use top and ps to see exactly the command causing the 100% cpu usage (of a core).

 

Yes, as you can see in the image above.

I am unable to disable VIMAGE via the webGUI.  When I go to advanced within the 'Edit Jail' window I am unable to uncheck VIMAGE. I am able to uncheck/check and interact with all the other action items.

 

########

 

I attached an image of the output of 'top' in the prior post. I've never used 'ps aux' and the raw output in the shell does not seem useful so I was asking how you would like the information presented by 'ps aux'. Also, did you want the output from FreeNAS or from within the Emby Jail?

Link to comment
Share on other sites

Baenwort

So I went ahead and taught myself something new and here are the results:

 

1) ps aux from within old emby plugin that is currently pegging a core:

old_emby_PSAUX_OUTPUT.txt

2) ps aux from within new emby plugin that is not pegging a core after login:

new_emby_PSAUX_OUTPUT.txt

3) ps aux from within FreeNAS shell:

FreeNAS_PSAUX_OUTPUT.txt

 

Is this what you are seeking for? FreeNAS is my first venture out of the comforting arms of Microsoft so I'm making guesses as to what you are seeking.

Edited by Baenwort
Link to comment
Share on other sites

josh4trunks

Yes, as you can see in the image above.

I am unable to disable VIMAGE via the webGUI.  When I go to advanced within the 'Edit Jail' window I am unable to uncheck VIMAGE. I am able to uncheck/check and interact with all the other action items.

 

########

 

I attached an image of the output of 'top' in the prior post. I've never used 'ps aux' and the raw output in the shell does not seem useful so I was asking how you would like the information presented by 'ps aux'. Also, did you want the output from FreeNAS or from within the Emby Jail?

I don't see the image of your jail settings. Did you ever change anything for the jail's networking? I'm not sure why you can't disable it. I'm not sure if this will actually change things for you, but for my particular setup, I have to disable this.

 

You top output shows mono (and not ffmpeg) is the heavy process. This sounds like possibly some bug in emby and sharing logs with @@Luke may show the issue.

Link to comment
Share on other sites

josh4trunks

So I went ahead and taught myself something new and here are the results:

 

1) ps aux from within old emby plugin that is currently pegging a core:

attachicon.gifold_emby_PSAUX_OUTPUT.txt

2) ps aux from within new emby plugin that is not pegging a core after login:

attachicon.gifnew_emby_PSAUX_OUTPUT.txt

3) ps aux from within FreeNAS shell:

attachicon.gifFreeNAS_PSAUX_OUTPUT.txt

 

Is this what you are seeking for? FreeNAS is my first venture out of the comforting arms of Microsoft so I'm making guesses as to what you are seeking.

I was just trying to see if the process was mono (the core process) or ffmpeg (the transcoder). You previous posts already clarified this.

 

Can you confirm where are we at now? I believe..

* you have an install that was migrated from the MediaBrowser naming

* you want to keep that metadata and not start over? (and therefore not use your fresh install of emby)

* some bug is causing your install the peg a CPU core

Edited by josh4trunks
Link to comment
Share on other sites

Baenwort

I was just trying to see if the process was mono (the core process) or ffmpeg (the transcoder). You previous posts already clarified this.

 

Can you confirm where are we at now? I believe..

* you have an install that was migrated from the MediaBrowser naming

* you want to keep that metadata and not start over? (and therefore not use your fresh install of emby)

* some bug is causing your install the peg a CPU core

 

1) Yes

2) I saved the metadata locally with the files. The thing keeping me from nuke and pave is reconfiguring Emby.  I am a supporter so I do have access to the server backup plugin for Emby but I know it doesn't backup everything.

3) Yes, and also not show the icon in the left control area nor allow the rebooting of the Emby server from outside it's own Jail Shell.

Link to comment
Share on other sites

Baenwort

I don't see the image of your jail settings. Did you ever change anything for the jail's networking? I'm not sure why you can't disable it. I'm not sure if this will actually change things for you, but for my particular setup, I have to disable this.

 

You top output shows mono (and not ffmpeg) is the heavy process. This sounds like possibly some bug in emby and sharing logs with @@Luke may show the issue.

 

The image was of the output of 'top'.  I can attach an image of the jail settings if that would be helpful for you.

 

Which Logs would you like me to capture and share?  I can reproduce this readily by rebooting the Emby plugin and it stays low. Once I log in with any account it goes up and stays there until the Emby plugin is restarted.

Link to comment
Share on other sites

josh4trunks

The image was of the output of 'top'.  I can attach an image of the jail settings if that would be helpful for you.

 

Which Logs would you like me to capture and share?  I can reproduce this readily by rebooting the Emby plugin and it stays low. Once I log in with any account it goes up and stays there until the Emby plugin is restarted.

I would...

service emby-server stop
rm -r /var/db/mediabrowser/logs/*
service emby-server start

Cause the issue to happen.

Then post the log file in /var/db/mediabrowser/logs.

Link to comment
Share on other sites

No need. This will be fixed when the current beta goes stable, hopefully tomorrow.

  • Like 1
Link to comment
Share on other sites

Baenwort

Okay, thank you Luke. I will await the update and retest to see if this persists.

 

Would the issue being resolved be both of the issues or just the CPU usage one?

Link to comment
Share on other sites

Baenwort

So the 3.0.5607.2 that showed up today in my FreeNAS Plugin > Installed area does not correct the problem with CPU usage by mono. Do you want me to redo and upload the logs or is the newer 3.0.5607.2 that Emby mentions the one that I need to await?

Link to comment
Share on other sites

Eternally

So I've been having a similar issue that after the last update has brought me here to troubleshoot. I updated from the MB plugin to the Emby plugin per your above instructions and everything was fine on the first versions.  However, since 3.0.558 I've had the described missing link to Emby under the plugin tree on the left control area of FreeNAS.  In-addition (I was willing to live without it as I used bookmarks and apps to actually access Emby) since the most recent update I've had Emby, after the first log in of a user/admin, peg a single core of my FreeNAS sever continuously. All syncs are disabled, all the scheduled tasks are completed, and no streams are being transcoded.  This continues for upto 12 hours (at which point I reset the plug in) and it then continues at 0-2% usage until the first person logs into Emby. This is what led me to find out that under the top control bar > Plugins > Installed would no longer start the plug in.  It would give the moving bars and then return to the off position. I am also unable to shut down the plug in from this control. It does shut down successfully from within the Emby Dashboard.

 

Starting via the command line in the jail does work. However, even when I do "sysrc emby_server_enable=YES" when I reboot the FreeNAS box Emby does not restart.

 

What logs would you like?

 

 

I have been checking on the freenas forums this has now started to become quite a common problem with many users.

https://forums.freenas.org/index.php?threads/plugin-update-breaks-gui-support.30651/page-3

 

This problem might be fixed soon in an update or when freenas 10 arrives in july or august.

 

https://bugs.freenas.org/projects/freenas/roadmap

 

This update might fix the problem when it is coming,

9.3-STABLE-201504100216      

 

Edited by Eternally
  • Like 1
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...