RECENTLY ADDED and RANDOM album views corrupted?

Need help? Post your questions here.

Moderator: moderators

RECENTLY ADDED and RANDOM album views corrupted?

Postby ensemra » Thu Jul 02, 2020 2:12 pm

I've been using Subsonic for years, and it has been awesome. Lately I've encountered a strange issue, and I'm hoping someone can provide some insight into what may be occurring.
Thanks in advance!

<-------------------------Subsonic Help Request---------------------->
Problem Description: When viewing the RECENTLY ADDED or RANDOM album views, I no longer see the most-recently added albums, or random albums. The views start alphabetically for the most part.
Troubleshooting Steps: Rebooted the server. Reinstalled the Subsonic server software. Updated Java. Attempted to clean up the database, and received an error (below)
Playback Application and version: General Subsonic web interface on LAN, DSub on Android devices.
Subsonic Version: 6.1.6 (build 0cfa60) – November 10, 2019
Server Version: jetty-6.1.x, java 1.8.0_152, HSQLDB, Windows Server 2012 R2 (120.9 MB / 145.0 MB)
Hardware Platform: Server: Windows Server Essentials 2012 R2, Web interface: Chrome or Edge, Mobile app: Dsub for Android
Java Memory Limit: Memory used? 122 MB
Problem Filename: N/A
Output from ffmpeg -i: N/A
Last ten log file lines:
Code: Select all
[7/1/20 3:10:44 AM CDT]   INFO   MediaScannerService   Starting to scan media library.
[7/1/20 3:10:44 AM CDT]   INFO   MediaScannerService   Scanned media library with 250 entries.
[7/1/20 3:10:45 AM CDT]   INFO   MediaScannerService   Scanned media library with 500 entries.
[7/1/20 3:10:45 AM CDT]   INFO   MediaScannerService   Scanned media library with 750 entries.
[7/1/20 3:10:45 AM CDT]   ERROR   MediaScannerService   Failed to scan media library.
[7/1/20 3:10:46 AM CDT]   INFO   PlaylistService   Starting playlist import.
[7/1/20 3:10:46 AM CDT]   INFO   PlaylistService   Completed playlist import.
[7/1/20 12:09:29 PM CDT]   INFO   PodcastService   Starting scheduled Podcast refresh.
[7/1/20 12:09:29 PM CDT]   INFO   PodcastService   Completed scheduled Podcast refresh.
[7/1/20 12:09:30 PM CDT]   WARN   PodcastService   Failed to get/parse RSS file for Podcast channel http://filmsack.com/feed/
[7/1/20 12:09:32 PM CDT]   INFO   PodcastService   Created Podcast episode Short Stuff: The Science of Funny Words
[7/1/20 12:09:32 PM CDT]   INFO   PodcastService   Created Podcast episode Bruxism: Grinding Your Teeth Is the Pits
[7/1/20 12:09:32 PM CDT]   INFO   PodcastService   Created Podcast episode SYSK Selects: Juggling: What the Heck
[7/1/20 12:09:32 PM CDT]   INFO   PodcastService   Created Podcast episode Matcha: That Ain't Just Tea
[7/1/20 12:09:32 PM CDT]   INFO   PodcastService   Created Podcast episode Short Stuff: Nouns of assemblage... assemble!
[7/1/20 12:09:33 PM CDT]   WARN   PodcastService   Failed to get/parse RSS file for Podcast channel http://www.howstuffworks.com/podcasts/stuff-you-should-know.rss
[7/1/20 7:06:17 PM CDT]   WARN   RESTFilter   Error in REST API: EofException
[7/1/20 7:06:17 PM CDT]   ERROR   JAXBWriter   Failed to marshal JAXB
[7/1/20 7:06:17 PM CDT]   ERROR   RESTFilter   Failed to write error response.
[7/2/20 3:10:48 AM CDT]   INFO   MediaScannerService   Starting to scan media library.
[7/2/20 3:10:48 AM CDT]   INFO   MediaScannerService   Scanned media library with 250 entries.
[7/2/20 3:10:49 AM CDT]   INFO   MediaScannerService   Scanned media library with 500 entries.
[7/2/20 3:10:50 AM CDT]   INFO   MediaScannerService   Scanned media library with 750 entries.
[7/2/20 3:10:50 AM CDT]   ERROR   MediaScannerService   Failed to scan media library.
[7/2/20 3:10:50 AM CDT]   INFO   PlaylistService   Starting playlist import.
[7/2/20 3:10:50 AM CDT]   INFO   PlaylistService   Completed playlist import.
[7/2/20 8:10:12 AM CDT]   INFO   MediaScannerService   Automatic media library scanning scheduled to run every 1 day(s), starting at Fri Jul 03 03:00:00 CDT 2020

Additional Info: As a troubleshooting attempt, I tried the option to Clean-up database in the Settings menu and received the following error:
Code: Select all
Exception   org.springframework.dao.TransientDataAccessResourceException
Message   PreparedStatementCallback; SQL [select min(id) from media_file where not present]; S1000 General error java.util.NoSuchElementException in statement [select min(id) from media_file where not present]; nested exception is java.sql.SQLException: S1000 General error java.util.NoSuchElementException in statement [select min(id) from media_file where not present]
Java version   Oracle Corporation 1.8.0_152
Operating system   Windows Server 2012 R2 6.3
Server   jetty-6.1.x
Memory   Used 124 of 145 MB
Stack trace   org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [select min(id) from media_file where not present]; S1000 General error java.util.NoSuchElementException in statement [select min(id) from media_file where not present]; nested exception is java.sql.SQLException: S1000 General error java.util.NoSuchElementException in statement [select min(id) from media_file where not present]
   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.query(JdbcTemplate.java:641)
   at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)
   at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)
   at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710)
   at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:768)
   at net.sourceforge.subsonic.dao.AbstractDao.queryForInt(AbstractDao.java:119)
   at net.sourceforge.subsonic.dao.MediaFileDao.expunge(MediaFileDao.java:546)
   at net.sourceforge.subsonic.controller.MusicFolderSettingsController.expunge(MusicFolderSettingsController.java:57)
   at net.sourceforge.subsonic.controller.MusicFolderSettingsController.formBackingObject(MusicFolderSettingsController.java:40)
   at org.springframework.web.servlet.mvc.AbstractFormController.getErrorsForNewForm(AbstractFormController.java:358)
   at org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:338)
   at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:278)
   at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
   at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
   at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
   at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
   at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:25)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:36)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:41)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:313)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
   at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.sql.SQLException: S1000 General error java.util.NoSuchElementException in statement [select min(id) from media_file where not present]
   at org.hsqldb.jdbc.Util.throwError(Unknown Source)
   at org.hsqldb.jdbc.jdbcPreparedStatement.executeQuery(Unknown Source)
   at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
   at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
   ... 65 more

<-------------------------Subsonic Help Request---------------------->
ensemra
 
Posts: 2
Joined: Tue Jun 30, 2020 9:26 pm

Re: RECENTLY ADDED and RANDOM album views corrupted?

Postby 3Dscrewer » Sat Jul 04, 2020 10:46 am

Sounds like a bad Bock at your HDD, or other read error.
For a test i would rename the db folder, do a new scan and see what happens.
Also a damaged music track may cause that error, but I have had a couple of corrupted mp3 header tracks without problems.

Just in case, your playlists are also saved in dbase. It is a good idea to export them first.

Scanning every day the database is stressing the HDD without need, if you don't add every day new tracks.
3Dscrewer
 
Posts: 195
Joined: Tue Feb 13, 2018 1:11 pm

Re: RECENTLY ADDED and RANDOM album views corrupted?

Postby ensemra » Mon Jul 06, 2020 9:36 pm

3Dscrewer wrote:Sounds like a bad Bock at your HDD, or other read error.
For a test i would rename the db folder, do a new scan and see what happens.
Also a damaged music track may cause that error, but I have had a couple of corrupted mp3 header tracks without problems.

Just in case, your playlists are also saved in dbase. It is a good idea to export them first.

Scanning every day the database is stressing the HDD without need, if you don't add every day new tracks.


Thanks for the advice. Recreating the db fixed the issue, so I just exported the few playlists from my users, recreated the users on the new db, and imported their playlists. Everything is working as expected now (and the db footprint is much smaller on the drive).
I also turned off automatic library scanning as recommended. There's no reason I can't just run it as needed when I add albums.

Thanks!
ensemra
 
Posts: 2
Joined: Tue Jun 30, 2020 9:26 pm

Re: RECENTLY ADDED and RANDOM album views corrupted?

Postby 3Dscrewer » Tue Jul 07, 2020 2:53 pm

Thanks for the response ...
3Dscrewer
 
Posts: 195
Joined: Tue Feb 13, 2018 1:11 pm

Re: RECENTLY ADDED and RANDOM album views corrupted?

Postby 3Dscrewer » Sat Aug 01, 2020 8:55 am

Update:
for a clean database

Export your playlists
save, backup /db/subsonic.script because settings and user
save, backup /db/subsonic.properties
They are also found in db.backup but might be older.

delete all files in /db/

copy *.script and*.properties back to /db/ and rescan
3Dscrewer
 
Posts: 195
Joined: Tue Feb 13, 2018 1:11 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 19 guests