[Solved] Marked as played resets after restart

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
hego
Posts: 14
Joined: Mon Mar 14, 2022 8:26 am

[Solved] Marked as played resets after restart

Post by hego »

Hi all,

I looked for this issue here but could only find old posts that didn't help, so now I hope someone here can.

I have been having this issue for a looong time, actually, since PMS became UMS, but it's been bugging me more because Windows 11 restarts too much. When the server restarts I lose all videos marked as played. I have the shares all checked:

Image

I appreciate any help.

Thank you!
Attachments
UMS.png
UMS.png (46.11 KiB) Viewed 2400 times
User avatar
mik_s
Moderator
Posts: 1165
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Marked as played resets after restart

Post by mik_s »

Sounds like a problem with the database.

Could you post your logs (see the section in red above) so I can see what is happening?
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
hego
Posts: 14
Joined: Mon Mar 14, 2022 8:26 am

Re: Marked as played resets after restart

Post by hego »

Thank you and sorry for missing the logs.

Both logs were much larger than the 5 MB allotted, so I had to remove the file debug.log.prev.zip from them to be allowed to attach the files and I will send them on my next reply.

Thank you again.
Attachments
ums_dbg_2024-04-12-15-46_after_quit_server_and_start_again.zip
(85.81 KiB) Downloaded 63 times
ums_dbg_2024-04-12-15-39_with_files_marked_as_played.rar
(1.19 MiB) Downloaded 61 times
screenshots.rar
Screenshots from one of my players showing the files marked as played and then the mark is gone after quitting and restarting the server
(4.05 MiB) Downloaded 73 times
hego
Posts: 14
Joined: Mon Mar 14, 2022 8:26 am

Re: Marked as played resets after restart

Post by hego »

Here are the remaining logs.

Have a nice weekend.
Attachments
ums_dbg_2024-04-12-15-46_after_quit_server_and_start_again-debug.log.prev.rar
(1.64 MiB) Downloaded 66 times
ums_dbg_2024-04-12-15-39_with_files_marked_as_played-debug.log.prev.rar
(4.37 MiB) Downloaded 68 times
User avatar
mik_s
Moderator
Posts: 1165
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Marked as played resets after restart

Post by mik_s »

I'm staying with family for a few days so not set up to examine the logs in any detail but did check a few things.

One thing I suspected is the cache may be disabled but the setting shows it is enabled.

I had a very quick look at the logs and saw this error at the beginning.

Code: Select all

DEBUG 2024-04-12 15:42:02.608 [main] HikariPool-1 - Cannot acquire connection from data source
org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: "C:/ProgramData/UMS/database/medias.mv.db". Possible solution: use the recovery tool [90030-214]
Looks like something has happened to the database that has corrupted it.
You can try and delete it from "C:/ProgramData/UMS/database" (or rename the folder) when UMS is not running and it will build a new database next time it is started.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
hego
Posts: 14
Joined: Mon Mar 14, 2022 8:26 am

Re: Marked as played resets after restart

Post by hego »

Thank you for your time, I appreciate it.

I deleted the file - it was dated 2022 and had almost 3 GB - but the played mark was still disappearing after restart. However, UMS is loading much quicker than before, that's a welcome improvement. Anyway, I decided to look at the log and it said something like the file C:/ProgramData/UMS/database/medias.mv.db being locked (see below) by another instance, even with only one UMS running. I quit the server and tried then to rename the database folder but it also said the file was in use. So I restarted in safe mode, renamed the database folder and restarted the computer.

Now, the first time I ran UMS, it created the files medias.mv.db and USERS.mv.db. I ran through some videos to mark them as played and quit the server. When I restarted it, it created the files medias.trace.db and USERS.trace.db. Again the videos were not marked as played anymore. I attached the new logs, and now there are several messages about the file C:/ProgramData/UMS/database/medias.mv.db, including the one about it being in use, even though there is only one instance running.

Enjoy the time with your family, and have a great weekend!
Attachments
ums_dbg_2024-04-13-14-03_after_renaming_the_database_folder.zip
(2.92 MiB) Downloaded 61 times
User avatar
mik_s
Moderator
Posts: 1165
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Marked as played resets after restart

Post by mik_s »

Looking at the latest logs it seems another UMS is still running and so the database cannot be accessed and the ports for the web UI can't be used.
I have seen this sometimes happen if UMS is told to switch to trace mode and restart for the logs but starts up before the previous process has quit.
For some reason these logs were not in trace mode too which does not give much info.

There is a possibility that UMS is running as a service which could explain the corruption of the database if 2 copies of UMS is accessing it at the same time.
Try running "services" from the windows search bar and see if it lists UMS as a service.
I'm not sure this is the reason why as your other logs would say it has problems binding to ports.
Also check task manager to make sure that there is not another copy of UMS is running, it may be listed as javaw.exe

Looking at your settings it seems that you have been using UMS for a while starting from a quite old version as it still has options like shared and virtual folders that got moved to its own conf file. Might be worth reinstalling UMS using the "Clean install" option and manually set it up again. You should be alright keeping the SHARED.conf so you don't need to set up the shared folders again. This will also update the documentation in the UMS.conf if you ever want to manually change it.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
hego
Posts: 14
Joined: Mon Mar 14, 2022 8:26 am

Re: Marked as played resets after restart

Post by hego »

Thank you for the hints. I will be away from the server for a few days and will test the suggestions.

I will check the double instances and do a clean install, but these are things I have done or checked several times in the last 10 years, and I have Only run a single instance of UMS checked, so I shouldn't have two running.

One thing I forgot to mention is that this machine auto-logs in a user that runs some tasks, but has no admin permissions and I load UMS via a startup shortcut on my admin user only. Do you think this could be affecting something, even with UMS not being installed as service?
User avatar
mik_s
Moderator
Posts: 1165
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Marked as played resets after restart

Post by mik_s »

That could possibly be the cause but I know little about running UMS this way.
I think this is what the option for running it as a service is there for so it starts before a user logs in, you just have to make sure that you don't run it again when windows actually starts otherwise it will end up with 2 conflicting processes trying to use the same database and ports.

Try to keep it simple and have it run normally when windows starts as a normal user, it should not need admin permissions AFAIK.
Might be best to temporality disable that script and the other user to help rule that out as a factor.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
hego
Posts: 14
Joined: Mon Mar 14, 2022 8:26 am

Re: Marked as played resets after restart

Post by hego »

Sorry for taking so long, but here is the last update.

I logged off the other user to prevent any interference.

Now, when I quit UMS, the C:/ProgramData/UMS/database/ folder is still locked, even though I can't find any instance of UMS or javaw.exe anywhere on Task Manager - processes or services. When I check on Locksmith it says that the folder is locked by javaw.exe under my user
javaw.png
javaw.png (27.84 KiB) Viewed 2160 times
But again, I can't find it anywhere. Shouldn't this be finished when I quit UMS? Could this guy be the culprit: C:\Program Files (x86)\Java\jre1.8.0_321\bin\javaw.exe? I found references to this file in my registry.

One more thing: when I restart my computer and log in to my user, UMS starts automatically via a shortcut on my startup folder and the web settings page opens, but when I quit and load UMS again (without restarting the computer) it doesn't, so I'm assuming UMS isn't quitting completely unless I restart the computer.
Post Reply