Sonos cannot authenticate to Madsonic

Need help? Post your questions here.
danielduerr
Posts: 1
Joined: 22 Oct 2016, 15:21
Has thanked: 0
Been thanked: 2 times

Sonos cannot authenticate to Madsonic

Unread post by danielduerr »

Code: Select all

=========================================================================================
 VERSION:      MADSONIC 6.1 | BUILD: 8740 
 SERVLET:      JETTY
 SERVER:       CPU: ICORE3 | ARCH: X64 | MEMORY: 4GB | HDD: 32GB
 OS:           UBUNTU 16.04 LTS
 SYSTEM:       SERVER
 INSTALLER:    DEB
 JAVA:         OPEN JDK 1.8
 BROWSER:      SAFARI 10
 CLIENT:       SONOS 6.4
 DESCRIPTION:  SONOS CANNOT AUTHENTICATE TO MADSONIC
 REPRODUCIBLE: YES
=========================================================================================
Setup Madsonic yesterday, followed all the directions and bought a lifetime premium license. As you can see in the log below, Madsonic finds my Sonos devices and properly registers the service with them. But when I go to add the music service inside of the Sonos Controller app, it fails to authenticate with Madsonic. I have, of course, verified that the authenticate credentials work and are setup correctly. ;)

Repeated the exact same configuration steps in the latest Subsonic version and it works like a charm. Went back to Madsonic, still broken. Wash, rinse, repeat. Something is definitely wrong inside of Madsonic here. I am hopeful someone will fix this soon, as I otherwise regret purchasing this premium license. This is 100% the reason I even deployed the system.

Here is the log showing the successful registration with Sonos, and also showing the exception thrown when trying to authenticate from the Sonos Controller app back to Madsonic:

Code: Select all

[2016-10-23 07:03:08,244] INFO SonosService - Found Sonos controllers: [172.24.8.130, 172.24.8.178, 172.24.8.177, 172.24.8.149, 172.24.8.174, 172.24.8.182]
[2016-10-23 07:03:08,244] INFO SonosServiceRegistration - Enabling Sonos music service, using Sonos controller IP 172.24.8.130, SID 242, and Madsonic URL http://172.24.8.206:4040/ws/Sonos
[2016-10-23 07:03:08,475] INFO SonosServiceRegistration - Sonos controller returned: <html><head><title>success</title></head><body>success!</body></html>
[2016-10-23 07:04:32,881] WARN SonosFaultInterceptor - Error: org.apache.cxf.interceptor.Fault
org.apache.cxf.interceptor.Fault
	at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
	at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
	at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:62)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:232)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:139)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:58)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1487)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.madsonic.service.sonos.SonosSoapFault$LoginInvalid
	at org.madsonic.service.SonosService.getSessionId(SonosService.java:446)
	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.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
	... 77 more
These users thanked the author danielduerr for the post:
Madsonic
Rating: 7.69%
ezwhip
Posts: 3
Joined: 29 Oct 2016, 18:07
Has thanked: 0
Been thanked: 2 times

Re: Sonos cannot authenticate to Madsonic

Unread post by ezwhip »

I am having the exact same issue. This works perfectly with Subsonic 6.x. I just bought a lifetime license to Madsonic because I appreciate all the extra work that's gone into it, but this is also my primary use case for Madsonic (via Sonos). Is this a known issue?
These users thanked the author ezwhip for the post:
Madsonic
Rating: 7.69%
ezwhip
Posts: 3
Joined: 29 Oct 2016, 18:07
Has thanked: 0
Been thanked: 2 times

Re: Sonos cannot authenticate to Madsonic

Unread post by ezwhip »

Just confirmed this is still happening with the latest beta version 6.2.8820 as well. Is anyone having success connecting with Sonos?
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Sonos cannot authenticate to Madsonic

Unread post by Madsonic »

all related authentifcation issues are fixed with Madsonic Build 6.2.9000.
To fix existing user, make a password change to trigger update function.

best regards
Post Reply