Page 1 of 1

"Access Denied to File" Error in Android App

PostPosted: Fri Mar 11, 2011 10:08 pm
by mjordan
Hi all!

I've been using Subsonic Server on Mac OS X with the Android app since last fall, and it's been working great. I love it!

Recently I switched over to Windows 7 and I'm having trouble accessing music stored on my Windows box via the Subsonic Android app.

From the Android app, I can log in and go to the Music Library tab, and it will list all the artists. But if I tap on one of the artists, it gives me a pop-up that says "Access denied to file" and then the path to the artist's directory on my Windows box. (See screenshots)

However: In the Android app, if instead of using Music Library, if I go over to Search and search for the artist, I can tap on the artist from the search results and then things are fine: it lists all the albums and I can listen to them.

Everything works fine if I log in to the web interface from any computer anywhere. This seems to be a problem between the Android app and the Subsonic Server.

Playback Application and version: Subsonic for Android v. 2.6
Subsonic Version: 4.4 (build 2172) – February 6, 2011
Server Version: jetty-6.1.x, java 1.6.0_24, Windows 7 (29.6 MB / 50.3 MB)
Hardware Platform: Windows 7 Ultimate 64-bit
Java Memory Limit: 100 MB

Relevant Screen Shots:
Artists are listed properly
Tapping on "The Books" shows this error

Relevant Log File Lines:
This is the entire huge error that is printed in the log when I encounter this error for opening the artist "The Books"
Code: Select all
[2011-03-11 15:40:55,135] WARN RESTController - Error in REST API.
java.lang.SecurityException: Access denied to file \mnt\MediaLibrary\Music\The Books
   at net.sourceforge.subsonic.service.MusicFileService.getMusicFile(MusicFileService.java:68)
   at net.sourceforge.subsonic.service.MusicFileService.getMusicFile(MusicFileService.java:85)
   at net.sourceforge.subsonic.controller.RESTController.getMusicDirectory(RESTController.java:212)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   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.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:122)
   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:43)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
   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)


In this example of trying to get an album listing for the artist "The Books," My directory structure is like this:

D:\Music\The Books
D:\Music\The Books\Album Name 1
D:\Music\The Books\Album Name 2

D:'s volume label is MediaLibrary.

Note that I am unable to access any album listings, not just those for The Books. I'm just using The Books as an example.

Thanks very much for your help. Please let me know if there's any other information I can provide.

PostPosted: Sat Mar 12, 2011 5:13 am
by GJ51
You first need to determine if it's the phone or the server. Does your phone work on the demo site?

PostPosted: Sat Mar 12, 2011 5:29 am
by mjordan
GJ51 wrote:Does your phone work on the demo site?


Yes, it does.

Also, I'm dual-booting Linux and Windows, and with Subsonic Server running under Linux, accessing the same music library, everything is fine there too. It is only under Windows that I encounter this problem.

PostPosted: Sat Mar 12, 2011 5:22 pm
by GJ51
Setting up on a dual boot system can present it's own set of issues. Does the Windows SS install let you access the music if you start SS locally on the server? Do you use seperate internal ip addresses and port numbers for each instance of SS? I can see a lot of potential glitches that would need to be figured out on a dual boot system. Why use dual boot? I have two servers running on one box, but I use Hyper-V to run one instance on a virtual server. That way I have continuous access to both at the same time or even simultaneously if you prefer. :wink:

PostPosted: Sat Mar 12, 2011 8:36 pm
by mjordan
GJ51 wrote:Does the Windows SS install let you access the music if you start SS locally on the server?

Yes. I can log in via my browser and everything is functional. In fact, I can log in via browser from any computer anywhere (outside of my LAN, etc), and everything works.


GJ51 wrote:Do you use seperate internal ip addresses and port numbers for each instance of SS? I can see a lot of potential glitches that would need to be figured out on a dual boot system.

I have experimented both ways with IPs and ports. Linux always works, no matter the internal IP or port I choose. Windows never does.

But also, I should mention that I only yesterday installed the Linux Subsonic Server app to see if it would work even though Windows wouldn't. I have been having this problem on Windows for weeks before I ever installed Subsonic on Linux. So I really don't think there's any weird conflict going on there.


GJ51 wrote:Why use dual boot?

Because the software I use does not survive within a VM. ;) As a filmmaker, I need AVID on Windows, which is so finicky that it needs its own Windows user account to run properly. Then on Linux I need Lustre, which behaves the same way.

But that's neither here nor there. ;)

PostPosted: Sun Mar 13, 2011 7:41 am
by GJ51
GJ51 wrote:
Does the Windows SS install let you access the music if you start SS locally on the server?

Yes. I can log in via my browser and everything is functional. In fact, I can log in via browser from any computer anywhere (outside of my LAN, etc), and everything works.


GJ51 wrote:
Do you use seperate internal ip addresses and port numbers for each instance of SS? I can see a lot of potential glitches that would need to be figured out on a dual boot system.

I have experimented both ways with IPs and ports. Linux always works, no matter the internal IP or port I choose. Windows never does.


I'm sorry, I'm sure it's me ... can you explain how your above answers can be consistent. Does, or has, the Windows install ever worked? Under what circumstances?

PostPosted: Sun Mar 13, 2011 7:55 am
by mjordan
GJ51 wrote:I'm sorry, I'm sure it's me ... can you explain how your above answers can be consistent. Does, or has, the Windows install ever worked? Under what circumstances?


The issue I am experiencing between Subsonic Android and Subsonic Server Windows has never worked.

PostPosted: Sun Mar 13, 2011 3:35 pm
by GJ51
Uninstall SS from the phone, reboot the phone, then reinstall the latest SS from the market.

PostPosted: Mon Mar 14, 2011 3:31 pm
by mjordan
GJ51 suggested I uninstall and reinstall Java. This seems to have fixed the problem with my server. Thanks GJ! Hopefully this thread helps someone else some day.