PDA

View Full Version : Media scan terminated unexpectedly



Torben Abildgaard
2015-08-15, 23:51
Media scan terminated unexpectedly - Scanner log says:
"[15-08-16 08:26:27.8775] Audio::Scan::scan (75) Warning: Error: Unable to read at least 631 bytes from file."

I have seen the problem earlier, but it appeared again some days ago. A new album did not appear and I went... "clear library and rescan everything". Shouldn't have done that :-)

How do I find the bad file - if it is bad and it is not some other thing I really should be looking for?

System: Windows 10 (danish version), 64 bit, 8gb ram.
Logitech Media Server Version: 7.9.0 - 1439462737 @ Fri Aug 14 04:05:16 CUT 2015, Perl Version: 5.14.1 - MSWin32-x86-multi-thread, Audio::Scan: 0.95, Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
Itunes uninstalled and unchecked. All folders from itunes killed.

All music is mp3 placed in folder under D:\documents\music. The folder containes some 12.211 songs in 1.423 subfolders. Mediascan only finds 205 songs before it terminates unexpectedly.

Regards/Torben

Mnyb
2015-08-16, 00:56
well try get get hold on both the log files , not just follow the links and copy paste ,but these are actuall text files . btw LMS7.9 has an option to download the complete logs . Attach them here if they are to big use zip .

Then try the clear cache option that exist in the windows control panel for LMS this deletes the database files completely .
Then try a new complete scan .

Did you reinstall on LMS on windows 10 btw

Torben Abildgaard
2015-08-16, 01:23
well try get get hold on both the log files , not just follow the links and copy paste ,but these are actuall text files . btw LMS7.9 has an option to download the complete logs . Attach them here if they are to big use zip .

Then try the clear cache option that exist in the windows control panel for LMS this deletes the database files completely .
Then try a new complete scan .

Did you reinstall on LMS on windows 10 btw

Yes, I have followed instructions (http://support.logitech.com/article/8377) on cleaning cache, and yes, I did reinstall LMS on Windows 10. Logs uploaded. Regards.

Torben Abildgaard
2015-08-16, 23:57
Did a media scan on the same library (copied to an external harddrive) on another computer with an older system succeeded with no errors. I conclude, that nothing is wrong with the files in the library. That something is wrong in the setup on the new system. That's how far I can take it - blessed are the meek...

Logitech Media Server Version: 7.7.5 - 1416570306 @ Thu Nov 27 07:38:09 CUT 2014
Styresystem: Windows 7 - DA - cp1252
Platformarkitektur: 8664
Perl-version: 5.14.1 - MSWin32-x86-multi-thread
Databaseversion: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)

Songs found: 13.200.

Uploading log files from scan on old system.

DJanGo
2015-08-17, 01:32
If you would read your 1.st logfile -> the databasefile is malformed.

Stop Server
Find and delete the db files
Start Server again

mherger
2015-08-17, 01:53
> If you would read your 1.st logfile -> the databasefile is malformed.

....except that the line you're referring to dates back from December
2014. The most recent messages are different. Please stick to your own
high standards and don't post unless you really have to add something to
a discussion.

Torben - please make sure you run the absolutely latest build of LMS.
Some of the messages I'm seeing I thought I had gotten rid of a few days
ago.

--

Michael

Torben Abildgaard
2015-08-17, 01:59
If you would read your 1.st logfile -> the databasefile is malformed.

Stop Server
Find and delete the db files
Start Server again

I did. Same result alas.

Torben Abildgaard
2015-08-17, 02:03
> Please make sure you run the absolutely latest build of LMS.
Some of the messages I'm seeing I thought I had gotten rid of a few days
ago.

Running version 7.9.0 - 1439462737. Don't see a newer one!?

Torben Abildgaard
2015-08-24, 03:10
Running version 7.9.0 - 1439462737. Don't see a newer one!?

Running version: Logitech Media Server Version: 7.9.0 - 1440333638 @ Mon Aug 24 04:05:24 CUT 2015

mherger
2015-08-24, 03:56
> Torben Abildgaard wrote:
>> Running version 7.9.0 - 1439462737. Don't see a newer one!?
>
> Running version: Logitech Media Server Version: 7.9.0 - 1440333638 @ Mon
> Aug 24 04:05:24 CUT 2015

Ok, I think the error I thought I had fixed might actually be caused by
some race condition. But it's a red herring. It's not what is causing
the scan to abort.

Please re-run a scan with all scan.* logging options set to debug, then
upload the scanner.log again.

--

Michael

Torben Abildgaard
2015-08-24, 23:42
>Ok, I think the error I thought I had fixed might actually be caused by
some race condition. But it's a red herring. It's not what is causing
the scan to abort.

Please re-run a scan with all scan.* logging options set to debug, then
upload the scanner.log again.

Here we go again - with same result. Not sure if I debugged correctly, so I have tried to illustrate my settings.

Red herring... should I be drinking schnapps or what does that mean?

mherger
2015-08-25, 00:13
> Here we go again - with same result. Not sure if I debugged correctly,
> so I have tried to illustrate my settings.

Ok, the famous last words:

[15-08-25 08:33:45.2650] Slim::Utils::Scanner::Local::new (849) Handling
new audio track
file:///D:/DOKUMENT/Musik/Aretha%20Franklin/Queen%20Of%20Soul_%20The%20Atlantic%20Recordings%2 0[/1-01%20I%20Never%20Loved%20A%20Man%20(The%20Way%20I% 202.mp3
[15-08-25 08:33:45.2672] Slim::Utils::Scanner::Local::new (849) Handling
new audio track
file:///D:/DOKUMENT/Musik/Aretha%20Franklin/Queen%20Of%20Soul_%20The%20Atlantic%20Recordings%2 0[/1-01%20I%20Never%20Loved%20A%20Man%20(The%20Way%20I. mp3
[15-08-25 08:33:45.2676] Audio::Scan::scan (75) Warning: Error: Unable
to read at least 631 bytes from file.

Please check the "D:\DOKUMENT\Musik\Aretha Franklin\Queen Of Soul_ The
Atlantic Recordings [" folder. Quite odd a name IMHO. Also there seem to
be a lot of duplicates of the same song in that folder, eg. above two:

D:\DOKUMENT\Musik\Aretha Franklin\Queen Of Soul_ The Atlantic Recordings
[\1-01 I Never Loved A Man (The Way I 2.mp3
D:\DOKUMENT\Musik\Aretha Franklin\Queen Of Soul_ The Atlantic Recordings
[\1-01 I Never Loved A Man (The Way I.mp3

Lots of truncated file names etc. Please make sure this is all right. Or
feel free to send me a copy of these two files to michael št slimdevices
dott com.

> Red herring... should I be drinking schnapps or what does that mean?

I'd need a good schnaps to digest any kind of herring, I guess. But the
red herring is different: "A red herring is something that misleads or
distracts from a relevant or important issue."
(https://en.wikipedia.org/wiki/Red_herring)

--

Michael

Torben Abildgaard
2015-08-25, 00:34
> Here we go again - with same result. Not sure if I debugged correctly,
> so I have tried to illustrate my settings.

Ok, the famous last words:

[15-08-25 08:33:45.2650] Slim::Utils::Scanner::Local::new (849) Handling
new audio track
file:///D:/DOKUMENT/Musik/Aretha%20Franklin/Queen%20Of%20Soul_%20The%20Atlantic%20Recordings%2 0[/1-01%20I%20Never%20Loved%20A%20Man%20(The%20Way%20I% 202.mp3
[15-08-25 08:33:45.2672] Slim::Utils::Scanner::Local::new (849) Handling
new audio track
file:///D:/DOKUMENT/Musik/Aretha%20Franklin/Queen%20Of%20Soul_%20The%20Atlantic%20Recordings%2 0[/1-01%20I%20Never%20Loved%20A%20Man%20(The%20Way%20I. mp3
[15-08-25 08:33:45.2676] Audio::Scan::scan (75) Warning: Error: Unable
to read at least 631 bytes from file.

Please check the "D:\DOKUMENT\Musik\Aretha Franklin\Queen Of Soul_ The
Atlantic Recordings [" folder. Quite odd a name IMHO. Also there seem to
be a lot of duplicates of the same song in that folder, eg. above two:

D:\DOKUMENT\Musik\Aretha Franklin\Queen Of Soul_ The Atlantic Recordings
[\1-01 I Never Loved A Man (The Way I 2.mp3
D:\DOKUMENT\Musik\Aretha Franklin\Queen Of Soul_ The Atlantic Recordings
[\1-01 I Never Loved A Man (The Way I.mp3

Lots of truncated file names etc. Please make sure this is all right. Or
feel free to send me a copy of these two files to michael št slimdevices
dott com.
[color=blue]

Cool. Gives me a hint on how to examine the bad files. Scan, open log, look for 'unable to read' and remove said files. Scan again. Thank You. Is there a wiki-manual to this operation, that I should have seen?

mherger
2015-08-25, 01:04
> Cool. Gives me a hint on how to examine the bad files. Scan, open log,
> look for 'unable to read' and remove said files. Scan again. Thank You.

Actually I simply scrolled down to the bottom of the file, as the scan
ends after that message.

> Is there a wiki-manual to this operation, that I should have seen?

I don't know, tbh. Plus the wiki host currently is in a bit of flaky
state... But I'm working on it, too

--

Michael

Torben Abildgaard
2015-08-25, 08:31
> Cool. Gives me a hint on how to examine the bad files. Scan, open log,
> look for 'unable to read' and remove said files. Scan again. Thank You.

Actually I simply scrolled down to the bottom of the file, as the scan
ends after that message.

> Is there a wiki-manual to this operation, that I should have seen?

I don't know, tbh. Plus the wiki host currently is in a bit of flaky
state... But I'm working on it, too

--

Michael
Still funny though that mediascan in excactly the same library on a different setup did not experience any problems.

Lyster
2016-03-11, 00:05
Had a disk crash and had to re-populate my music files from backups. I also re-installed LMS 7.9.0. Trying to scan all those files back into the database, and repeatedly get (at 00:02:28 time) media scan terminated unexpectedly. Server log (zipped) and scanner log attached.

mherger
2016-03-11, 01:45
> Had a disk crash and had to re-populate my music files from backups. I
> also re-installed LMS 7.9.0. Trying to scan all those files back into
> the database, and repeatedly get (at 00:02:28 time) media scan
> terminated unexpectedly. Server log (zipped) and scanner log attached.

You have a plugin called PhilsLibraries or similar which tries to access
a database table which does not exist (track_statistics). Most likely
it's a table created by yet another 3rd party plugin (one of Erland's?).

That said it probably shouldn't crash the scanner. I'll look into making
the scanner more robust against such issues. But for the time being you
should either disable that plugin, or make sure the table it's using is
being created somehow.

--

Michael

mherger
2016-03-11, 01:56
Wow... only now I checked the server.log, too. Did you ever check it
yourself? It's full of warnings and errors by various 3rd party plugins:

- TitleSwitcher requires MusicInfoSCR to be installed - which it
complains wasn't.

- RemovePlayedSongs uses calls which have been deprecated a long time ago

- PhilsLibraries expects track_statistics table, but crashes lack there of

- TrackStat is called after PhilsLibraries, but fails to create the
table, because PhilsLibraries crashing the scanner left the database
locked...

- SugarCube somehow fails DB requests, lack of the same table

- SongInfo uses a lot of uninitialized variables

So... while some of them are simply annoying and adding lots of noise to
the log file, there's a problem with a bunch of dependencies. At least
two plugins rely on TrackStat, one on MusicInfoSCR.

I'd suggest you disable _all_ third party plugins, shut down LMS, delete
the cache folder. Then you restart by adding only what you really need.
Start with TrackStat. Let it do its magic, run a full wipe & rescan if
needed. Let things settle. Then add PhilsLibraries, SugarCube etc. one
after the other, each time letting LMS run a scan if needed.

This will not get rid of SongInfo and RemovePlayedSongs' noise, but
should render LMS working again.

--

Michael

Lyster
2016-03-11, 15:03
I disabled all plugins (Third Party or not), and deleted the cache folder. I'm re-scanning now, hoping that everything scans properly. If so, I'll add back the plugins one at a time (rather than selecting everything that sounded interesting all at once).

Thanks for your help. I'll be back if things don't go well.