Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: MPD caching old IP for NAS
#1
Moode release: 6.7.0 2020-07-19
Platform info:
  • RaspiOS: 10.3
  • Linux kernel: 5.4.51-v7+ #1325
  • Platform: Pi-3B 1GB v1.2
  • Architecture: armv7l
  • MPD version: 0.21.24
NAS:
Synology DS916+
DSM 6.2.3-25426 Update 2

I've been using Moode really happily since a friend turned me onto it, much more stable than the previous player (Volumio) I was using. So this is my first actual problem!

A few days ago my router blew up. I'm currently running on a temporary router, pending getting a decent replacement. This means that both my Pi and my NAS are now running on new IPs. Everything is on DHCP, and normally I would reserve IPs for key items, rather than assign static addresses (hangover from the day job, where fudging with statics just causes problems on larger networks).

Both the Pi and the NAS are quite happy on their new IPs, and I have cleared the old NAS mount (SMB) and set up a new connection to the new IP address, which mounts fine. DS Audtio on the NAS sees the Pi as a player target.

However, when attempting certain tasks, either from Moode or via DS Audio, I am getting MPD errors which refer to the previous IP of the NAS. I am also unable to actually playback via DS Audio - it attempts playback, but each item in a playlist just skips through quickly with no output, which is DS Audio behaviour when it's unable to communicate with a player and/or find a track itself. The same playlist runs fine when the output is set to the computer (browser-based access) or phone (app-based).

I've tried adding the NAS as a UPnP device, which allows playback directly from Moode, but screws up some of the album art links and also sometimes throws MPD errors on the old IP, even though the audio plays. However, playback via DS Audio still fails.

I have cleared/restarted MPD, and have removed all music sources and re-added, as well as regenerating the library and album art.

I can't find any way to get Moode to flush the old IP for the NAS. I do have ssh access, but not enough knowledge of the bowels of Moode to work out which bit to poke Smile

Any pointers gratefully received. I'd rather solve this elegantly, but if need be I'll try shoving everything back on the previous IPs manually. It's only a small home LAN, so not the end of the world, but ... I'm assuming that shouldn't be necessary.

Thanks.
Reply
#2
@Snags

I don't know DS Audio nor can I easily set up to test with it here because I'm not running a Synology NAS with Audio Station installed. The Synology documentation is obfuscatory. Is DS Audio a UPnP Control Point?

If moOde is running as UPnP Renderer then it's getting its track info from the Control Point. Yes, it keeps that info in its queue or saves it to a named playlist but you can easily clear either.

I'm thinking it may be your DS Audio app which is holding on to stale information.

Regards,
Kent
Reply
#3
(08-16-2020, 12:57 PM)TheOldPresbyope Wrote: @Snags

I don't know DS Audio nor can I easily set up to test with it here because I'm not running a Synology NAS with Audio Station installed. The Synology documentation is obfuscatory. Is DS Audio a UPnP Control Point?

If moOde is running as UPnP Renderer then it's getting its track info from the Control Point. Yes, it keeps that info in its queue or saves it to a named playlist but you can easily clear either.

I'm thinking it may be your DS Audio app which is holding on to stale information.

Regards,
Kent

I'm as sure as I can be that it isn't DS Audio, as it can stream absolutely fine to other target players. However, there's almost no way to actually prove/test that - it simply sees Moode advertising as a player on the LAN, and allows you to choose it as the 'target'. If the Pi is off, or if I'm on a different LAN, or out and about, it won't be offered as an option.

DS Audio also doesn't connect via IP. One either accesses it through a web interface direct to the browser, or via a Synology broker service (which also supports access from outside the LAN, as long as you have the correct credentials) so any IP data it gets will be from the NAS itself, and the NAS knows its current IP.

Also, when performing certain actions directly within Moode I'm getting the same behaviour - an MPD error which is attempting to pull data from the previous IP of the NAS, rather than the current one. Which would make sense if Moode has retained that IP against at least some actions.

I think I'll have to dust off my linux knowledge (always relatively limited) and go searching at the CLI. I may be some time Smile
Reply
#4
P.S. (Sorry to double-post) I agree about the rather perfunctory nature of the Synology docs around some of the packages. They're very much at the "Do this and it works" level, and the rest is black box. Which is mostly fine, because mostly it does work, but it isn't helpful for proper diagnosis and exclusion testing etc.
Reply
#5
If you configured moOde to use DHCP then the IP addresses that are assigned are coming from your Router's DHCP service.

Post the Moode startup log. It prints the IP address assignments.

Code:
moodeutl -l
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
@Snags

Quote:I'm as sure as I can be that it isn't DS Audio, as it can stream absolutely fine to other target players.

This the thing. A UPnP Control Point does not "stream" to a UPnP Renderer, it sends track URLs or playlists which contain URLs, with the URLs referencing tracks on some UPnP Media Server. The UPnP Renderer uses this information to get the track directly from the referenced UPnP Media Server.

Yes, UPnP has its own discovery protocol but only to discover UPnP resources and to get their related IP/DNS information. To quote from the Internet bible (Wikipedia): "UPnP assumes the network runs Internet Protocol (IP) and then leverages HTTP, on top of IP, in order to provide device/service description, actions, data transfer and eventing." The URLs I mention above are classic HTTP stuff.

The more I read about DS Audio the more I get the impression of a Swiss army knife. Besides acting as a UPnP Control Point it apparently also can store tracks locally and "stream" them via Bluetooth or Airplay.

'nuff said about DS Audio.

Regards,
Kent
Reply
#7
Thanks Tim - I understand about DHCP, part of the day job is implementing and managing networks, so DHCP, DNS, reservations etc. are all familiar territory, albeit on AD or similar rather then *nix.

The Pi is currently on 192.168.0.13
The NAS is currently on 192.168.0.3
Previously the NAS was on 192.168.0.45

Moode log file (includes a couple of library rebuilds):

20200815 152629 worker: -- Start
20200815 152629 worker: Successfully daemonized
20200815 152629 worker: Integrity check (passed)
20200815 152629 worker: Session loaded
20200815 152629 worker: Debug logging (off)
20200815 152629 worker: Device raw: (0:IQaudIODAC|1:empty|2:empty|3:empty
20200815 152629 worker: Device i2s: (IQaudIO Pi-DAC+)
20200815 152629 worker: Device mpd: (0:IQaudIO Pi-DAC+)
20200815 152629 worker: Device ses: (0|IQaudIO Pi-DAC+|Digital|0%)
20200815 152630 worker: ALSA Digital volume set to (0%)
20200815 152630 worker: -- System
20200815 152632 worker: Host (moode)
20200815 152632 worker: moOde (6.7.0 2020-07-19)
20200815 152632 worker: RaspiOS (10.3)
20200815 152632 worker: Kernel (5.4.51-v7+ #1325)
20200815 152632 worker: Platform (Pi-3B 1GB v1.2)
20200815 152632 worker: ARM arch (armv7l, 32-bit kernel)
20200815 152632 worker: MPD ver (0.21.24)
20200815 152632 worker: CPU gov (ondemand)
20200815 152632 worker: USB boot not enabled yet
20200815 152632 engine-mpd: Connection to MPD failed
20200815 152632 worker: File system not expanded yet
20200815 152632 worker: HDMI port on
20200815 152633 worker: File check (OK)
20200815 152633 worker: -- Network
20200815 152633 worker: eth0 exists
20200815 152633 worker: eth0 wait 0 for IP address
20200815 152636 worker: eth0 wait 1 for IP address
20200815 152639 worker: eth0 wait 2 for IP address
20200815 152642 worker: eth0 wait 3 for IP address
20200815 152645 worker: eth0 wait 4 for IP address
20200815 152648 worker: eth0 address not assigned
20200815 152649 worker: wlan0 exists
20200815 152649 worker: wifi country (GB)
20200815 152649 worker: wlan0 trying SSID (YTheBigPaws)
20200815 152649 worker: IP addr (192.168.0.13)
20200815 152649 worker: Netmask (255.255.255.0)
20200815 152649 worker: Gateway (192.168.0.1)
20200815 152702 worker: Pri DNS (192.168.0.1)
20200815 152702 worker: Domain (None)
20200815 152702 worker: -- Audio
20200815 152703 worker: MPD conf updated
20200815 152703 worker: ALSA outputs unmuted
20200815 152703 worker: ALSA card number (0)
20200815 152703 worker: Audio output (IQaudIO Pi-DAC+)
20200815 152703 worker: Audio formats (S16_LE, S24_LE, S32_LE)
20200815 152703 worker: ALSA mixer name (Digital)
20200815 152703 worker: MPD volume control (software)
20200815 152704 worker: Hdwr volume controller exists
20200815 152704 worker: Max ALSA volume (100%)
20200815 152704 worker: Reset renderer active flags
20200815 152704 worker: -- MPD
20200815 152704 worker: MPD started
20200815 152704 worker: MPD accepting connections
20200815 152704 worker: Configure MPD outputs
20200815 152704 worker: MPD output 1 ALSA default (on)
20200815 152704 worker: MPD output 2 ALSA crossfeed (off)
20200815 152704 worker: MPD output 3 ALSA parametric eq (off)
20200815 152704 worker: MPD output 4 ALSA graphic eq (off)
20200815 152704 worker: MPD output 5 ALSA polarity inversion (off)
20200815 152704 worker: MPD output 6 ALSA bluetooth (off)
20200815 152704 worker: MPD output 7 HTTP stream (off)
20200815 152704 worker: MPD crossfade (off)
20200815 152704 worker: -- Feature availability
20200815 152704 worker: Source select (available)
20200815 152704 worker: Source select (source: MPD)
20200815 152704 worker: Source select (output: IQaudIO Pi-DAC+)
20200815 152704 worker: Bluetooth (available)
20200815 152704 worker: Airplay renderer (available)
20200815 152704 worker: Spotify renderer (available)
20200815 152704 worker: Squeezelite renderer (available)
20200815 152704 worker: UPnP renderer (available)
20200815 152704 worker: UPnP renderer (started)
20200815 152704 worker: DLNA server (available)
20200815 152704 worker: UPnP browser (available)
20200815 152705 worker: UPnP browser (started)
20200815 152705 worker: Audio scrobbler (available)
20200815 152705 worker: GPIO button handler (available)
20200815 152705 worker: -- Music sources
20200815 152705 worker: USB sources (none attached)
20200815 152705 worker: NAS and UPnP sources (mountall initiated)
20200815 152705 worker: -- Miscellaneous
20200815 152705 worker: USB volume knob (Off)
20200815 152705 worker: USB auto-mounter (udisks-glue)
20200815 152705 worker: LED0 (On)
20200815 152705 worker: LED1 (On)
20200815 152705 worker: Saved MPD vol level (0)
20200815 152705 worker: Preamp volume level (0)
20200815 152705 worker: MPD volume level (76) restored
20200815 152706 worker: ALSA Digital volume (100%)
20200815 152706 worker: Auto-play (Off)
20200815 152706 worker: Maintenance interval (3 hrs)
20200815 152706 worker: Screen saver activation (Never)
20200815 152706 worker: Session permissions (OK)
20200815 152706 worker: Watchdog started
20200815 152706 worker: Ready
20200815 153002 worker: Job sourcecfg
20200815 153013 sourceMount(): Mount error: (mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs))
20200815 153049 worker: Job sourcecfg
20200815 153105 worker: Job regen_library
20200815 153105 thmcache: Start
20200815 153105 thmcache: Scanning: NAS, SDCARD, UPNP
20200815 154108 thmcache: mp3: /var/lib/mpd/music/NAS/TheLoft-SMB/Audio Books/Craftlit_bought/Three Men In a Boat/__MACOSX/._ThreeMen-18.mp3
20200815 154108 thmcache: mp3: Zend media exception: File does not contain ID3v2 tag
20200815 155145 thmcache: Done: 5038 album dirs processed
20200815 204210 worker: Job regen_library done
20200816 080934 worker: Job regen_thmcache
20200816 080935 thmcache: Start
20200816 080935 thmcache: Scanning: NAS, SDCARD, UPNP
20200816 080957 thmcache: mp3: /var/lib/mpd/music/NAS/TheLoft-SMB/Audio Books/Craftlit_bought/Three Men In a Boat/__MACOSX/._ThreeMen-18.mp3
20200816 080957 thmcache: mp3: Zend media exception: File does not contain ID3v2 tag
20200816 081214 thmcache: Done: 676 album dirs processed
20200816 084749 worker: Job sourcecfg
20200816 084804 worker: Job regen_library
20200816 084805 thmcache: Start
20200816 084805 thmcache: Scanning: NAS, SDCARD, UPNP
20200816 084832 worker: Job sourcecfg
20200816 084842 thmcache: Done: 676 album dirs processed
20200816 084844 worker: Job sourcecfg
20200816 084850 worker: Job regen_library done
20200816 090047 worker: Job update_library
20200816 090048 thmcache: Start
20200816 090048 thmcache: Scanning: NAS, SDCARD, UPNP
20200816 090130 worker: Job mpdcfg
20200816 090134 thmcache: Done: 676 album dirs processed
20200816 090137 worker: Job update_library done
20200816 091005 worker: Job regen_library
20200816 091006 thmcache: Start
20200816 091006 thmcache: Scanning: NAS, SDCARD, UPNP
20200816 091043 thmcache: Done: 676 album dirs processed
20200816 093345 worker: Job regen_library done
Reply
#8
@TheOldPresbyope Ah! Thank you. I'll freely admit that UPnP is largely a mystery, as in a work context it's always killed off instantly, so I've never gone digging.

I'll go point the finger at DS Audio some more and see if I can make it see sense.
Reply
#9
@TheOldPresbyope @Tim Curtis

Well, oh my life and a slice of humble pie.

Schoolboy error at line one.

Rebooted the NAS, and low and behold it all works. Obviously the Synology DSM doesn't fully update all the internals when it picks up a new IP if it does it 'live' rather than from a boot.

Thank you both, and for the pointers on how UPnP operates, which are now mentally filed, along with a fair amount of blushing that I didn't just reboot everything in the chain before getting to this stage.

SMH.
Reply
#10
Classic.

I had a systems engineer whose first response to every panicky "OMG it was working yesterday but doesn't work today" was 1) is it plugged in and 2) have you rebooted?

Enjoy the music.

Regards,
Kent
Reply


Forum Jump: