Mopidy - Spotify - <ErrorType.UNABLE_TO_CONTACT_SERVER: 8>

Hi all,

I’m trying for the second day run Spotify on Mopidy @ Raspberry Pi 3 (Raspbian Jessy) but without success.
I’ve tried many tutorials / guide which I have found on the web but still the same.
Can you please help me ? I’m newbie in Linux/ RPI

I can ping spotify.com and have valid Premium account
Below I paste few logs:

tail -f /var/log/mopidy/mopidy.log

2017-01-12 20:53:32,625 INFO [1458:MainThread] mopidy.main: Enabled extensions: mopify, spotify, mpd, alsamixer, http, file, stream, spotify_tunigo, local-sqlite, local-images, moped, musicbox_webclient, local, m3u, soundcloud
2017-01-12 20:53:32,627 INFO [1458:MainThread] mopidy.main: Disabled extensions: softwaremixer
2017-01-12 20:53:32,629 INFO [1458:MainThread] mopify: Setup Mopify
2017-01-12 20:53:32,982 INFO [1458:MainThread] mopidy.commands: Starting Mopidy mixer: AlsaMixer
2017-01-12 20:53:33,501 INFO [1458:MainThread] mopidy_alsamixer.mixer: Mixing using ALSA, card 1, mixer control “PCM”.
2017-01-12 20:53:33,511 INFO [1458:MainThread] mopidy.commands: Starting Mopidy audio
2017-01-12 20:53:33,516 INFO [1458:MainThread] mopidy.commands: Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend, SpotifyBackend, SpotifyTunigoBackend, SoundCloudBackend
2017-01-12 20:53:33,565 INFO [1458:Audio-3] mopidy.audio.actor: Audio output set to "alsasink device=hw:1,0"
2017-01-12 20:53:33,577 INFO [1458:MainThread] mopidy.local.library: Loaded 5788 local tracks using images
2017-01-12 20:53:33,614 INFO [1458:MainThread] urllib3.connectionpool: Starting new HTTPS connection (1): api.soundcloud.com
2017-01-12 20:53:39,375 INFO [1458:MainThread] mopidy.commands: Starting Mopidy core
2017-01-12 20:53:39,434 INFO [1458:MainThread] mopidy.commands: Starting Mopidy frontends: QueueManagerFrontend, MpdFrontend, HttpFrontend
2017-01-12 20:53:39,440 INFO [1458:MainThread] mopidy.mpd.actor: MPD server running at [::]:6600
2017-01-12 20:53:39,448 INFO [1458:MainThread] mopidy.commands: Starting GLib mainloop
2017-01-12 20:53:39,451 INFO [1458:HttpFrontend-17] mopidy.http.actor: HTTP server running at [::]:6680
2017-01-12 20:53:39,616 INFO [1458:MpdSession-18] mopidy.mpd.session: New MPD connection from [::1]:45492
2017-01-12 20:53:43,873 INFO [1458:HttpServer] tornado.access: 200 GET /mopidy/ (192.168.178.16) 36.02ms
2017-01-12 20:53:43,932 INFO [1458:HttpServer] tornado.access: 304 GET /mopidy/mopidy.css (192.168.178.16) 32.61ms
2017-01-12 20:54:03,953 ERROR [1458:SpotifyEventLoop] spotify.session: Spotify login error: <ErrorType.UNABLE_TO_CONTACT_SERVER: 8>
2017-01-12 20:54:03,958 INFO [1458:SpotifyEventLoop] spotify.session: Spotify logged out

mopidyctl config:

Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config” as user mopidy
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

[audio]
mixer = alsamixer
mixer_volume =
output = alsasink device=hw:1,0
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL

[mopify]
enabled = true
debug = false

[moped]
enabled = true

[local-sqlite]
enabled = true
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
Last Week’s Updates local:directory?max-age=604800
Last Month’s Updates local:directory?max-age=2592000
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
use_artist_sortname = false

[local-images]
enabled = true
library = sqlite
base_uri = /images/
image_dir =
album_art_files =
*.jpg
*.jpeg
*.png

[mpd]
enabled = true
hostname = ::
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = ::
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
metadata_blacklist =
timeout = 5000

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = ~/.local/share/mopidy/m3u/

[softwaremixer]
enabled = false ; Extension disabled by user config.

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = images
media_dir = /media/lacie/shares
scan_timeout = 5000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

[spotify]
enabled = true
username = ****************
password = ********
bitrate = 320
volume_normalization = true
private_session = false
timeout = 4000
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[spotify_tunigo]
enabled = true
region =
sub_genres = true
cache_time = 3600

[soundcloud]
enabled = true
explore_songs = 25
auth_token = ********

[alsamixer]
enabled = true
card = 1
control = PCM

mopidy deps

Executable: /usr/bin/mopidy
Platform: Linux-4.4.34-v7+-armv7l-with-debian-8.0
Python: CPython 2.7.9 from /usr/lib/python2.7
Mopidy: 2.0.1 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
  tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-MusicBox-Webclient: 2.3.0 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=1.1.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  setuptools: 31.0.1 from /usr/local/lib/python2.7/dist-packages
Mopidy-ALSAMixer: 1.0.3 from /usr/lib/python2.7/dist-packages
  Mopidy>=0.19: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  pyalsaaudio: 0.7 from /usr/lib/python2.7/dist-packages
Mopidy-Mopify: 1.6.0 from /usr/local/lib/python2.7/dist-packages
  setuptools: 31.0.1 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=0.19: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  ConfigObj: 5.0.6 from /usr/local/lib/python2.7/dist-packages
    six: 1.8.0 from /usr/lib/python2.7/dist-packages
Mopidy-Local-SQLite: 1.0.0 from /usr/local/lib/python2.7/dist-packages
  uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
    ipaddress; python_version == "2.7": 1.0.17 from /usr/local/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  setuptools: 31.0.1 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Moped: 0.7.0 from /usr/local/lib/python2.7/dist-packages
  setuptools: 31.0.1 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=1.0.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-SoundCloud: 2.0.2 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images: 1.0.0 from /usr/local/lib/python2.7/dist-packages
  uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
    ipaddress; python_version == "2.7": 1.0.17 from /usr/local/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  setuptools: 31.0.1 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify-Tunigo: 1.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=0.19.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Mopidy-Spotify>=1.2.0: 3.0.0 from /usr/lib/python2.7/dist-packages
    Mopidy>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
      Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
      requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
      tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
      cffi>=1.0.0: 1.9.1 from /usr/local/lib/python2.7/dist-packages
        pycparser: 2.17 from /usr/local/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  tunigo>=1.0.0: 1.0.0 from /usr/lib/python2.7/dist-packages
    requests>=2.0.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 3.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
    cffi>=1.0.0: 1.9.1 from /usr/local/lib/python2.7/dist-packages
      pycparser: 2.17 from /usr/local/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
GStreamer: 1.4.4.0 from /usr/lib/python2.7/dist-packages/gi
  Detailed information:
    Python wrapper: python-gi 3.14.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mad
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec

Thank you very much for all instructions / guides.

Best Regards.

Spotify does seem to have had some problems lately, so it might be at their end. Unless you are using an abnormal network setup (vpn, proxy etc)?

I had OpenVPN installed once but it’s already removed.
Proxy only for deluge
Soundcloud and local files are working without any issues

Hi,
I changed my inerface from wifi to ethernet (cable) and Spotify works.
Does the Spotify works when connected via wifi ?

Yes. I assume you were using the on board wifi. Have you tried a different power supply? Have you made sure there’s no firewall running on wlan0?

Yes, I’m using built-in wifi. I haven’t tried a different power supply - I have 2nd RPI but with exactlly the same power supply.
As I mentioned I had OpenVPN for a while but it’s already removed.
In /etc/network/interfaces I found & remove that line: Pre-up /etc/firewall-openvpn-rules.ssh but it didn’t help.
How can I check if there is firewall on wifi ? If there is firewall should I be able to ping spotify.com ?

Thank you for support !

I mention the power supply because the RPi3 requires more current than the previous generations. People often had problems with usb wifi adapters and dodgy power supplies when the pi first came out.

You can run ‘lsmod | grep ip_tables’ to see if the kernel firewall module is loaded. The ports Spotify uses will be different.

It gives me below results:

paw@rpi:~ $ sudo lsmod | grep ip_tables
ip_tables 11445 1 iptable_filter
x_tables 13165 2 ip_tables,iptable_filter

paw@rpi:~ $ /sbin/modinfo ip_tables
filename: /lib/modules/4.4.34-v7+/kernel/net/ipv4/netfilter/ip_tables.ko
description: IPv4 packet filter
author: Netfilter Core Team coreteam@netfilter.org
license: GPL
srcversion: 9F85288902DE1463888443E
depends: x_tables
intree: Y
vermagic: 4.4.34-v7+ SMP mod_unload modversions ARMv7