AlexandrePTJ / mopidy-somafm

Provides a backend for playing music from somafm
MIT License
22 stars 9 forks source link

Problem with backend #21

Closed PanderMusubi closed 8 years ago

PanderMusubi commented 8 years ago

n/a

PanderMusubi commented 8 years ago

Also I see messages such as the following my log files. Not sure if this is related or not. Please let me know what that too.

2015-10-23 13:40:48,719 WARNING [2930:MainThread] mopidy.audio.gst: Element doesn't implement handling of this stream. Please file a bug.
AlexandrePTJ commented 8 years ago

Please send the result of

mopidy config

Than run mopidy with command:

mopidy -vv
PanderMusubi commented 8 years ago

After major upgrades, that kernel part is OK. However, Mopidy clients keep crashing on (log level is set to debug)

2015-10-23 19:04:31,064 DEBUG [1238:StreamBackend-4] mopidy.stream.actor: Parsed playlist (http://somafm.com/secretagent130.pls) and found new URI: http://xstream1.somafm.com:9010
2015-10-23 19:04:31,065 DEBUG [1238:StreamBackend-4] mopidy.stream.actor: Unwrapping stream from URI: http://xstream1.somafm.com:9010
2015-10-23 19:04:31,691 DEBUG [1238:StreamBackend-4] mopidy.stream.actor: GStreamer failed scanning URI (http://xstream1.somafm.com:9010): Your GStreamer installation is missing a plug-in.

and

2015-10-23 19:54:51,561 WARNING [1018:MainThread] mopidy.audio.gst: Element doesn't implement handling of this stream. Please file a bug.

Am I missing something from:

$ dpkg -l|grep gstream|awk '{print $2}'
gstreamer0.10-alsa:armhf
gstreamer0.10-gconf:armhf
gstreamer0.10-plugins-base:armhf
gstreamer0.10-plugins-good:armhf
gstreamer0.10-plugins-ugly:armhf
gstreamer0.10-pulseaudio:armhf
gstreamer0.10-tools
gstreamer0.10-x:armhf
gstreamer1.0-alsa:armhf
gstreamer1.0-libav:armhf
gstreamer1.0-omx
gstreamer1.0-plugins-bad:armhf
gstreamer1.0-plugins-base:armhf
gstreamer1.0-plugins-good:armhf
gstreamer1.0-x:armhf
libgstreamer-plugins-bad1.0-0:armhf
libgstreamer-plugins-base0.10-0:armhf
libgstreamer-plugins-base1.0-0:armhf
libgstreamer0.10-0:armhf
libgstreamer1.0-0:armhf
PanderMusubi commented 8 years ago

mopidy config

[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 = mopidy.log config_file =

[audio] mixer = software mixer_volume = output = autoaudiosink

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

[somafm] enabled = true encoding = mp3 quality = fast

[dirble] enabled = false ; Extension disabled due to config errors. api_key = ; Must be set. countries = timeout = 5000

[alsamixer] enabled = true card = 0 control = Master

[scrobbler] enabled = false ; Extension disabled due to config errors. username = ; Must be set. password = ; Must be set.

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

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

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

[m3u] enabled = true playlists_dir =

[softwaremixer] enabled = true

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

[local] enabled = false ; Extension disabled due to config errors. library = json media_dir = ; Must be set. data_dir = $XDG_DATA_DIR/mopidy/local scan_timeout = 1000 scan_flush_threshold = 100 scan_follow_symlinks = false excluded_file_extensions = .directory .html .jpeg .jpg .log .nfo .png .txt

[soundcloud] enabled = false ; Extension disabled due to config errors. explore_songs = 25 auth_token = ; Must be set.

PanderMusubi commented 8 years ago

mopidy -vv

INFO 2015-10-23 21:12:20,380 [1698:MainThread] mopidy.main Starting Mopidy 1.1.1 DEBUG 2015-10-23 21:12:20,417 [1698:MainThread] mopidy.ext Loading entry point: somafm = mopidy_somafm:Extension DEBUG 2015-10-23 21:12:20,422 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-SomaFM 0.7.1 DEBUG 2015-10-23 21:12:20,425 [1698:MainThread] mopidy.ext Loading entry point: dirble = mopidy_dirble:Extension DEBUG 2015-10-23 21:12:20,431 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-Dirble 1.1.2 DEBUG 2015-10-23 21:12:20,437 [1698:MainThread] mopidy.ext Loading entry point: alsamixer = mopidy_alsamixer:Extension DEBUG 2015-10-23 21:12:20,441 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-ALSAMixer 1.0.3 DEBUG 2015-10-23 21:12:20,446 [1698:MainThread] mopidy.ext Loading entry point: scrobbler = mopidy_scrobbler:Extension DEBUG 2015-10-23 21:12:20,450 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-Scrobbler 1.1.1 DEBUG 2015-10-23 21:12:20,482 [1698:MainThread] mopidy.ext Loading entry point: mpd = mopidy.mpd:Extension DEBUG 2015-10-23 21:12:20,486 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-MPD 1.1.1 DEBUG 2015-10-23 21:12:20,487 [1698:MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension DEBUG 2015-10-23 21:12:20,491 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 1.1.1 DEBUG 2015-10-23 21:12:20,492 [1698:MainThread] mopidy.ext Loading entry point: stream = mopidy.stream:Extension DEBUG 2015-10-23 21:12:20,495 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-Stream 1.1.1 DEBUG 2015-10-23 21:12:20,495 [1698:MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension DEBUG 2015-10-23 21:12:20,498 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-M3U 1.1.1 DEBUG 2015-10-23 21:12:20,498 [1698:MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension DEBUG 2015-10-23 21:12:20,501 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 1.1.1 DEBUG 2015-10-23 21:12:20,501 [1698:MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension DEBUG 2015-10-23 21:12:20,504 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-File 1.1.1 DEBUG 2015-10-23 21:12:20,505 [1698:MainThread] mopidy.ext Loading entry point: local = mopidy.local:Extension DEBUG 2015-10-23 21:12:20,525 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-Local 1.1.1 DEBUG 2015-10-23 21:12:20,529 [1698:MainThread] mopidy.ext Loading entry point: soundcloud = mopidy_soundcloud:SoundCloudExtension DEBUG 2015-10-23 21:12:20,535 [1698:MainThread] mopidy.ext Loaded extension: Mopidy-SoundCloud 2.0.0 DEBUG 2015-10-23 21:12:20,543 [1698:MainThread] mopidy.ext Discovered extensions: somafm, dirble, alsamixer, scrobbler, mpd, http, stream, m3u, softwaremixer, file, local, soundcloud DEBUG 2015-10-23 21:12:20,565 [1698:MainThread] mopidy.config.keyring Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11) INFO 2015-10-23 21:12:20,566 [1698:MainThread] mopidy.config Loading config from builtin defaults DEBUG 2015-10-23 21:12:20,590 [1698:MainThread] mopidy.config Loading config from /etc/xdg/mopidy/mopidy.conf failed; it does not exist INFO 2015-10-23 21:12:20,591 [1698:MainThread] mopidy.config Loading config from /root/.config/mopidy/mopidy.conf INFO 2015-10-23 21:12:20,602 [1698:MainThread] mopidy.config Loading config from command line options DEBUG 2015-10-23 21:12:20,662 [1698:MainThread] mopidy.ext Validating extension: somafm DEBUG 2015-10-23 21:12:20,673 [1698:MainThread] mopidy.ext Validating extension: dirble DEBUG 2015-10-23 21:12:20,682 [1698:MainThread] mopidy.ext Validating extension: alsamixer DEBUG 2015-10-23 21:12:20,690 [1698:MainThread] mopidy.ext Validating extension: scrobbler DEBUG 2015-10-23 21:12:20,699 [1698:MainThread] mopidy.ext Validating extension: mpd DEBUG 2015-10-23 21:12:20,702 [1698:MainThread] mopidy.ext Validating extension: http DEBUG 2015-10-23 21:12:20,982 [1698:MainThread] mopidy.ext Validating extension: stream DEBUG 2015-10-23 21:12:20,986 [1698:MainThread] mopidy.ext Validating extension: m3u DEBUG 2015-10-23 21:12:20,989 [1698:MainThread] mopidy.ext Validating extension: softwaremixer DEBUG 2015-10-23 21:12:20,992 [1698:MainThread] mopidy.ext Validating extension: file DEBUG 2015-10-23 21:12:20,995 [1698:MainThread] mopidy.ext Validating extension: local DEBUG 2015-10-23 21:12:20,998 [1698:MainThread] mopidy.ext Validating extension: soundcloud INFO 2015-10-23 21:12:21,005 [1698:MainThread] mopidy.main Enabled extensions: mpd, alsamixer, http, stream, m3u, somafm, softwaremixer, file INFO 2015-10-23 21:12:21,007 [1698:MainThread] mopidy.main Disabled extensions: dirble, local, scrobbler, soundcloud WARNING 2015-10-23 21:12:21,009 [1698:MainThread] mopidy.main Found dirble configuration errors, the extension has been automatically disabled: WARNING 2015-10-23 21:12:21,011 [1698:MainThread] mopidy.main dirble/api_key must be set. WARNING 2015-10-23 21:12:21,013 [1698:MainThread] mopidy.main Found local configuration errors, the extension has been automatically disabled: WARNING 2015-10-23 21:12:21,015 [1698:MainThread] mopidy.main local/media_dir must be set. WARNING 2015-10-23 21:12:21,016 [1698:MainThread] mopidy.main Found scrobbler configuration errors, the extension has been automatically disabled: WARNING 2015-10-23 21:12:21,018 [1698:MainThread] mopidy.main scrobbler/username must be set. WARNING 2015-10-23 21:12:21,020 [1698:MainThread] mopidy.main scrobbler/password must be set. WARNING 2015-10-23 21:12:21,022 [1698:MainThread] mopidy.main Found soundcloud configuration errors, the extension has been automatically disabled: WARNING 2015-10-23 21:12:21,024 [1698:MainThread] mopidy.main soundcloud/auth_token must be set. WARNING 2015-10-23 21:12:21,026 [1698:MainThread] mopidy.main Please fix the extension configuration errors or disable the extensions to silence these messages. DEBUG 2015-10-23 21:12:22,120 [1698:MainThread] mopidy.commands Available Mopidy mixers: AlsaMixer, SoftwareMixer INFO 2015-10-23 21:12:22,124 [1698:MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer DEBUG 2015-10-23 21:12:22,143 [1698:MainThread] mopidy.commands Mixer volume left unchanged INFO 2015-10-23 21:12:22,146 [1698:MainThread] mopidy.commands Starting Mopidy audio INFO 2015-10-23 21:12:22,158 [1698:MainThread] mopidy.commands Starting Mopidy backends: SomaFMBackend, StreamBackend, M3UBackend, FileBackend INFO 2015-10-23 21:12:22,221 [1698:SomaFMBackend-3] urllib3.connectionpool Starting new HTTP connection (1): api.somafm.com INFO 2015-10-23 21:12:22,256 [1698:MainThread] mopidy.internal.path Creating dir /root/.local/share/mopidy/m3u INFO 2015-10-23 21:12:22,263 [1698:MainThread] mopidy.m3u.playlists Loaded 0 M3U playlists from /root/.local/share/mopidy/m3u DEBUG 2015-10-23 21:12:22,279 [1698:MainThread] mopidy.file.library Failed expanding path ($XDG_MUSIC_DIR) from file/media_dirs config value. INFO 2015-10-23 21:12:22,282 [1698:Audio-2] mopidy.audio.actor Audio output set to "autoaudiosink" DEBUG 2015-10-23 21:12:22,992 [1698:SomaFMBackend-3] mopidy_somafm.somafm Get http://api.somafm.com/channels.xml : 200 INFO 2015-10-23 21:12:23,232 [1698:SomaFMBackend-3] mopidy_somafm.somafm Loaded 35 SomaFM channels INFO 2015-10-23 21:12:23,241 [1698:MainThread] mopidy.commands Starting Mopidy core INFO 2015-10-23 21:12:23,369 [1698:MainThread] mopidy.commands Starting Mopidy frontends: MpdFrontend, HttpFrontend INFO 2015-10-23 21:12:23,382 [1698:MainThread] mopidy.mpd.actor MPD server running at [::ffff:127.0.0.1]:6600 DEBUG 2015-10-23 21:12:23,392 [1698:MainThread] mopidy.http.actor Starting HTTP server INFO 2015-10-23 21:12:23,403 [1698:HttpFrontend-10] mopidy.http.actor HTTP server running at [::ffff:127.0.0.1]:6680 DEBUG 2015-10-23 21:12:23,413 [1698:HttpServer] mopidy.http.actor Loaded HTTP extension: mopidy DEBUG 2015-10-23 21:12:23,421 [1698:HttpServer] mopidy.http.actor HTTP routes from extensions: u'/mopidy': <class 'mopidy.http.handlers.AddSlashHandler'> u'/mopidy/ws/?': <class 'mopidy.http.handlers.WebSocketHandler'> u'/mopidy/rpc': <class 'mopidy.http.handlers.JsonRpcHandler'> u'/mopidy/(.+)': <class 'mopidy.http.handlers.StaticFileHandler'> u'/mopidy/': <class 'mopidy.http.handlers.ClientListHandler'> u'/': <class 'tornado.web.RedirectHandler'> DEBUG 2015-10-23 21:12:23,424 [1698:MpdFrontend-8] mopidy.zeroconf Zeroconf service _mpd._tcp at [framboos.local]:6600: Avahi service not running; publish failed. DEBUG 2015-10-23 21:12:23,457 [1698:HttpFrontend-10] mopidy.zeroconf Zeroconf service _http._tcp at [framboos.local]:6680: Avahi service not running; publish failed. DEBUG 2015-10-23 21:12:23,462 [1698:HttpFrontend-10] mopidy.zeroconf Zeroconf service _mopidy-http._tcp at [framboos.local]:6680: Avahi service not running; publish failed.

PanderMusubi commented 8 years ago

Currently I have narrowed it down to the following. When I enable somafm, I see the 13 streams in Gnome Music Player Client, but on all of the 35 channels.

screenshot-somafm

When I play a stream I get the error

error code 10: connection time out

and then the client crashes hard.

The log files show:

2015-11-04 16:17:58,200 INFO [4809:SomaFMBackend-3] mopidy_somafm.somafm: Loaded 13 SomaFM channels
2015-11-04 16:18:00,766 INFO [4809:MainThread] mopidy.local.library: Loaded 1320 local tracks using json
2015-11-04 16:18:00,806 INFO [4809:MainThread] mopidy.commands: Starting Mopidy core
2015-11-04 16:18:01,001 INFO [4809:MainThread] mopidy.commands: Starting Mopidy frontends: MpdFrontend
2015-11-04 16:18:01,012 INFO [4809:MainThread] mopidy.mpd.actor: MPD server running at [::]:6600
2015-11-04 16:18:03,714 INFO [4809:MpdSession-10] mopidy.mpd.session: New MPD connection from [::ffff:192.168.1.13]:56126
2015-11-04 16:19:03,139 INFO [4809:StreamBackend-4] urllib3.connectionpool: Starting new HTTP connection (1): somafm.com
2015-11-04 16:19:04,167 INFO [4809:StreamBackend-4] urllib3.connectionpool: Starting new HTTP connection (1): uwstream2.somafm.com
2015-11-04 16:19:12,664 INFO [4809:MpdSession-11] mopidy.mpd.session: New MPD connection from [::ffff:192.168.1.13]:56134

Any tips how to investigate this further?

PanderMusubi commented 8 years ago

So I reinstalled all and tried again. Now gmpc is core dumping on me when I have this module actived in Mopidy:

$ gmpc

(gmpc:17163): Gmpc-ERROR **: Connection state differs from actual state: act: 0

Trace/breakpoint trap (core dumped)
AlexandrePTJ commented 8 years ago

Which linux distribution do you use ?

PanderMusubi commented 8 years ago

Server side Raspbian Jessie. Client side is Ubuntu 15.10, but also Android client MPDroid has problems when I enable this module. It goes into unlimited refresh mode. Willing to investigate this but don't know exactly how.

AlexandrePTJ commented 8 years ago

I will try this setup but I don't really see why either

AlexandrePTJ commented 8 years ago

I did a clean install of raspbian then follow instruction from https://docs.mopidy.com/en/latest/installation/debian/ to install Mopidy. Then I installed python-pip to get mopidy-somafm extension. And everything is working fine with any client. Something is missing in your configuration but I don't know what.

PanderMusubi commented 8 years ago

Eventually starting anew with Raspbian Jessie Lite did the trick. Thanks for bearing with me.