Pi musicbox - saw interface once (no content), now unauthorized

Hi,

I have a RPi3 connected to a screen, with pi musicbox installed on one partition.
I have windows 10 on a laptop.

When I launched the pi3 first ime, I selected pi musicbox and I was able to connect using the default credentials.
However, I had not set the wifi. So I turned off the pi, took the sd card, plugged into my Win10, edited the settings to add the wifi SSID and key. I also put the spotify login and password as well as the info for web-client for spotify and soundcloud.

I rebooted the pi3 with the sd card and I saw the IP address this time. I logged in and on my windows I tried to access http://musicbox.local/

success !
however, no content was displayed, i wasnt able to see my playlists or anything else.
I tried clicking the menu and see what else is there, but after a while, the page displayed an error, page not accessible anymore.
tried with the IP directly, nothing.
rebooted the pi, same, couldnt access anymore.

tried connected a wire to the pi, same, not able to access http://musicbox.local/ anymore.

I am able to login on my musicbox from my pi3, but thats all.

any thing I can do ?

edit : tried again:
-reinstalled everything,
-then opened sd card from laptop, edited settings.ini to put wifi password and spotify credentials.
-back to pi3, booted, logged in with root/musicbox credentials.
-back to laptop, tried accessing musicbox.local, worked, then activated the spotify settings,
-asked me to reboot pi, which I did,
-loged in on pi with root/musicbox
-back to laptop to access musicbox.local or via ip, didnt work
-checked service mopidy status on pi, told me running

I am able to ping my pi 192.168.178.95 with success
using v0.7.0RC4

here my logs (today at 14:31- GMT+2)

/var/log/musicbox_startup.log 

************************
Initializing MusicBox...
************************
Setting sound configuration...
* Found internal device: card0
    HDMI output connected
* Found internal device: card0
    HDMI output connected
Card=  i2s=  output=auto  usb=  intc=0
No output was specified/found, falling back to auto detection
Card=0  i2s=  output=hdmi  usb=  intc=0
Using audio card0 (hdmi)
MusicBox name is musicbox
ifup: interface wlan0 already configured
Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/b8:27:eb:e5:5c:4d
Sending on   LPF/eth0/b8:27:eb:e5:5c:4d
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.178.1 port 67
Reloading /etc/samba/smb.conf: smbd only.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/b8:27:eb:b0:09:18
Sending on   LPF/wlan0/b8:27:eb:b0:09:18
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.178.1 port 67
Reloading /etc/samba/smb.conf: smbd only.
done.
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
Starting Dropbear SSH server: dropbear.
Starting daemon monitor: monit.
***********************************************************************************
My IP address is 192.168.178.95
Connect to me in your browser at http://musicbox.local or http://192.168.178.95
***********************************************************************************




/var/log/mopidy/mopidy.log

2017-08-13 10:58:29,158 - WARNING  404 GET /favicon.ico (192.168.178.21) 14.93ms
2017-08-13 10:58:38,206 - WARNING  404 GET /settings/js/mopidy.min.js (192.168.178.21) 2.07ms
2017-08-13 10:58:38,213 - WARNING  404 GET /settings/js/simple.js (192.168.178.21) 2.09ms
2017-08-13 10:58:38,603 - WARNING  404 GET /settings/js/mopidy.min.js (192.168.178.21) 2.13ms
2017-08-13 10:58:38,620 - WARNING  404 GET /settings/js/simple.js (192.168.178.21) 2.14ms
2017-08-13 10:58:38,886 - WARNING  404 GET /favicon.ico (192.168.178.21) 2.16ms

what to do now ?

thanks for your help.

ok, some updates if that could help others, and if that could highlight any bugs :

I was able to keep and reach musicbox.local only when on wired cable, not over wifi. no idea why.
what I did was simply put the image on the sd card, run it and not touch the settings.ini
once launched, I quickly go to musicbox.local > settings, then I enable ssh, activate airplay streaming and DLNA/UPnP streaming and choose analog as sound output (I then changed to USB and connected a 1$ usb sound card, coz the sound was aweful with analog jack).

however, despite being accessible (at last!), the web app is unstable for me, at least the spotify part.
I manage to see my playlist, but was never able to see the content of the playlist, nor stream any.
same for radios.

BUT, my main concern was to stream any sounds to the pi, so I did not abandon.
I tried streamwhatyouhear…no success.
I tried another app : tuneblade, and went to the app settings to add the pi.
Wasnt sure which port to add, nor if I had to choose airport, hifi receivers or shairport…
I think it is port 6680, but after some time MusicBox magically appeared on its own in TuneBlade.
I clicked “connect” and…voila ! sound over the air to my pi, connected to my sound system, bye bye Sonos, Hello RaspberryPi+Musicbox

not a perfect set, but totally working !

If any of you want to know more, let me know.
If I can help debugging or else, same, let me know !

Hi there, thanks for your detailed reports. RC5 is the latest version and that includes some firewall fixes which you might want. I can’t yet explain what’s going on with the problematic wifi setup, if you can ping it and if mopidy is running then it should be all OK. Are you using the built in Pi3 wifi?

Can’t explain your Spotify issues either, it’s normally pretty good with a fast Pi3. Do you have a large number of playlists? Are you able to try a different power supply?

thanks for your answer !

using the RC4 to be honest because this is the version that comes with the noob I am using (from noobs.matthuisman.nz).
and the noob install makes several partition and stuff that I am not at ease with to ease up the booting process with a menu etc. I have no idea how to erase the specific parition where Pi MusicBox is installed in order to put the RC5 (since I read that I cannot do updates, I indeed need to reinstall it all). So for the moment I went the easiest way, but if you have any idea on that, I will take it (but it might be off topic I guess).

as for the firewall thingy, I added the following to /etc/rc.local :

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -X 

(when I rebooted, the wired network was not recognized anymore, I rebooted again and this time it worked).

I am using a Pi3 wifi, with a bluetooth dongle for the Rii (keyboard+mouse). And I now added a usb sound card.

I indeed have a VERY large amount of playlists on Spotify, but I couldnt even open the first ones appearing.

I didnt try with a different power supply, how to know for sure if this is a defective one ? I mean, I have been using it with no issue with other Pi applications.

I was wondering about what you meant when you said first partition in your original post. I’m not at all familiar what noobs does, I can only assume it’s doing something sensible with the boot partition. Perhaps I can ask the maintainer to update the version.

Those iptables commands will just disable the firewall but I guess that’s as good as anything while troubleshooting.

The way the Spotify software works is that it starts downloading all playlist and contained track data as soon as it starts. So if the cache is disabled (which it is) it takes a long time to load all that data. It’s possible this is the issue here. If you delete (or comment out) the empty cache setting in the Spotify section of settings.ini then it’ll start using the cache. Historically this has caused performance problems with older slower raspberry pis and some sd cards but it’ll probably fair much better on a rp3.

And you’re right, if all those usb peripherals are being powered ok in your other setup then it must be ok.

yeah, having the latest version on the noob would be helpful ! (basically it works like that : you choose what you want, you download one commandline file, you copy a folder to your sd card, and you boot, it will automatically download everything and install it and create partition and boot setup for you)…

so if I want some firewall, I need to get RC5, right ? (I guess I would prefer to be on the safe side…)
if I want to try back with the firewall under RC4 I just need to remove the lines from /etc/rc.local and reboot or do I need to do new commands ?

i’ll give it a try with cache and see if it works :slight_smile:

EDIT :

  • tried commenting the iptables lines from /etc/rc.local, rebooted, streaming didnt work anymore. so can you confirm with RC5 this is fixed?
  • I tried commenting the cache line under the spotify setting, and still wasnt able to see content of my spotify playlists, but its ok since I can simply run spotify and it will stream any sound to the pi

The changes in RC5 are shown at https://github.com/pimusicbox/pimusicbox/blob/master/docs/changes.rst

The specific firewall changes probably don’t matter unless you are using airplay (which you are, right?).

You’ll also get spotify connect support though, which is a big bonus. Have you tried the spotify functionality after it’s had 5 minutes or so to load? RC5 also has some easy to use debug logging which might be helpful in seeing what the issue is.

sorry I didnt understand this line :

what do you mean ? I am using airplay and UPnP/DLNA yes. Do you mean that because of that I need to disable the firewall ?

Yes, if I remember correctly, in rc4 the firewall incorrectly blocks some of the airplay ports. it seemed to be a particular problem for people using 3rd-party airplay software like the ones you mentioned previously I think. So Yeh, if using rc4 you’ll probably need those extra iptables commands to disable the firewall. In RC5, it’s hopefully fixed. But even if it’s not, then there’s a new setting to enable/disable the firewall and it’s disabled by default. To be honest, most people don’t need a firewall on their home network.