OK - so I have an unusual use case where I'm running LMS in a Docker
container. 

The networking setup is to use Bridging network, which works fine for
most use cases. However, the Spotify Protocol Handler receives
connections inbound that can't be handled by iptables without some
serious pain.

The fix to this is to run the LMS container in Host networking mode -
this means that the container takes on the Host networking stack and
there is no firewalling to contend with. 

You will also need to add the following iptables rule to allow inbound
connections to the Spotify Helper: 


Code:
--------------------
    
  iptables -I INPUT 1 -p tcp -m tcp --dport 9005 -j ACCEPT
  
--------------------



scatat wrote: 
> Hi there
> 
> I've installed the Spotify Protocol Handler exactly as required - ie
> installing both the Spotify plugin and the SPH plugin.
> 
> I've also set up my Spotify account as required - ie given the LMS app
> permission to use my spotify account.
> 
> Can browse Spotify content in the web UI so I can only assume the
> Spotify plugin works well there.
> 
> However, when I try to play a track/album/anything, the player just says
> "Connecting" forever. 
> 
> There are obvious errors I can see in logs.
> 
> Snippets supplied below. The only logging that is relevent is from the
> helper. Nothing in server.log
> 
> > 
Code:
--------------------
  >   > 
  > spotifyd.log
  > [21:50:07.823626] main:619 req: status.json res: (null) par: (null) prot: 
HTTP/1.0 auth: (null)
  > [21:50:07.823648] process_status:1464 process status
  > [21:50:17.583834] main:567 new connection
  > [21:50:17.584277] main:619 req: status.json res: (null) par: (null) prot: 
HTTP/1.0 auth: (null)
  > [21:50:17.584301] process_status:1464 process status
  > [21:50:21.070164] main:567 new connection
  > [21:50:21.070554] main:619 req: status.json res: (null) par: (null) prot: 
HTTP/1.0 auth: (null)
  > [21:50:21.070576] process_status:1464 process status
  > [21:50:30.356999] main:567 new connection
  > [21:50:30.357474] main:619 req: status.json res: (null) par: (null) prot: 
HTTP/1.0 auth: (null)
  > [21:50:30.357503] process_status:1464 process status
  > [21:50:54.074390] main:567 new connection
  > [21:50:54.074792] main:677 attempting login for user: scatat
  > [21:50:54.155524] log_message:81 log: 21:50:54.155 I [ap:1752] Connecting 
to AP ap.spotify.com:4070
  > [21:50:54.161242] logged_in:54 logged in
  > [21:50:54.442894] log_message:81 log: 21:50:54.442 I [ap:1226] Connected to 
AP: 194.132.197.228:4070
  > [21:50:55.267736] credentials_blob_updated:119 credentials blob updated
  > [21:50:55.267763] metadata_updated:86 new meta
  > [21:50:55.267792] main:567 new connection
  > [21:50:55.267810] main:619 req: status.json res: (null) par: (null) prot: 
HTTP/1.0 auth: (null)
  > [21:50:55.267821] process_status:1464 process status
  > [21:50:55.384586] log_message:81 log: 21:50:55.384 E [ap:4172] 
ChannelError(0, 1, link-tracks)
  > [21:50:55.733306] log_message:81 log: 21:50:55.733 E [ap:4172] 
ChannelError(0, 1, link-tracks)
  > [21:50:56.035709] log_message:81 log: 21:50:56.035 E [ap:4172] 
ChannelError(0, 1, link-tracks)
  > [21:50:56.052244] log_message:81 log: 21:50:56.052 E [ap:4172] 
ChannelError(0, 1, link-tracks)
  > [21:51:05.267088] log_message:81 log: 21:51:05.267 I [offline-mgr:2032] 0 
files are locked. 0 images are locked
  > [21:51:05.267147] log_message:81 log: 21:51:05.267 I [offline-mgr:2058] 0 
files unlocked. 0 images unlocked
--------------------
> > 
> 
> Overnight, more logging from the helper - not sure what might be the
> issue - any help appreciated.
> 
> > 
Code:
--------------------
  >   > 
  > [23:00:00.322796] check_player:270 1: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e5363616e53746172746564222c22706172616d73223a7b2264617461
  > [23:00:00.322836] check_player:284 bad player response
  > [23:00:01.734124] check_player:307 2: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e5363616e46696e6973686564222c22706172616d73223a7b22646174
  > [23:00:01.734184] main:871 unable to play on this player: -3
  > [23:00:01.734209] _sockprintf:391 unable to write to socket: 25 errno: 104 
Connection reset by peer
  > [23:00:01.734245] main:567 new connection
  > [23:00:01.734262] main:619 req: stream.flc res: 
spotify:track:10oORBUGznKErQMhJJ7pot par: 
player=00%3A04%3A20%3A1e%3A3c%3A06&start=0&sync=1&id=2 prot: SPOTSTREAM/1.0 
auth: (null)
  > [23:00:01.734288] main:813 newstream connection from 10.0.122.11
  > [23:00:01.734298] main:849 streamid: 0 newid: 2 type: FLAC
  > [23:00:01.932418] check_player:270 1: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e436c65616e53746172746564222c22706172616d73223a7b22646174
  > [23:00:01.932452] check_player:284 bad player response
  > [23:00:06.028457] check_player:307 2: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e436c65616e46696e6973686564222c22706172616d73223a7b226461
  > [23:00:06.028528] main:871 unable to play on this player: -3
  > [23:00:06.028579] main:567 new connection
  > [23:00:06.028598] main:619 req: prefetch.json res: 
spotify:track:7knyElYZmxagU4HvgMTNlQ par: (null) prot: HTTP/1.0 auth: (null)
  > [23:00:06.028631] main:985 prefetching track: No error
  > [23:00:06.042789] metadata_updated:86 new meta
  > [23:00:06.046509] main:567 new connection
  > [23:00:06.049191] main:619 req: stream.flc res: 
spotify:track:7knyElYZmxagU4HvgMTNlQ par: 
player=00%3A04%3A20%3A1e%3A3c%3A06&start=0&sync=1&id=3 prot: SPOTSTREAM/1.0 
auth: (null)
  > [23:00:06.049236] main:813 newstream connection from 10.0.122.11
  > [23:00:06.049248] main:849 streamid: 0 newid: 3 type: FLAC
  > [03:00:00.208977] check_player:270 1: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e5363616e53746172746564222c22706172616d73223a7b2264617461
  > [03:00:00.209024] check_player:284 bad player response
  > [03:00:01.687512] check_player:307 2: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e5363616e46696e6973686564222c22706172616d73223a7b22646174
  > [03:00:01.687583] main:871 unable to play on this player: -3
  > [03:00:01.687649] log_message:81 log: 03:00:01.687 I [offline-mgr:2058] 0 
files unlocked. 0 images unlocked
  > [03:00:01.689007] main:567 new connection
  > [03:00:01.689032] main:619 req: prefetch.json res: 
spotify:track:2xUmbFfdmzR85U7yWKg3Tr par: (null) prot: HTTP/1.0 auth: (null)
  > [03:00:01.689056] main:985 prefetching track: No error
  > [03:00:01.689108] _sockprintf:391 unable to write to socket: 26 errno: 32 
Broken pipe
  > [03:00:01.705274] metadata_updated:86 new meta
  > [03:00:01.729375] main:567 new connection
  > [03:00:01.729429] main:619 req: stream.flc res: 
spotify:track:2xUmbFfdmzR85U7yWKg3Tr par: 
player=00%3A04%3A20%3A1e%3A3c%3A06&start=0&sync=1&id=4 prot: SPOTSTREAM/1.0 
auth: (null)
  > [03:00:01.729461] main:813 newstream connection from 10.0.122.11
  > [03:00:01.729478] main:849 streamid: 0 newid: 4 type: FLAC
  > [03:00:01.771317] check_player:270 1: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e436c65616e53746172746564222c22706172616d73223a7b22646174
  > [03:00:01.771351] check_player:284 bad player response
  > [03:00:05.964193] check_player:307 2: 
7b226a736f6e727063223a22322e30222c226d6574686f64223a22566964656f4c6962726172792e4f6e436c65616e46696e6973686564222c22706172616d73223a7b226461
  > [03:00:05.964288] main:871 unable to play on this player: -3
  > [03:00:31.706427] log_message:81 log: 03:00:31.706 I [offline-mgr:2058] 0 
files unlocked. 0 images unlocked
  > [03:04:39.023091] main:567 new connection
  > [03:04:39.023539] main:619 req: prefetch.json res: 
spotify:track:2xUmbFfdmzR85U7yWKg3Tr par: (null) prot: HTTP/1.0 auth: (null)
  > [03:04:39.023997] main:985 prefetching track: No error
  > [03:04:39.445580] log_message:81 log: 03:04:39.445 I 
[file_streamer_simple.cpp:769] Request for file 
afe78b48123172ab4530a3bf69cd7c77f9d56e1d complete (code: 0)
  > [03:14:39.810766] logged_out:61 logged out
  > [07:06:20.662333] main:567 new connection
  > [07:06:20.678545] main:619 req: status.json res: (null) par: (null) prot: 
HTTP/1.0 auth: (null)
  > [07:06:20.678578] process_status:1464 process status
  > 
--------------------
> > 
> 
> I did see something in server.log in the morning:
> 
> > 
Code:
--------------------
  >   > 
  > [16-05-30 03:00:01.6908] 
Plugins::SpotifyProtocolHandler::ProtocolHandler::handleDirectError (191) 
stream failed - bad player: -3
  > [16-05-30 03:00:05.9680] 
Plugins::SpotifyProtocolHandler::ProtocolHandler::handleDirectError (191) 
stream failed - bad player: -3
  > [16-05-30 07:17:01.0017] 
Plugins::SpotifyProtocolHandler::Spotifyd::__ANON__ (312) Timed out waiting for 
data
  > 
  > 
--------------------
> >


------------------------------------------------------------------------
scatat's Profile: http://forums.slimdevices.com/member.php?userid=3317
View this thread: http://forums.slimdevices.com/showthread.php?t=105187

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to