Web client refuses connection

Hi There,

I have a PI 2 running raspbian jessie and have installed mopidy version 2. Systemd seems to believe that I have started the process…

Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Starting Mopidy audio
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Audio output set to "autoaudiosink"
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO No local library metadata cache found at /var/lib/mopidy/local/library.jso…essage.
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Loaded 0 local tracks using json
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Starting Mopidy core
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO MPD server running at [::ffff:127.0.0.1]:6600
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO HTTP server running at [::ffff:127.0.0.1]:6680
Jul 10 15:45:28 raspberrypi mopidy[4844]: INFO Starting GLib mainlo

There does appear to be an HTTP server running and this fits with the config that I have set up.

[> core]

cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[local]
data_dir = /var/lib/mopidy/local
media_dir = /var/lib/mopidy/media

[m3u]
playlists_dir = /var/lib/mopidy/playlists

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

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

I have built up the config based on the basic settings to this point and do know where to turn from here to debug. I am sort of convinced I have done something silly and it is probably hding in plain sight for everyone to see, but when I connect to the server I get the following error in chrome:

192.168.1.109 refused to connect.

I have tried implementing pi musicbox as well which works fine with similar config and no problems at all.
So, if you can spot my stupid mistake I’d appreciate a pointer as to where to look next…

Cheers
Peter

This will listen on the local loopback interface and won’t be accessible from other machines on your network. Mopidy-HTTP — Mopidy 3.2.0-3-gb10f3115 documentation has a warning at the top explaining why and you’ll probably want to change the setting to 0.0.0.0

Thankyou kingosticks that does look like the sort of obvious thing that I have overlooked but it must be something else as changing the server to 0.0.0.0 produces the same result.

So just to double check: you changed the http hostname setting to 0.0.0.0, restarted mopidy on your raspberry pi, saw in the log that the http serer had changed to now run on 0.0.0.0:6680 and you visited http://192.168.1.109:6680 or http://raspberrypi:6680 in your browser, and it still cannot connect?

Did you install a firewall on your raspberry pi?

Yes thanks that’s right. Stopping and restarting mopidy didn’t do it. But a reboot of the PI did. I don’t see why that would work it was a bit of a desparate measure. I’ll play with it now and see if it fails again. I appreciate your help.

Yes, restarting should be all that is required. Perhaps there was some confusion between running mopidy as a service and as your user and the wrong instance was restarted? https://docs.mopidy.com/en/latest/service/

Yes, that is possible. I did figure out the difference but I’m thinking that I must have confused myself.