Jump to content

Developing a standalone embystat server


reggi

Recommended Posts

reggi

Mmmm, that is maybe because Emby is sending the same mediasource twice in the reply. Not sure. This will probably be fixed as well when I move EmbyStat to NOSQL because then an automatic upsert will happen instead of an insert. 

I'll keep you posted about this.

 

FYI: from 30/05 until 14/06 I'm going on holiday to the US. So I will probably will answer with some delay I the thread and no development will happen in that time as well. However, I'm almost done moving the UI, shows page is almost finished as well.

Link to comment
Share on other sites

Diedrich

 

 

FYI: from 30/05 until 14/06 I'm going on holiday to the US.

AWESOME! Where are you going to go/see?
Link to comment
Share on other sites

reggi

AWESOME! Where are you going to go/see?

 

I'm going to make a road trip with 2 other friends. We land in LA and then drive 2000km to SF, Yosemite park, Dath Valley, Las Vegas, Grand Canyon, 5 other national parks and San Diego. Hope it will be fun :D

Link to comment
Share on other sites

adrianwi

I did a similar trip way back in 1994 flying into SF and driving to LA via Yosemite, Vegas, Grand Canyon and others.

 

Remember the drive back to LA listening to the radio for the the verdict of the OJ Simpson trial.  If he'd been found guilty, we were worried LA might not be too safe.  It was more like a party with loads of people wearing 'The Juice is Loose' t-shirts.

 

Crazy times!  Have a blast...

Edited by adrianwi
Link to comment
Share on other sites

  • 2 weeks later...
nathanraposo

Estou com problemas estou colocando linguagem Brasileiro e não está traduzindo devo fazer algo a mais ?

Link to comment
Share on other sites

darkassassin07

Is there a good way to run this as a background application in windows 10 currently? (ie without a window always open on the desktop/taskbar)

 

Im starting embystat by double clicking the exe, however this always creates a cmd window that must remain open for the server to continue operating instead of say, a tray icon like emby itself.

  • Like 1
Link to comment
Share on other sites

WilhelmStroker

Is there a good way to run this as a background application in windows 10 currently? (ie without a window always open on the desktop/taskbar)

 

Im starting embystat by double clicking the exe, however this always creates a cmd window that must remain open for the server to continue operating instead of say, a tray icon like emby itself.

Use nssm to create a service for the exe, that's what I did and that seems to work fine.
Link to comment
Share on other sites

Mmmm, that is maybe because Emby is sending the same mediasource twice in the reply. Not sure. This will probably be fixed as well when I move EmbyStat to NOSQL because then an automatic upsert will happen instead of an insert. 

I'll keep you posted about this.

 

Seems it was. My music library, while only showing once in the server dashboard was showing twice in the main UI. Deleted it and we seem to be much better now.

Link to comment
Share on other sites

darkassassin07

Bug/Server Crash report:

 

I have had embystat running for about a day continuously since last restart, then went to access it through my nginx proxy as I have been for a week or so now. The dashboard loaded up as it normally does except it didn't include the usual 'No content here yet!' message, just blank white space. I then clicked 'movies' and it loaded up with the title 'Movies' at the top, but the same empty whitespace as the dash had. I tried Shows, and users but got the same thing. I then tried jobs and got the same page, just with a blue box with only the words 'Job Logs'.

From there the server stopped responding to html requests so I went to the server machine and found the exe was no longer running.

 

 

Now that I have restarted the exe: Shows, Users, Plugins, and Emby server all load correctly and display the info they should be. Movies however gives me the error "No movies found" and asks to start a sync job. I havn't started a sync yet since the crash.

Going into the jobs page, the Media Synchronization job has the red text "Last run 7 hour(s) and 10 minute(s) ago, but failed after -24 second(s)"

 

 

attached is todays log file.

 

Here is the error from the tail end of it:

2019-06-10 20:00:09.0654 [INFO] MEDIASYNC-JOB Starting job 
2019-06-10 20:00:09.0654 [INFO] EMBY-CLIENT Sending a ping to Emby 
2019-06-10 20:00:09.0654 [INFO] EMBY-CLIENT Sending POST: http://192.168.0.106:8096/emby/System/Ping?format=json 
2019-06-10 20:00:09.0770 [INFO] MEDIASYNC-JOB First delete all existing media and root media collections from database so we have a clean start. 
2019-06-10 20:00:10.3955 [INFO] Received web socket message: Sessions 
2019-06-10 20:00:14.8726 [INFO] Received web socket message: Sessions 
2019-06-10 20:00:20.6155 [INFO] Received web socket message: Sessions 
2019-06-10 20:00:30.6291 [INFO] Received web socket message: Sessions 
2019-06-10 20:01:00.7576 [ERROR] Failed executing DbCommand (30,100ms) [Parameters=[@__sessionId_0='?' (Size = 32)], CommandType='Text', CommandTimeout='30']
SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM "Sessions" AS "x"
        WHERE "x"."Id" = @__sessionId_0)
    THEN 1 ELSE 0
END Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
2019-06-10 20:01:01.1472 [ERROR] An exception occurred while iterating over the results of a query for context type 'EmbyStat.Repositories.ApplicationDbContext'.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers, Boolean throwOnNullResult)
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers, Boolean throwOnNullResult)
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
2019-06-10 20:01:01.1720 [ERROR] An exception occurred while iterating over the results of a query for context type 'EmbyStat.Repositories.ApplicationDbContext'.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers, Boolean throwOnNullResult)
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass15_1`1.<CompileQueryCore>b__0(QueryContext qc) Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers, Boolean throwOnNullResult)
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass15_1`1.<CompileQueryCore>b__0(QueryContext qc)
2019-06-10 20:01:01.1720 [INFO] Received web socket message: Sessions 
 
/update:

 

 

I manually started a small sync which finished just fine.

I then started a media sync, got the lines:

2019-06-11 01:18:46.6416 [iNFO] MEDIASYNC-JOB First delete all existing media and root media collections from database so we have a clean start.

2019-06-11 01:18:50.0313 [iNFO] Received web socket message: Sessions

then the got the same error again and the exe crashed.

 

 

 

 

 

As a side note, mainly out of curiosity:

Why does embystat require an administrator user+pass instead of just an api key?

2019-06-10.log

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

Use nssm to create a service for the exe, that's what I did and that seems to work fine.

Thanks, I'll definitely take a look at that once I have embystat up and running again :)
Link to comment
Share on other sites

Damply

I'm having an issue setting up embystat. When i put in my servers ip it says it cant find it. I tried localhost, my internal ip, my external ip. They way i access it on my computer is localhost, on my network i use my internal ip. How do i make it see my server?

Link to comment
Share on other sites

djhifi

Any update regarding EmbyStat being available through synology's Package Center?

 

Would love to test it.

Link to comment
Share on other sites

IkeTaylor11

@@reggi is there a way to install or run this as a service on windows? I would prefer not to have a command prompt open in order to make this work. 

Link to comment
Share on other sites

Happy2Play

@@reggi is there a way to install or run this as a service on windows? I would prefer not to have a command prompt open in order to make this work. 

 

post 307

Use nssm to create a service for the exe, that's what I did and that seems to work fine.

  • Like 1
Link to comment
Share on other sites

IkeTaylor11

post 307

That was gonna be my next option. Just didn’t know if the app itself had this functionality built in.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Happy2Play

That was gonna be my next option. Just didn’t know if the app itself had this functionality built in.

 

 

Sent from my iPhone using Tapatalk

 

Doesn't appear so as I just tried creating a Window service and it would not run.

Link to comment
Share on other sites

reggi

Hey guys, I'm back at home starting to work on EmbyStat :)

 

@@IkeTaylor11, like @@Happy2Play already mentioned best way now it to use nvvm. When the app is more stable I will create windows service packages as well. @@djhifi, this also includes a Synology package, for the moment you can install it on your NAS with the docker image.

  • Like 1
Link to comment
Share on other sites

darkassassin07

Hey @@reggi, welcome back. Hope your road trip went well :)

 

 

Have you got any ideas about post #309? Currently my instance of embystat is throwing that error and crashing everytime I run a sync.

Link to comment
Share on other sites

jaycedk

Hey @@reggi, welcome back. Hope your road trip went well :)

 

 

Have you got any ideas about post #309? Currently my instance of embystat is throwing that error and crashing everytime I run a sync.

 

END Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.

 

The DB is locking up.

Known issue.

He is working on the issue, by using another DB.

https://github.com/mregni/EmbyStat/issues/645

Link to comment
Share on other sites

darkassassin07

Ah, alright. That github issue is over 2 months old, I thought that db migration had already happened.

 

Im using the same version I originally installed two weeks ago which worked just fine on initial sync as well as the second/third syncs.

 

As long as it's known and being worked on. Currently my instance of embystat is completely unusable.

I waited a full year before installing it specifically to avoid impassable issues like this one and give plenty of time to develop a useable system.

 

 

 

I seriously miss plexpy (aka Tautulli now).

Link to comment
Share on other sites

reggi

@@darkassassin07, I know the development is going really slow. I'm a full time developer and after 40 hours of software development it sometimes is hard to work on the project at home.

For the moment the project is still in a very unstable version. I'm updating the UI first, after that the database migration will happen. It has been a while that I could create a beta release because of the refactoring needed.

  • Like 1
Link to comment
Share on other sites

darkassassin07

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.

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