problem with REST calls and podcasts

Need help? Post your questions here.

Moderator: moderators

problem with REST calls and podcasts

Postby Jägs » Mon Aug 21, 2017 9:44 pm

I've been working with the developer of play::Sub on an issue I am having accessing podcasts. Hopefully someone here can shed some light on what is happening.

The developer suggested I run the following REST call:

https://MYSERVER/music/rest/getPodcasts ... ORD&u=USER

This yields the following error:

Code: Select all
{
   "subsonic-response" : {
      "status" : "failed",
      "version" : "1.15.0",
      "error" : {
         "code" : 0,
         "message" : "NullPointerException"
      }
   }
}


Here's the log from Subsonic:

Code: Select all
[2017-08-21 14:19:43,444] INFO HsqlDaoHelper - Checking database schema.
[2017-08-21 14:19:46,948] INFO HsqlDaoHelper - Done checking database schema.
[2017-08-21 14:19:47,212] INFO SettingsService - Java: 1.8.0_131, OS: Linux
[2017-08-21 14:19:47,236] INFO VersionService - Resolved local Subsonic version to: 6.1.1
[2017-08-21 14:19:48,773] INFO MediaScannerService - Automatic media library scanning scheduled to run every 1 day(s), starting at Tue Aug 22 03:00:00 CDT 2017
[2017-08-21 14:19:48,963] INFO UPnPService - Starting UPnP service...
[2017-08-21 14:19:50,030] INFO UPnPService - Enabling UPnP/DLNA media server
[2017-08-21 14:19:50,031] INFO UPnPService - Starting UPnP service - Done!
[2017-08-21 14:19:52,050] INFO PodcastService - Automatic Podcast update scheduled to run every 24 hour(s), starting at Mon Aug 21 14:24:52 CDT 2017
[2017-08-21 14:19:58,976] WARN NetworkService - No UPnP router found.
[2017-08-21 14:20:08,033] INFO BootstrapVerificationFilter - Servlet container: jetty-6.1.x
[2017-08-21 14:20:26,345] WARN RESTFilter - Error in REST API: NullPointerException
java.lang.NullPointerException
                at net.sourceforge.subsonic.service.MediaFileService.getParentOf(MediaFileService.java:149)
                at net.sourceforge.subsonic.controller.RESTController.createJaxbChild(RESTController.java:1384)
                at net.sourceforge.subsonic.controller.RESTController.createJaxbPodcastEpisode(RESTController.java:1768)
                at net.sourceforge.subsonic.controller.RESTController.getPodcasts(RESTController.java:1734)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:473)
                at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:410)
                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.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
                at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
                at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
                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 net.sourceforge.subsonic.security.RESTRequestParameterProcessingFilter.doFilter(RESTRequestParameterProcessingFilter.java:95)
                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.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.RESTFilter.doFilter(RESTFilter.java:42)
                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)


From the Subsonic interface, I can see and access the podcasts without problem. That said, I've had some issues with podcasts not loading in the past, so I've removed them and added them back in, from time to time, which seems to resolve the issue, but I'm wondering if I've got a corrupted database.

Any ideas as to what is going on? Perhaps I need to do a reinstall of Subsonic? If so, can someone point me to a process that will let me do so without having to re-download all of the podcasts? I'm not so concerned about recreating the links, as I only have about a dozen, and I have all of my music playlists backed up for easy recreation.
Jägs
 
Posts: 109
Joined: Wed Apr 06, 2011 9:52 pm

Re: problem with REST calls and podcasts

Postby Jägs » Wed Aug 30, 2017 2:13 pm

So, I did a completely clean install of Subsonic, let it rebuild the DBs, recreated the links to the Podcasts, but left the podcast files themselves in place, and all was working well... until this morning.

It looks like Subsonic downloaded everything again, just appending a 0 to the new downloads:

Code: Select all
-rw-r--r-- 1 me me  50826794 Aug 29 21:02 339508160-startalk-cosmic-queries-tv-sci-fi-with-bill-nye0.mp3
-rw-r--r-- 1 me me  50826794 Aug 26 10:56 339508160-startalk-cosmic-queries-tv-sci-fi-with-bill-nye.mp3


Which is fine, I can just delete the duplicates, but now I'm getting a error in Subsonic when I try to access the Podcasts from the top menu of the web interface:

Code: Select all
Error
Subsonic encountered an internal error. You can report this error in the Subsonic Forum. Please include the information below.

Exception   java.lang.SecurityException
Message   Access denied to file /media/music/podcasts/StarTalk Radio/339508160-startalk-cosmic-queries-tv-sci-fi-with-bill-nye0.mp3
Java version   Oracle Corporation 1.8.0_131
Operating system   Linux 4.4.0-89-generic
Server   jetty-6.1.x
Memory   Used 87 of 246 MB
Stack trace   java.lang.SecurityException: Access denied to file /media/music/podcasts/StarTalk Radio/339508160-startalk-cosmic-queries-tv-sci-fi-with-bill-nye0.mp3


As you can see above, the file is no different permission-wise from the previous file. It looks like others have had this problem in the past, but I could not find a clear resolution. I did find that someone reported a similar issue when moving from Subsonic to Libresonic:

https://github.com/Libresonic/libresonic/issues/454

Another interesting thing is that I can access the podcasts themselves via play:Sub on my iPhone.

Any suggestions? I'm reticent to delete the podcasts, as some shows do not have a complete archive accessible, so I would lose episodes in the process.
Jägs
 
Posts: 109
Joined: Wed Apr 06, 2011 9:52 pm

Re: problem with REST calls and podcasts

Postby Jägs » Fri Sep 01, 2017 10:37 pm

Well, I grew impatient and deleted my entire podcast collection and started from scratch. Problem solved with brute force, I guess.
Jägs
 
Posts: 109
Joined: Wed Apr 06, 2011 9:52 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 29 guests