X11 connection rejected

Hi,

i am totally new to Mopidy, so bare with me a little bit :smile:
I am trying to install/use mopidy on my kodibuntu machine, Ubuntu.

Installation of the mopidy itself through apt-get went smoothly. No problems.
Then i was playing around with mopidy config in my user .config folder, but had problems with local scan not finding any files - weird. Well, in any case i need mopidy to run as a service so i forgot about my config and went to configure config in /etc/mopidy. Cool.

Then scratched my had on how to actually see current config. mopidy command showed my profile coding. I finally found that i should use “mopidyctl” to work with service stuff. Makes sense.

Tried to see the current config, and i have a problem:

sudo mopidyctl config

Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy

X11 connection rejected because of wrong authentication.
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==0.19.5', 'console_scripts', 'mopidy')()
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 74, in main
    log.setup_logging(config, verbosity_level, args.save_debug_log)
  File "/usr/lib/python2.7/dist-packages/mopidy/utils/log.py", line 51, in setup_logging
    disable_existing_loggers=False)
  File "/usr/lib/python2.7/logging/config.py", line 75, in fileConfig
    cp.read(fname)
  File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /var/log/mopidy/mopidy.log, line: 1
'2015-03-20 08:24:28,378 INFO [29171:MainThread] mopidy.__main__: Starting Mopidy 0.19.5\n'

Please, help me sort this out. Thx

Does your /etc/mopidy/mopidy.conf file contain anything at all? From the exception it sounds like it is quite empty, at least missing a section header.

In ini style config files, the format is like this, with a header before every block of key/value config pairs.

[header]
key = value
key2 = value2

[another_header]
key3 = value3

Hi,

there was indeed problem with the config file. Seems like there was some typo or something.
I’ve deleted everything in the config and added only bare minimum. Now it doesn’t throw errors anymore.
Except for the X11.

Also, I don’t know why no files are found in my local scan.
I’ve created a symlink to my Music folder, which in its root doesn’t have any files. Everything inside Music folder is organised in additional folders. Does mopidy scan the whole tree by default or is there some kind of special setting to let it know it should go deeper?

And when i run scan local i also get this:

ERROR    Script u'323' already taken in index 'numeric' and will be ignored. This is an error in the XML databases.

Support for following symlinks in the local music dir is in the develop branch, which will be released as v1.0 in a few days time.

The error message seems to come from pycountry which is used by Mopidy-Spotify, IIRC. Probably nothing to worry about.

I’ve added a symlink becasue folder /media/MEDIA CENTER/Music was either not found or it was same as with symlink - no files found.

Config of media_dir:

/media/MEDIA\ CENTER/Music

Is this valid?
It doesn’t throw any errors, but it doesn’t find anything either.

I don’t think you need/should escape the space, but I’m not entirely sure.

You are correct. No need to escape.
Works like a charm now.

Thanks! :beers:

I got the same exception but it seems to me that the mopidy.conf file is valid.

setup
rpi 2b, hifiberry dac+, jessie light (release 2016-03-18), mopidy 2.0.0, mopidy-spotify 3.0.0-0mopidy1, ncmpcpp 0.5.10-1.1

I installed mopidy, the extension and the client. Started the server and tried to play some music with the client - without problems. The exception came after a restart of the raspberry and when I tried to start mopidy.

pi@raspberrypi:~ $ mopidy
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==2.0.0', 'console_scripts', 'mopidy')()
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 59, in main
    args.config_overrides)
  File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 81, in load
    raw_config = _load(files, defaults, keyring.fetch() + (overrides or []))
  File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 128, in _load
    parser.readfp(io.BytesIO(default))
  File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: <???>, line: 1
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

pi@raspberrypi:~ $ sudo mopidyctl config
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy

(gst-plugin-scanner:799): GStreamer-WARNING **: Failed to load plugin '/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstximagesrc.so': /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstximagesrc.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==2.0.0', 'console_scripts', 'mopidy')()
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 59, in main
    args.config_overrides)
  File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 81, in load
    raw_config = _load(files, defaults, keyring.fetch() + (overrides or []))
  File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 128, in _load
    parser.readfp(io.BytesIO(default))
  File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: <???>, line: 1
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

pi@raspberrypi:~ $ sudo cat /etc/mopidy/mopidy.conf
[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