Jump to content

Developing a standalone embystat server


reggi

Recommended Posts

cuzz1369

Well, thanks for the time you have put in so far :)

 

I guess I'll put it on the side lines for now and check back in later. Hopefully you will be able to release a somewhat stable version that people can begin to use regularly soonish.

If development is too slow for you it is open source so feel free to contribute. Or you could atleast keep it installed, help test and report bugs to speed up development!

 

Sent from my SM-G965W using Tapatalk

Link to comment
Share on other sites

darkassassin07

If development is too slow for you it is open source so feel free to contribute. Or you could atleast keep it installed, help test and report bugs to speed up development!

 

Sent from my SM-G965W using Tapatalk

I have very little coding experience, and have never worked on a public project before. I'm fairly certain I'd be more in the way than helpful here,but I do appreciate the open invitation.

 

 

 

I do plan to keep the server installed and check in now and again, I just meant its not something I'm going to expect to be reliable in anyway quite yet.

 

 

I do have a slightly odd problem:

I figured if I deleted the data.db file I could at least get to to sync, but it wasn't working. I then deleted the whole server folder and re-downloaded it from git hub. Now when I run it and open embystat in the browser, I always get the setup wizard. I complete the whole thing, then try to sync media and get told it didnt start because the wizard is still running. Refreshing just brings be back to the very first setup page. (during setup, embystat tells me it reached my server, and my admin deets are good)

 

 

Log:

2019-06-20 02:38:24.1144 [INFO] SYSTEM	Booting up server on port 5432 
2019-06-20 02:38:28.3216 [INFO] Starting Hangfire Server using job storage: 'Hangfire.MemoryStorage.MemoryStorage' 
2019-06-20 02:38:28.3216 [INFO] Using the following options for Hangfire Server:
    Worker count: 1
    Listening queues: 'main'
    Shutdown timeout: 1.00:00:00
    Schedule polling interval: 00:00:05 
2019-06-20 02:38:28.3563 [INFO] Server main server:18412:5c80c3d7 successfully announced in 14.6396 ms 
2019-06-20 02:38:28.3563 [INFO] Server main server:18412:5c80c3d7 is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler... 
2019-06-20 02:38:28.3563 [INFO] Server main server:18412:5c80c3d7 all the dispatchers started 
2019-06-20 02:38:39.0274 [INFO] SERVER-API	Starting wizard for user. 
2019-06-20 02:38:39.2409 [INFO] SERVER-API	Emby server found at: 192.168.0.106 
2019-06-20 02:38:44.6807 [ERROR] Failed connection handshake. 
2019-06-20 02:38:49.8970 [INFO] EMBY-CLIENT	Authenticating user Darkassassin07 on Emby server on http://192.168.0.106:8096 
2019-06-20 02:38:49.9010 [INFO] EMBY-CLIENT	Sending POST: http://192.168.0.106:8096/emby/Users/AuthenticateByName?format=json 
2019-06-20 02:38:58.3884 [WARN] SMALLEMBYSYNC-JOB	Job not running because wizard is not finished 
2019-06-20 02:39:21.4967 [INFO] SERVER-API	Starting wizard for user. 
2019-06-20 02:39:21.8498 [INFO] SERVER-API	Emby server found at: 192.168.0.106 
2019-06-20 02:39:27.6686 [ERROR] Failed connection handshake. 
2019-06-20 02:39:37.8520 [INFO] EMBY-CLIENT	Authenticating user Darkassassin07 on Emby server on http://192.168.0.106:8096 
2019-06-20 02:39:37.8520 [INFO] EMBY-CLIENT	Sending POST: http://192.168.0.106:8096/emby/Users/AuthenticateByName?format=json 
2019-06-20 02:39:44.6102 [WARN] The LINQ expression 'where {from CollectionType y in __types_0 where (Convert([y], Int32) == Convert([x].Type, Int32)) select [y] => Any()}' could not be translated and will be evaluated locally. 
2019-06-20 02:39:44.6102 [WARN] The LINQ expression 'where (Convert([y], Int32) == Convert([x].Type, Int32))' could not be translated and will be evaluated locally. 
2019-06-20 02:39:44.6180 [WARN] The LINQ expression 'Any()' could not be translated and will be evaluated locally. 
2019-06-20 02:39:58.4063 [WARN] MEDIASYNC-JOB	Job not running because wizard is not finished 
2019-06-20 02:39:58.4169 [WARN] MEDIASYNC-JOB	Job not running because wizard is not finished 
2019-06-20 02:40:13.4241 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 02:45:13.4187 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 02:50:13.4168 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 02:55:13.4084 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:00:13.4048 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:05:13.4014 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:10:13.3963 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:15:13.3937 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:20:13.3913 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:25:13.3867 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:30:13.3824 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:35:13.3772 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:40:13.3739 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:45:13.3743 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:50:13.3816 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 03:55:13.3803 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:00:13.3875 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:05:13.3896 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:10:13.3952 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:15:13.4017 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:20:13.4026 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:25:13.4038 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:26:53.6213 [INFO] SERVER-API	Starting wizard for user. 
2019-06-20 04:26:53.7684 [INFO] SERVER-API	Emby server found at: 192.168.0.106 
2019-06-20 04:26:59.3449 [ERROR] Failed connection handshake. 
2019-06-20 04:30:13.4058 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
2019-06-20 04:35:13.4136 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 
 
Edited by darkassassin07
Link to comment
Share on other sites

reggi

Thanks for the log, there is indeed some strange behavoir for some users. I haven't been able to reproduce this issue myself.

For what I can tell is that the WizardFinished boolean is not updated correctly in the user settings file. You can always try to update it manually.

 

If you want to increase your own development skills and speed up the project I can always get you started in the code. Feel free to PM me about it.

At the moment the app is indeed very unstable and not ready for production. I do hope this will change soon when I moved the database and UI.

 

Short update about the UI, I finished the Shows page (screens will be posted later) and have to finish the wizard and users page now. 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...
ThePaladinTech

After building, this command can change the exe type for windows so that there's no console:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\editbin.exe" /subsystem:windows "exe path"

Or you can create two application projects - a windows .net core app for windows, a console app for the other operating systems, and then have them both use a shared library with your actual application code.

 

Is this version available somewhere? I've downloaded the latest and when I run it I get the 'ugly console window' - I don't have visual studio. 

 

Thanks

Link to comment
Share on other sites

WilhelmStroker

Is this version available somewhere? I've downloaded the latest and when I run it I get the 'ugly console window' - I don't have visual studio. 

 

Thanks

If the ugly console window is an issue, you coukd use nssm and run embystat as a windows service.
Link to comment
Share on other sites

archangelz

Is this version available somewhere? I've downloaded the latest and when I run it I get the 'ugly console window' - I don't have visual studio. 

 

Thanks

 

nvm. Misread your post. 

Edited by archangelz
Link to comment
Share on other sites

  • 2 weeks later...
Shidapu

So, i read the warning message on Emby server, that the statistics plugin will be disabled soon. But i should go for this plugin instead. The only issue is that i'd like it to be downloadable within the emby server plugin directory. Will it?

Link to comment
Share on other sites

reggi

@@neik, I'm currently moving my build pipelines to Azure DevOps. Seems to go pretty good and I'm building my nightly Docker conainers version again (the ones online now are not working yet!).

When that is done I will start moving the Beta pipelines (will be done today or tomorrow) and then I can release the new BETA with new UI and LiteDB database (no more database locked errors I hope :) )

 

@@Shidapu, like @@PenkethBoy mentioned this is not a plugin anymore but a standalone application. This is still in early beta stage. If you can wait a few days, there is a new beta release soon with a new UI.

  • Like 2
Link to comment
Share on other sites

@@neik, I'm currently moving my build pipelines to Azure DevOps. Seems to go pretty good and I'm building my nightly Docker conainers version again (the ones online now are not working yet!).

When that is done I will start moving the Beta pipelines (will be done today or tomorrow) and then I can release the new BETA with new UI and LiteDB database (no more database locked errors I hope :) )

 

@@Shidapu, like @@PenkethBoy mentioned this is not a plugin anymore but a standalone application. This is still in early beta stage. If you can wait a few days, there is a new beta release soon with a new UI.

 

That's too bad.  It seems like a step backward to me.  I was happy to see this type of information in Emby and not a separate app like the nonsense I had to deal with on Plex.  

Link to comment
Share on other sites

Pog22

That's too bad. It seems like a step backward to me. I was happy to see this type of information in Emby and not a separate app like the nonsense I had to deal with on Plex.

Emby is badly missing a Tautulli, it gives great control and stats on Plex

  • Like 1
Link to comment
Share on other sites

Happy2Play

Emby is badly missing a Tautulli, it gives great control and stats on Plex

 

And how long did it take to build Tautulli for Plex?  Someone has to do that from scratch for Emby.

Link to comment
Share on other sites

Emby is badly missing a Tautulli, it gives great control and stats on Plex

 

I liked Tautulli because it was the only option.  There were many requests to have that functionality built into Plex but it fell on deaf ears.  My preference is to run as little as possible on my server since I am the one and only support for it (plus it opens up more surface area for attack).   The good news it the Playback Reporting plugin gives me much of what I want so I probably won't worry about another stand alone app. 

Link to comment
Share on other sites

jaycedk

I liked Tautulli because it was the only option.  There were many requests to have that functionality built into Plex but it fell on deaf ears.  My preference is to run as little as possible on my server since I am the one and only support for it (plus it opens up more surface area for attack).   The good news it the Playback Reporting plugin gives me much of what I want so I probably won't worry about another stand alone app. 

Well if its a problem for you, you should just leave it at that, its your choose to install and use.

Link to comment
Share on other sites

reggi

Hey guys, some good news at last! After a couple of months (sorry for the long wait) I pushed a new beta version 0.2.0-beta.1 downloadable here => https://github.com/mregni/EmbyStat/releases/tag/v0.2.0-beta.1

 

Some massive changes are pushed

* New dark UI 

* Integration with Bootstrap grid

* Changed default port to 6555
* LiteDB database, should fix database locked errors
* Increased sync speed
* Added increment sync system

 

The biggest changes are the UI and the database itself. I'm using a document structured database now, meaning all queries should go a lot faster.

I also changed the sync job so only 3 calls are made to your Emby server (previous version would DDOS your Emby server like hell) and an incremental call will happen to check for missing episodes meaning that a second media sync run will go even faster.

 

Because the default port 5432 was used by a Synology service I changed the default port to 6555. After some research I think that an open port on most systems. If not, change the port with the --port flag. 

 

Another thing to mention is that the docker tags are changed:

* dev-win10-x64

* dev-ubuntu-x64

* beta-win10-x64

* beta-ubuntu-x64

I included the OS version in the tags to know what .NET CORE OS runtime was used. 

 

On GitHub you can find the builds itself for 5 different operating systems included a new linux-arm-x64 build which should run on a Raspbery PI. I didn't test it yet, but feel free to test it and give me a response on how it works on a Pi.

At the moment there is no real support for running the app as a service on Windows but you can (like others mentioned already) use NSSM to run it as a service. I will have to do some research about windows services and .NET CORE.

 

EDIT:

I forgot to mention that there is no database migration for this version because it was way to complicated to do that. So please just remove your old EmbyStat version and do a clean install if that's possible.

 

So, it's finally here the new beta. I worked a long time on this one and I hope you all like it. I did not include a lot of bug fixes in here because I wanted to do the migrations first.

Feel free to test and report any bugs here or on GitHub.

Edited by reggi
  • Like 7
Link to comment
Share on other sites

reggi

hehehe, have fun testing! I hope I didn't forget anything to make it run a bit stable :)

Link to comment
Share on other sites

Pog22

Ok, first snag. I'm using uping/embystat:beta-ubuntu-x64 in docker and I see this in the log:


Did you mean to run dotnet SDK commands? Please install dotnet SDK from:


  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409


Did you mean to run dotnet SDK commands? Please install dotnet SDK from:


  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409


Did you mean to run dotnet SDK commands? Please install dotnet SDK from:


  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409


Did you mean to run dotnet SDK commands? Please install dotnet SDK from:


  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409


Did you mean to run dotnet SDK commands? Please install dotnet SDK from:


  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409


Link to comment
Share on other sites

reggi

Mmm, it's currently running the ubuntu docker on my machine without problem (see image)

 

 I have seen this error before! What commando did you use to start the container?

post-33776-0-40495700-1563546392_thumb.png

Link to comment
Share on other sites

Pog22

I'm using docker-compose

   embystat:
     container_name: embystat
     image: uping/embystat:beta-ubuntu-x64
     volumes:
       - /opt/appdata/embystats:/app
     expose:
       - 6555
     environment:
       - PUID=1001
       - PGID=1001
       - TZ=Europe/London
       - VIRTUAL_HOST=embystats.mydomain.com
       - LETSENCRYPT_HOST=embystats.mydomain.com
       - LETSENCRYPT_EMAIL=myemail@gmail.com
     restart:
       always       
Link to comment
Share on other sites

Napsterbater

Doh, nvm, seems was an issue since it was behind Nginx Reverse proxy, did it via a direct connection worked fine.. And now that it is past the Wizard it works fine behind Nginx. 
 

Not sure what it did not like behind Nginx.

 

 

 

=========Disregard Below==========

 

On Windows Server 2016 1607, I can not get past checking emby server.. Details are correct, nothing in log. 

 

Prev version I got past this no problem.

5d31dc5b3d7e1_Capture.png

2019-07-19 10:56:58.7054 [INFO] SYSTEM	Booting up server on port 6555 
2019-07-19 10:57:00.3636 [INFO] Starting Hangfire Server using job storage: 'Hangfire.MemoryStorage.MemoryStorage' 
2019-07-19 10:57:00.3636 [INFO] Using the following options for Hangfire Server:
    Worker count: 1
    Listening queues: 'main'
    Shutdown timeout: 1.00:00:00
    Schedule polling interval: 00:00:05 
2019-07-19 10:57:00.6100 [INFO] Server main server:130948:fd42b763 successfully announced in 200.5662 ms 
2019-07-19 10:57:00.6213 [INFO] Server main server:130948:fd42b763 is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler... 
2019-07-19 10:57:00.7260 [INFO] Server main server:130948:fd42b763 all the dispatchers started 
2019-07-19 10:57:02.6668 [INFO] SERVER-API	Starting wizard for user. 
2019-07-19 10:57:02.6668 [INFO] SERVER-API	Starting wizard for user. 
2019-07-19 10:57:02.6668 [INFO] SERVER-API	Starting wizard for user. 
2019-07-19 10:57:02.8865 [INFO] SERVER-API	Emby server found at: 10.0.1.5 
2019-07-19 11:00:16.0066 [INFO] PINGEMBYSERVER-JOB	Starting job 
2019-07-19 11:00:16.0559 [WARN] PINGEMBYSERVER-JOB	Job not running because wizard is not finished 

Edited by Napsterbater
Link to comment
Share on other sites

neik

Hi reggi,

 

first of all once again thanks for all the effort you put into this!

 

I just tried it and noticed how much faster the sync process finishes compared to one of the older betas.

Anyway, whenever I try to open any tab from the left-hand side I get an unhandled exception. I attached you a log.

 

 

EmbyStats_Log.txt

  • Like 1
Link to comment
Share on other sites

reggi

@@Napsterbater, good that it's working now. Why it doesn't like the reverse proxy I have no idea. Feel free to test some stuff out. I will have a look later as well.

 

@@neik, looks like your movie calculation is failing for a weird reason. I will have to look into this, github issue can be found here => https://github.com/mregni/EmbyStat/issues/808

  • Like 1
Link to comment
Share on other sites

mgworek

Awesome!

 

Have the new version up and running. DB would normally lock up in 1-2 days so keeping fingers crossed!

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