Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mopidy doesn't run well with the spotify extension on Arch Linux ARM #116

Closed
sironitomas opened this issue Sep 19, 2016 · 9 comments
Closed

Comments

@sironitomas
Copy link

sironitomas commented Sep 19, 2016

I'm using Arch Linux ARM and have all installed and configured. When I enable the mopidy-spotify extension, it only works 1 out of 5 times.

I can't see any errors here, but can't connect through ncmpcpp:

alarm@alarmpi3 ~ % systemctl status mopidy              
* mopidy.service - Mopidy music server
   Loaded: loaded (/usr/lib/systemd/system/mopidy.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2016-09-19 13:31:48 ART; 2h 43min ago
 Main PID: 5454 (mopidy)
    Tasks: 16 (limit: 4915)
   Memory: 93.0M
      CPU: 2min 30.572s
   CGroup: /system.slice/mopidy.service
           `-5454 /usr/bin/python2 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

Sep 19 13:31:50 alarmpi3 mopidy[5454]: INFO     Starting Mopidy audio
Sep 19 13:31:50 alarmpi3 mopidy[5454]: INFO     Starting Mopidy backends: DirbleBackend, SpotifyBackend, M3UBackend, SoundCloudBackend, 
Sep 19 13:31:50 alarmpi3 mopidy[5454]: INFO     Audio output set to "autoaudiosink"
Sep 19 13:31:51 alarmpi3 mopidy[5454]: INFO     Starting Mopidy core
Sep 19 13:31:53 alarmpi3 mopidy[5454]: INFO     Logged in to Spotify in offline mode
Sep 19 13:31:53 alarmpi3 mopidy[5454]: INFO     Logged in to Spotify in online mode
Sep 19 13:33:53 alarmpi3 mopidy[5454]: INFO     Starting Mopidy frontends: MpdFrontend, HttpFrontend
Sep 19 13:33:53 alarmpi3 mopidy[5454]: INFO     MPD server running at [::ffff:192.168.0.10]:6600
Sep 19 13:33:53 alarmpi3 mopidy[5454]: INFO     HTTP server running at [::ffff:192.168.0.10]:6680
Sep 19 13:33:53 alarmpi3 mopidy[5454]: INFO     Starting GLib mainloop
@falkecarlsen
Copy link

Systemd doesn't show any errors, as you mentioned. What exactly do you mean by enabling the extension? Maybe systemctl enable mopidy or systemctl enable mopidy-spotify?

Have you considered a network-configuration error?

@kingosticks
Copy link
Member

Please provide the versions of everything and run Mopidy with additional debug logging as per https://docs.mopidy.com/en/latest/troubleshooting/.

@sironitomas
Copy link
Author

sironitomas commented Sep 20, 2016

@dareeude by enabling the extension I meant setting it to true in mopidy.config. It's not a network problem because even ncmpcpp gets kicked out in the localhost.

@kingosticks, here are the outputs:

mopidy config:
https://gist.github.com/sironitomas/1feba248135f43b85812eb77bc044417

mopidy deps:
https://gist.github.com/sironitomas/435f81d198144cf1ebb22a109a290e68

mopidy -v:
https://gist.github.com/sironitomas/2945b808d65cdd14154cc039efa1d552

Let me know if you need anything else!

@sironitomas sironitomas changed the title mopidy doesn't run well with the spotify extension mopidy doesn't run well with the spotify extension on armv7h Sep 20, 2016
@sironitomas sironitomas changed the title mopidy doesn't run well with the spotify extension on armv7h mopidy doesn't run well with the spotify extension on Arch Linux ARM Sep 20, 2016
@sironitomas
Copy link
Author

Additional data I have found:
Disabling spotify with enabled = false from the config file, causes mopidy to start super fast, and clients can always connect well. For some reason, the spotify extension causes mpd clients to disconnect.

@kingosticks
Copy link
Member

There are obviously a lot of ErrorType.OTHER_PERMANENT Spotify errors in your log that seem to occur each time the spotify playlists are loaded. Have you tried increasing your client timeout to something greater than 5 seconds (I assume that's what it currently is since it sends a status request every 5 seconds in the log)?

I would also suggest running with trace level logging (-vvvv), it'll generate a lot of output so make that a quick run.

Have you tried mopidy-spotify on any system other than Arch Linux on a Raspberry Pi?

@kingosticks
Copy link
Member

Actually, my guess is this is due to a combination of my favourite issue (mopidy/mopidy#969 (comment)) and the fact that some of your playlists are returning errors (and not being cached?). If you are keen you could try commenting out this line https://github.com/mopidy/mopidy/blob/develop/mopidy/core/playlists.py#L136

@sironitomas
Copy link
Author

@kingosticks I have tried increasing my client's timeout to 30 seconds and I haven't had this problem so far. I will still post the (-vvvv) output when I have some time.

@kingosticks
Copy link
Member

Another hack to avoid this is to force all the ActorProxy creation (and attribute traversal) to occur just once at MPD server startup rather than once for every MPD session context. This huge hack should make your mpd client a lot more responsive. See example here.

But this will all go away once we get rid of mopidy.core.Core's deprecated properties in the next major release.

@kingosticks
Copy link
Member

Please reopen if you are still having problems and want to paste that log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants