plexSentry (20160511 Update)

small request… anyway we can get the plexsentry.exe compiled to minimize to task bar rather than having a cmd prompt open on my desktop all day every day. I’d like to see it tucked away in the task bar.

Otherwise awesome app for helping me control/limit my users streams. Would love for a way to force stream quality limits.

i ran the plex sentry as a system service, so the command window is hidden.

@angelnero let me see if i can do a switch for that (or will just include two binaries)

hi,

not sure what happened with my plexsentry DB but it cot corrupted so I deleted it an re-created it by using the SQL query provided in the zip file.
DB connection string is:
I did not do any other changes to the config but now I get error messages like the below.

for me it looks like a DB permission/access issue. any ideas?

Program has started, loading configuration Using unsecured connection (http) Database Updates Retrieving authorization token from plex.tv Retrieving server info from local server Retrieving stored server info from database Accessing server variables from database Updating database with local server info Database update failed Updating shared users list from plex.tv to database Updating shared users list from plex.tv to database 2016-06-22 10:05:13- Starting timer to check status at a interval of 5 seconds Accessing user list from database Checking for currently connected clients Error when checking client connections Checking for currently playing sessions Error when checking user sessions 2016-06-22 10:05:18- Checking current syncs Error when checking sync sessions Checking for orphaned transcode sessions Error when checking orphaned transcode sessions 2016-06-22 10:05:19- Starting timer to check status at a interval of 5 seconds

ok got it to work again, at least the backend. did a full re-installation.
one thing I noticed is that if PlexSentry gets interrupted by any reason and I need to restart it the some of the active streams getting disconnected since they are recognized as orphaned sessions/streams and if the user re-login in the session will gets disconnected as well.
the only thing which helped till now was to clean the stream table.

@make77 said:
hi,

not sure what happened with my plexsentry DB but it cot corrupted so I deleted it an re-created it by using the SQL query provided in the zip file.
DB connection string is:
I did not do any other changes to the config but now I get error messages like the below.

for me it looks like a DB permission/access issue. any ideas?

Program has started, loading configuration Using unsecured connection (http) Database Updates Retrieving authorization token from plex.tv Retrieving server info from local server Retrieving stored server info from database Accessing server variables from database Updating database with local server info Database update failed Updating shared users list from plex.tv to database Updating shared users list from plex.tv to database 2016-06-22 10:05:13- Starting timer to check status at a interval of 5 seconds Accessing user list from database Checking for currently connected clients Error when checking client connections Checking for currently playing sessions Error when checking user sessions 2016-06-22 10:05:18- Checking current syncs Error when checking sync sessions Checking for orphaned transcode sessions Error when checking orphaned transcode sessions 2016-06-22 10:05:19- Starting timer to check status at a interval of 5 seconds

@angelnero said:
Quick FYI for those of you that were getting blank web UI’s (only headers showing); using chrome and F12 showed that there was a problem with IIS connecting to database.plex.aspx due to no access in SQL for the default app pool… i ran the following SQL query and everything started working…

CREATE LOGIN [IIS APPPOOL\DefaultAppPool] FROM WINDOWS
GO
–USE Table Name
GO
CREATE USER [IIS APPPOOL\DefaultAppPool] FOR LOGIN [IIS APPPOOL\DefaultAppPool]
GO
EXEC sp_addrolemember ‘db_datareader’, ‘IIS APPPOOL\DefaultAppPool’
GO
EXEC sp_addrolemember ‘db_datawriter’, ‘IIS APPPOOL\DefaultAppPool’
GO

thanks a lot for this. that did the trick.

i think I’m finally nearly there.

  • backend working
  • frontend working, however no thumbnails at this point

the only problem I have now is that my android sessions/streams are getting killed and then I have the orphaned issue

@make77 I have the exact same status your currently at.

backend working
frontend working, however no thumbnails at this point
the only problem I have now is that my android sessions/streams are getting killed and then I have the orphaned issue

all the same problems.

i had random.server’s help setting up my install for me. but those issues where left over. He told me that the orphaned issue is something to do with timing perhaps with a possible issue to writing to the database.

@m1e1w1 said:
@make77 I have the exact same status your currently at.

backend working
frontend working, however no thumbnails at this point
the only problem I have now is that my android sessions/streams are getting killed and then I have the orphaned issue

all the same problems.

i had random.server’s help setting up my install for me. but those issues where left over. He told me that the orphaned issue is something to do with timing perhaps with a possible issue to writing to the database.

but is this a general problem or do only we both have it? i really like the idea of the app but if this is a general issue its right now not usable for me. i have a couple off android devices and if their session is getting terminated like this …

i hope there is a way to fix this since as i said, the app is otherwise fantastic and i would be more than happy to use it.

Are there any plans to implement a maximum bitrate? I’m not concerned with transcode cpu useage, but I am concerned about my terrible 5mbps upload capping out.

How unfortunate it requires windows…

I wouldn’t consider myself a n00b with plex or PC’s, but the instructions to get this working correctly have amounted to over a year and 16 pages of instructions.

A clear - you need to install this, add this as your connection put the files and folders here are an absolute must for this project. It’s a fantastic idea, but I’ve been trying to set this up by myself for almost 3 days and am getting no where.

The instructions for installing and using SQL Express or anything like it are as clear as mud.
I’ve given up… Shame.

Help: I have the plexsentry.exe running and looks good without errors. I installed IIS and configured it as tutorial showed. What exactly should I use as url when in chrome to access the UI? Everything I’ve tried gets an Error 404.

Thanks this is a great app. Is it possible to use it to block people from using the Plex Web Player to connect to my server? Would cut down on my transcoding requests. Thanks.

I didn’t have a web.config file for ASP.Net in the root “Website” folder, which was preventing things from working.

I created the file and added the connection string and some other settings to diagnose the website not working initially.

This fixed the only piece I was having trouble with. Excellent work dude!

web.config:

<configuration> <connectionStrings> <add name="PlexSentry" connectionString="Server=127.0.0.1;Database=PlexSentry;User Id=PlexSentry;Password=SentryPassword;" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <customErrors mode="Off"/> <compilation debug="true"/> </system.web> </configuration>

Hi,

was wandering if the orphaned issue with android clients could be solved already.

Can anyone explain the purpose of the “x264”, “x265”, “other” columns on the USERS section? What is the expected behavior when each of those is checked?

My user has all 3 checked, but it was still preventing me from doing a Transcode for a movie that my Smart TV was having trouble playing last night. I had to kill the process in order to allow me to transcode the video.

tried to follow the steps as per the little tutorial but just cant get this setup right…
I’ve created the database (by copying the text into sql studio and then executing)
…says created
eventually got the server part working and seems to be reporting back correctly in cmd but no dice on the website part
I’m guessing it has to be physically hosted somewhere?
as in google drive or similar?

trying to open the web.config file just gives me this…

This XML file does not appear to have any style information associated with it. The document tree is shown below.

Is there a tutorial i can follow to install this. Im a complete and utter NOOB and have no idea what im doing, especially with SQL. I tried SQLite but its awful. I wanna try with SQL Server Express. Anyone able to help me?

@charlas

Your tutorial is amazing, glad i found it. Been trying for hours to try and get this working. I’ve run into a bit of an issue though. Here is a screenshot of what is happening https://puu.sh/sBWlu/f470462b76.png The PlexMonitor application (PlexSentry.exe) keeps crashing when i run it. The cmd window says “Unhandled Exception: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.”
The server is working as I can connect using SQL Studio but the plex sentry app cant see it.