Page 1 of 1

Scan fail

PostPosted: Tue Apr 25, 2023 3:11 pm
by RadioBA
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

Re: Scan fail

PostPosted: Tue Apr 25, 2023 8:00 pm
by Exrace
Is that the only error posted? Post the section of the log with this error and a few lines lines before and after.

Re: Scan fail

PostPosted: Tue Apr 25, 2023 8:17 pm
by Exrace
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.

Re: Scan fail

PostPosted: Tue Apr 25, 2023 10:00 pm
by RadioBA
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.

Re: Scan fail

PostPosted: Wed Apr 26, 2023 9:03 am
by G8DHE
Could be a damaged file which the OS/program can't read and crashes out on ?

Re: Scan fail

PostPosted: Thu Apr 27, 2023 2:58 pm
by RadioBA
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.

Re: Scan fail

PostPosted: Fri Apr 28, 2023 7:55 am
by G8DHE
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.

Re: Scan fail

PostPosted: Wed May 17, 2023 3:40 am
by RadioBA
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.

Re: Scan fail

PostPosted: Thu Jun 29, 2023 12:36 am
by Exrace
Possibly you have a bad or missing path in one of your libraries.