host setting is not recognized from config file [file permission problem]

Bug #1056738 reported by H.-Dirk Schmitt on 2012-09-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mpd-sima (Ubuntu)
Undecided
kaliko

Bug Description

Use stock mpd-sima package.
Edit /etc/mpd-sima.cfg to change host from localhost to our mpd server.

service mpd-sigma restart
--> 2012-09-26 11:38:09 - ERROR Unable to connect to MPD on localhost!

Try to start for debugging with: sudo -u mpd-sima /usr/bin/mpd-sima --var_dir=/var/lib/mpd-sima/ --config=/etc/mpd-sima.cfg
--> same result

Now set host explicitely: sudo -u mpd-sima /usr/bin/mpd-sima --host=mpd.computer42.org --var_dir=/var/lib/mpd-sima/ --config=/etc/mpd-sima.cfg
--> works

[see #6 - this was triggered by strict permissions on /etc/mpd-sima.cfg and a missing error message]

Drop in the package from quantal.
The problem is solved here.
A possible solution is to backport the quantal package.

tags: added: precise

Quantal package hides only the problem:

2012-09-26 11:51:06 - INFO Env. variable MPD_HOST set to "mpd.computer42.org"
2012-09-26 11:51:06 - INFO Env. variable MPD_PORT set to "6600".
2012-09-26 11:51:06 - INFO Loading configuration from: /etc/mpd-sima.cfg
2012-09-26 11:51:06 - INFO Using database "/var/lib/mpd-sima/sima.db"
2012-09-26 11:51:06 - INFO About to connect to mpd.computer42.org:6600

If started without this environment settings the problem still exists.
sudo -u mpd-sima /usr/bin/mpd-sima --config=/etc/mpd-sima.cfg --var_dir=/var/lib/mpd-sima/

2012-09-26 11:53:51 - INFO Starting MPD_sima version 0.9.2 (revision 617 - 2012-02-27 00:19:09)
2012-09-26 11:53:51 - INFO Loading configuration from: /etc/mpd-sima.cfg
2012-09-26 11:53:51 - INFO Using database "/var/lib/mpd-sima/sima.db"
2012-09-26 11:53:51 - INFO About to connect to localhost:6600
2012-09-26 11:53:51 - CRITICAL Player error: Could not connect to "localhost:6600": Connection refused

tags: added: quantal

Also a restart shows the same problem.
The environment variables are only propagated if started from 'apt-get upgrade'
As a workaround I set this variables now in /etc/default/mpd-sima

Problem is the example configuration shipped with mpd-sima: /usr/share/doc/mpd-sima/examples/all_settings.cfg

This file has the setting:

    password = false

Dropping this line fixes the problem

kaliko (mxondebian) wrote :

Le 26/09/2012 13:01, H.-Dirk Schmitt wrote :
> Problem is the example configuration shipped with mpd-sima:
> /usr/share/doc/mpd-sima/examples/all_settings.cfg
>
> This file has the setting:
>
> password = false
>
> Dropping this line fixes the problem

This is wrong indeed, thanks for noticing, I'll fixed that upstream.

But be aware I cannot reproduce the behavior you describe.

FYI, the priority order concerning MPD host is the following:
 0/ localhost (default)
 1/ environment variable MPD_HOST if set
 2/ configuration file
 3/ command line

For instance if MPD_HOST is set to myhost.lan but you provide another
value, let's say mpd.server.org in the configuration file or on the
command line then myhost.lan is overridden and mpd.server.org is used
instead.

Thanks for your report.
Cheers,
K

Changed in mpd-sima (Ubuntu):
assignee: nobody → kaliko (mxondebian)

The underlying problem was that the configuration file couldn't be read by the mpd-sima user.
In the current 0.9.x versions this was problem was silently suppressed.

In the upcoming 0.10.x version this problem will be shown in a clear error message:

mpd_sima: error: no read access to "/etc/mpd-sima.cfg"

summary: - host setting is not recognized from config file
+ host setting is not recognized from config file [file permission
+ problem]
description: updated
Kaliko Jack (efrim) wrote :

Alright, Thanks for your feedback on this issue.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mpd-sima - 0.10.0-2

---------------
mpd-sima (0.10.0-2) unstable; urgency=low

  * Set package priority to optional.

 -- Geoffroy Youri Berret <email address hidden> Tue, 21 May 2013 18:35:59 +0200

Changed in mpd-sima (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers