Jump to content

Why does the server need to re-scan before it will work?


gfgf

Recommended Posts

gfgf

After I boot my PC which runs MediaBrowser3 Server, it re-scans the entire library, and then everything works fine. This takes a long time, but the library hasn't changed. If I don't let the server do this scan - by turning off the event - then content will not be available to client apps until the library has been scanned manually.

 

When I first started using MB3 Server in October 2013, this was not a problem. Can this be fixed so that the server can maintain its library and keep it available without having to rescan at startup?

Link to comment
Share on other sites

Beardyname

The scan at startup (as you pointed out) you can disable if you want, it however should not take that long - my library is quite large and takes 10-20 secs.

And it definitely should remember all the "old" content.

 

Attach a fresh server-log and perhaps @@Luke can find what's causing this :)

  • Like 1
Link to comment
Share on other sites

it takes about 20-30 seconds for most. if it's taking longer for you we should investigate.

Link to comment
Share on other sites

Something is taking a really long time in your environment.  Tough to tell exactly what because debug logging isn't turned on.

 

Also, what is this?

GET: http://www.mb3Me.com/Me/service/MB3Packages.json

Have you spoofed or redirected our server...?

Link to comment
Share on other sites

gfgf

Nope. Is it something dodgy?

 

I've turned on debug logging and deleted the MB3 folder in appdata and the scan is a bit quicker (down to 2 minutes from 6). Here's the interesting bit:

 

2014-05-04 17:24:26.9260 Warn - StringMapTypeDeserializer: Property 'u' does not exist on type 'MediaBrowser.WebDashboard.Api.GetDashboardResource'

2014-05-04 17:24:27.3373 Info - Dlna: 192.168.0.100:65244 - Responded to a urn:schemas-upnp-org:device:MediaServer:1 request to 192.168.0.100

2014-05-04 17:24:27.8473 Error - DtoUtils: ServiceBase2014-05-04 17:25:20.9669 Info - App: HttpClientManager GET: http://bot.whatismyipaddress.com/
2014-05-04 17:26:15.5215 Info - App: Cache file cleanup Completed after 1 minute(s) and 51 seconds
2014-05-04 17:26:15.5215 Info - ServerManager: Sending web socket message ScheduledTaskEnded
2014-05-04 17:26:30.0113 Info - App: People validation complete
2014-05-04 17:26:30.8844 Info - App: Scan media library Completed after 2 minute(s) and 6 seconds

 

It doesn't seem particularly detailed. I guess I'll try to locate the version from October and re-install that.

Edited by gfgf
Link to comment
Share on other sites

No, don't go back to October.  That will be a real problem as too much has changed.

 

2 minutes for a start up scan is not unreasonable.  That is about what mine is.  The library is available before that scan completes though.

Link to comment
Share on other sites

gfgf

Hmm. I don't want it to scan tho. I want it to know the library is the same as it was before and update only when I add content.

 

It does update when I add content, but only if it ran a scan at start-up. Likewise, the major categories of Movie and TV aren't available to clients (Android, Roku, Windows Phone) unless the start-up scan happened.

Link to comment
Share on other sites

steve1977

The opening poster is right that something has changed and MBS now requires a scan after server restart. In earlier versions, I could just disable the "scan function" and the library was there upon restart. The scan does not have to complete for the library to reappear though.

 

I don't mind too much either way, but wanted to share that I share gfgf's observation. If additional logs are needed, please let me know.

  • Like 1
Link to comment
Share on other sites

Also, what is this?

GET: http://www.mb3Me.com/Me/service/MB3Packages.json
 
Have you spoofed or redirected our server...?

I bet there was a find and replace done on the log file that produced that result.

Link to comment
Share on other sites

I bet there was a find and replace done on the log file that produced that result.

 

Nice catch...

 

Admin --> Me

Link to comment
Share on other sites

swhitmore

My first scans take about 20-35mins. I always thought this was normal so I never thought anything of it.  :unsure:

 

Here is my last log. This scan took 35mins.

Edited by swhitmore
Link to comment
Share on other sites

 

 

I want it to know the library is the same as it was before and update only when I add content.

 

The only way to accomplish that is to scan what is there when we start up in order to compare it to what was there before.

 

Our system is designed to self-maintain - so you don't have to do anything to keep it up to date (like some other systems).  For the majority of people, this makes it much easier.

Link to comment
Share on other sites

JohnnyM

Mine takes about 12 minutes to scan the library on startup but if I hit the scan library under scheduled tasks to force a scan it only takes 30 seconds. What's the difference???

 

My startup of Media server runs 4 minutes after the computer is boot so it doesn't interfere with the normal computer start up

  • Like 1
Link to comment
Share on other sites

gfgf

...if I hit the scan library under scheduled tasks to force a scan it only takes 30 seconds. What's the difference???

 

Yes, mine's like that. It only takes 7 seconds if I run in manually, or between 2 and 6 minutes with the automated scan. The server works fine as long as one of the scans completes.

 

I'd be happy to turn off the build-in start-up scan if I knew the command to issue to run a manual scan. Then I could put a .bat file in Windows startup. Maybe the devs can help us with this interim solution?

Link to comment
Share on other sites

MrWebsmith

can i ask a related question, what is the need to reboot a "SERVER" or a machine you're running a server piece of software on, that requires such frequent reboots?

 

i run my MBS on a "desktop win7 pro x64 box" that is my "server" for mb3/sab/sb/couchpotato/metabrowser etc... so every bit (usually around 2wks or so) i do a shutdown of those various services, reboot the machine, bring it all back.. etc.. during this time for my large library (approx 34TB at this point) my initial scan is under 3-4mins

 

so in my head.. 3-4mins of my clients/family not being able to watch something in the span of (completely controllable be me) 2 weeks.. is OK...

 

can you elaborate on whats driving the need for your enviroment so we can possibly work to improve the situation in other ways or with other workarounds?

 

-MWS

  • Like 1
Link to comment
Share on other sites

gfgf

I've posted one resolution over in the "old version?" thread here: http://mediabrowser.tv/community/index.php?/topic/7020-looking-for-an-old-version-of-mb3-server/

 

I'd prefer to run the current version, but the devs haven't even acknowledged the problem yet - and it's blindingly obvious - so I'm skeptical that they've any interest in fixing it.

 

My preferred interim solution would be this one: http://mediabrowser.tv/community/index.php?/topic/7022-http-api-via-commandline-wget/

Link to comment
Share on other sites

steve1977

Also, I don't really see a problem with the slow scan (I could be wrong here) but i think the "larger" error is that you don't have a library after startup.

 

That's what I mean. I actually don't see any big issue for me in the day-to-day use, but there has definitely been some bug introduced with one of the latest updates to MBS. What I am reading from this thread:

 

1) Library not available after MBS restart (if library scan disabled) - I can confirm and this should be reproducable quite easily. If I add the task to scan library at restart, the library appears very shortly after restart. I don't think it is a big deal and I don't mind too much, but it appears to be a bug.

 

2) Scan after restart takes longer than manual start in settings - I personally don't experience this issue, but can time again when I am back to my computer

 

3) Library scan stalls and scan does not complete - there are two separate threads on this topic (one of media library scan and one on people scan). It may be related, but it should not be part of this thread

Link to comment
Share on other sites

Beardyname

Nope, but this software gets worked on like nothing else :) So it has happend alot in a very short while. I'm quite sure they will get around to fixing it!

 

Unfortunatley I can't for the life of me reproduce this so I can't be of any more help :/ (running latest dev)

Link to comment
Share on other sites

CBers

@@gfgf - no errors relating to your media in the server log?

 

A long shot, but remove one media librsrt/folder at a time and rerun the scan/restart the server and see uf/when the runtime decreases.

 

Or, remove all and add one at a time.

 

You might get some indication of a problem when removing/adding a folder.

Link to comment
Share on other sites

Beardyname

I'm not sure I understand the question. If the server starts without running a library scan then only the folders list is available to client apps. The major categories of TV and Movies will not be available.

 

I was wondering if it always happens from a cold-boot (computer restart) or if the same affect occurs if you restart the server.

 

Seeing as it happens for you even if you only just restart the MediaBrowserServer answers my question.

Sadly I can not duplicate this :/

 

Hopefully somone will figure out what is wrong :)

Link to comment
Share on other sites

Beardyname

can i ask a related question, what is the need to reboot a "SERVER" or a machine you're running a server piece of software on, that requires such frequent reboots?

 

i run my MBS on a "desktop win7 pro x64 box" that is my "server" for mb3/sab/sb/couchpotato/metabrowser etc... so every bit (usually around 2wks or so) i do a shutdown of those various services, reboot the machine, bring it all back.. etc.. during this time for my large library (approx 34TB at this point) my initial scan is under 3-4mins

 

so in my head.. 3-4mins of my clients/family not being able to watch something in the span of (completely controllable be me) 2 weeks.. is OK...

 

can you elaborate on whats driving the need for your enviroment so we can possibly work to improve the situation in other ways or with other workarounds?

 

-MWS

Even though i agree with you :) - This is not the time or place for this discussion, different people different needs!

 

 

then content will not be available to client apps until the library has been scanned manually.

 

 

This has me really confused. Does it work in a similair fashion if you just restart the server ?

Link to comment
Share on other sites

Happy2Play

The difference I see with "scan at start" disabled is when I launch the dashboard it takes about 5 seconds to populate.  Dashboard initially only shows the word "Media Folders".

 

 

 

 

Link to comment
Share on other sites

CBers

@@gfgf - do you have a Photos folder in MB3?

 

I had one and any scan took 2-3 minutes, but since removing it from Mb3, the library scan is down to 30-40 seconds.

 

I aassume the extended time is due to ~25000 photos across 400 folders.

 

NNot saying there's an issue, just an experience.

 

 

.

Edited by CBers
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...