Scan fail

Need help? Post your questions here.

Moderator: moderators

Scan fail

Postby RadioBA » Tue Apr 25, 2023 3:11 pm

Very long time user here, but almost entirely incapable of any technical tasks.

I've been having issues doing searches lately and then noticed that when I went to set up a random playlist (both through Subsonic itself on my PC or DSub on my Android phone) it was only pulling tracks from a single genre, even though I set no such specific parameter.

After trying a few things I think I've determined that the system isn't reading the whole collection (which probably numbers between 250,000-300,000 tracks). I've run several scans and the scan craps out at less than half the collection with the log reading "ERROR MediaScannerService Failed to scan media library."

Looking for advice on how to address this problem.

Thanks in advance!!!

ba
RadioBA
 
Posts: 4
Joined: Tue Apr 25, 2023 3:02 pm

Re: Scan fail

Postby Exrace » Tue Apr 25, 2023 8:00 pm

Is that the only error posted? Post the section of the log with this error and a few lines lines before and after.
Exrace
 
Posts: 218
Joined: Thu Nov 11, 2010 5:02 am

Re: Scan fail

Postby Exrace » Tue Apr 25, 2023 8:17 pm

Might be related to shuffle play. You don't say what you are using to create this playlist.
Maybe a function of the client you are using?
Subsonic doesn't have any dynamic playlist creation except shuffle play that I am aware of.
Could also be a permissions thing, depending on the user you are signed in and if that user has access to the libraries you have created.
Exrace
 
Posts: 218
Joined: Thu Nov 11, 2010 5:02 am

Re: Scan fail

Postby RadioBA » Tue Apr 25, 2023 10:00 pm

Yes, that's the only code it throws. This is through the Scan function on the native subsonic interface on my PC. It stops at 142250 every time now and I know I have over 250,000 files in the collection.
RadioBA
 
Posts: 4
Joined: Tue Apr 25, 2023 3:02 pm

Re: Scan fail

Postby G8DHE » Wed Apr 26, 2023 9:03 am

Could be a damaged file which the OS/program can't read and crashes out on ?
Geoff G8DHE
Version 6.0 Beta 2
G8DHE
 
Posts: 139
Joined: Sun Nov 04, 2012 4:56 pm

Re: Scan fail

Postby RadioBA » Thu Apr 27, 2023 2:58 pm

That could be the problem. How do I go about finding the damaged file? The log doesn't say anything in any way. It just stops and says scan failed.
RadioBA
 
Posts: 4
Joined: Tue Apr 25, 2023 3:02 pm

Re: Scan fail

Postby G8DHE » Fri Apr 28, 2023 7:55 am

You say it scans 142250 files ?
Why not save the current db, then get it to scan again and you can see which files it has read, you may then be able to predict the next file/folder it would have read.
Geoff G8DHE
Version 6.0 Beta 2
G8DHE
 
Posts: 139
Joined: Sun Nov 04, 2012 4:56 pm

Re: Scan fail

Postby RadioBA » Wed May 17, 2023 3:40 am

I just did a scan to see if anything changed after a few weeks. No luck. I've added more files so it stops at a slightly higher count than before but essentially the same place, wherever that is. I went to the full log file and retrieved the following info. If this makes sense to anyone, please let me know. To me it's borderline gibberish. CHEERS!

[2023-05-16 23:21:35,863] INFO MediaScannerService - Scanned media library with 143750 entries.
[2023-05-16 23:21:36,172] ERROR MediaScannerService - Failed to scan media library.
org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [update media_file set present=?, last_scanned=? where path=?]; S1000 General error java.lang.NullPointerException in statement [update media_file set present=?, last_scanned=? where path=?]; nested exception is java.sql.SQLException: S1000 General error java.lang.NullPointerException in statement [update media_file set present=?, last_scanned=? where path=?]
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:106)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:858)
at net.sourceforge.subsonic.dao.AbstractDao.update(AbstractDao.java:68)
at net.sourceforge.subsonic.dao.MediaFileDao.markPresent(MediaFileDao.java:530)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:234)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:223)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:223)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:223)
at net.sourceforge.subsonic.service.MediaScannerService.doScanLibrary(MediaScannerService.java:161)
at net.sourceforge.subsonic.service.MediaScannerService.access$000(MediaScannerService.java:31)
at net.sourceforge.subsonic.service.MediaScannerService$2.run(MediaScannerService.java:130)
Caused by: java.sql.SQLException: S1000 General error java.lang.NullPointerException in statement [update media_file set present=?, last_scanned=? where path=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:798)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
... 12 more

[2023-05-16 23:21:37,422] INFO PlaylistService - Starting playlist import.
[2023-05-16 23:21:37,422] INFO PlaylistService - Completed playlist import.
RadioBA
 
Posts: 4
Joined: Tue Apr 25, 2023 3:02 pm

Re: Scan fail

Postby Exrace » Thu Jun 29, 2023 12:36 am

Possibly you have a bad or missing path in one of your libraries.
Exrace
 
Posts: 218
Joined: Thu Nov 11, 2010 5:02 am


Return to Help

Who is online

Users browsing this forum: No registered users and 8 guests