mpd won't properly install untill localhost changed to in /etc/mpd.conf

Bug #332332 reported by Tiva on 2009-02-21
This bug affects 44 people
Affects Status Importance Assigned to Milestone
Music Player Daemon
Fix Released
mpd (Debian)
Fix Released
mpd (Ubuntu)
Alessio Treglia

Bug Description

I am using Jaunty AMD64 Xubuntu fully updated.

this bug happened in the mpd 0.13 -> 0.14 update.

attempting a normal apt-get install of mpd on Jaunty leads to the following:

$ sudo apt-get install mpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/180kB of archives.
After this operation, 545kB of additional disk space will be used.
Selecting previously deselected package mpd.
(Reading database ... 199197 files and directories currently installed.)
Unpacking mpd (from .../mpd_0.14.2-2ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Setting up mpd (0.14.2-2ubuntu1) ...
* Starting Music Player Daemon mpd * creating /var/lib/mpd/tag_cache...
unable to bind port 6600: Address already in use
maybe MPD is still running?
Trace/breakpoint trap (core dumped)
invoke-rc.d: initscript mpd, action "start" failed.
dpkg: error processing mpd (--configure):
subprocess post-installation script returned error exit status 133
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

The fix is to edit /etc/mpd.conf and change the bind_to_address from "localhost" to "" - thanks to BwackNinja for the info

after the change a:
sudo dpkg --configure -a
fixes the installation and allows MPD to properly bind to the port.

Thomas Coppi (tcoppi) wrote :

Is there an entry in /etc/hosts for localhost to point to ?

Tiva (ugkbunb) wrote :


waldschrat (unumsaxum) wrote :

I can confirm that bug.
Same version, same bug, same fix.

But there is one strange thing:
when using the original mpd.conf with
bind_to_address set to "localhost",
even thought mpd does not install properly, it starts up well on system startup. Only when restarting it by "/etc/init.d/mpd restart" (this is exactly what dpkg does) the bug occurs.

H. Stephan

Charlie Kravetz (charlie-tca) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in mpd (Ubuntu):
importance: Undecided → Medium
status: New → Triaged

 status inprogress
 assignee quadrispro

Alessio Treglia <email address hidden>
Ubuntu MOTU Developer | Homepage:
0FEC 59A5 E18E E04F 6D40 593B 45D4 8C7C DCFC 3FD0

Changed in mpd (Ubuntu):
assignee: nobody → quadrispro
status: Triaged → In Progress
Alessio Treglia (quadrispro) wrote :

The patch should solve this and the package has been built fine in my PPA, please use it for testing.

Changed in mpd (Ubuntu):
assignee: Alessio Treglia (quadrispro) → nobody
status: In Progress → New
Iulian Udrea (iulian) wrote :

I would like to see some testing using that patch before approving it.

Alessio Treglia (quadrispro) wrote :

I'm using a chroot for tests and ALSA doesn't work correctly, so at the moment I can't do any useful test.

StefanPotyra (sistpoty) wrote :

hm... why is working, but not localhost?

Thanks for testing, but I don't think a chroot can produce any reliable result for this bug. Can you repeat your tests in a non-chroot environment?

P.S.: I just took a glimpse at -3ubuntu1, please make sure to use a real address as changelog entry in the future (current one: Ubuntu Merge-o-Matic <email address hidden>). Thanks.

The PPA fixes the issue for me in a fresh jaunty installation.

Alessio Treglia (quadrispro) wrote :
Alessio Treglia (quadrispro) wrote :

Stephan, really I don't why it doesn't work with localhost, probably we should forward this to upstream || debian.

About the last upload, I'm sorry, it was my little mistake :)

fabtagon (fabtagon) wrote :

I can't confirm that bug on Debian Testing (mpd 0.14.2-3).

StefanPotyra (sistpoty) wrote :

I also don't have the slightest clue why would work but localhost not, and I fear that this fix is at best a workaround.

However at this stage, if the workaround is working (as testing seems to indicate), let's go for it, and try to address the real problem in karmic.

Feel free to upload, but please also watch out for other upgrade problem reports, in case this was not a good workaround, thanks.

Changed in mpd (Ubuntu):
status: New → Confirmed
Changed in mpd (Ubuntu):
assignee: nobody → andreas-wenning
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mpd - 0.14.2-3ubuntu2

mpd (0.14.2-3ubuntu2) jaunty; urgency=low

  * Change bind_to_address from localhost to (LP: #332332).

 -- Alessio Treglia <email address hidden> Sun, 12 Apr 2009 11:41:14 +0200

Changed in mpd (Ubuntu):
status: In Progress → Fix Released
Max Kellermann (max-duempel) wrote :

That is not a fix, because this breaks IPv6 support.

Alessio Treglia (quadrispro) wrote :

I've just uploaded the merge with latest debian version to my testing PPA, please test it.

deb karmic main

Changed in mpd (Ubuntu Karmic):
assignee: Andreas Wenning (andreas-wenning) → Alessio Treglia (quadrispro)
status: Fix Released → In Progress
Steve Langasek (vorlon) wrote :

Has this bug really been in progress since June? Has no one tested the PPA?

Kiri (kiri) wrote :

I was going to test this package but it is not in the PPA.

Alessio Treglia (quadrispro) wrote :

I'm updating the merge, uploading to my PPA.

Alessio Treglia (quadrispro) wrote :

It's ready, please test.

Alessio Treglia (quadrispro) wrote :

Looks working fine, attaching install log.

Scott Kitterman (kitterman) wrote :

Up until Universe final freeze, this doesn't need an FFe. Unsubscribing motu-release.

Alessio Treglia (quadrispro) wrote :

Ok, I'm going ahead.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mpd - 0.15.4-1ubuntu1

mpd (0.15.4-1ubuntu1) karmic; urgency=low

  * Merge from debian unstable, Ubuntu remaining changes:
    - debian/control:
      + Don't build-depends on libmikmod2-dev (Debian bug #510675).
      + Move avahi-daemon from Suggests field to Recommends field.
    - debian/mpd.init.d:
      + Read mpd user from mpd.conf.
  * Also fixes LP: #332332.

mpd (0.15.4-1) unstable; urgency=low

  * New upstream release (Closes: #550757)

mpd (0.15.3-1.1) unstable; urgency=low

  * Non-maintainer upload.
  * Apply patch taken from upstream to workaround tremor headers
    (Closes: #547525)

mpd (0.15.3-1) unstable; urgency=low

  * New upstream release

mpd (0.15.2-1) unstable; urgency=low

  * New upstream release

mpd (0.15.1-1) unstable; urgency=low

  * New upstream release
    - Fix crash on discarding db with bad charset (Closes: #535076)
  * Re-enable ffmpeg (Closes: #534726)

mpd (0.15-2) unstable; urgency=low

  * Enable SQLite, libcue, sidplay, and libmms.
  * Enable state file by default in mpd.conf.

mpd (0.15-1) unstable; urgency=low

  * New upstream release

mpd (0.15~beta2-1) experimental; urgency=low

  * New upstream release
  * Nicer message when systemwide daemon is disabled (Closes: #521701,
  * Update mpd.conf from upstream
    - Configure an ALSA output by default
  * Fix section of mpd-debug

mpd (0.15~beta1-1) experimental; urgency=low

  * New upstream beta release

mpd (0.15~alpha1-1) experimental; urgency=low

  * New upstream alpha release

 -- Alessio Treglia <email address hidden> Fri, 23 Oct 2009 12:38:20 +0200

Changed in mpd (Ubuntu Karmic):
status: In Progress → Fix Released

Alessio, according to bug 500001 and after checking the latest source package (0.15.4-1ubuntu1) this doesn't look like being fixed.
In mpd.conf there's still 'bind_to_address "localhost"'
Could you please take a look at this ?


Changed in mpd (Ubuntu):
status: Fix Released → In Progress
Alessio Treglia (quadrispro) wrote :

Forwarded to Debian.

Changed in mpd (Ubuntu):
status: In Progress → Triaged
assignee: Alessio Treglia (quadrispro) → nobody
Changed in mpd (Debian):
status: Unknown → New
David Futcher (bobbo) on 2010-06-08
tags: added: patch-forwarded-debian
Fabián Rodríguez (magicfab) wrote :

The comments in the config file indicate "any" should be the default value. MPD started fine once I set it to "any".

# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
bind_to_address "any"

So, I guess this should be reverted back to "any".

I was using 10.04 LTS in my tests.

Mark Nevill (nevillm) wrote :

This Bug is *still* present in Ubuntu Lucid (mpd 0.15.4-1ubuntu3).

@Fabián: The recommendation is problematic, as it will allow remote users to control your mpd. Do *NOT* set your bind_to_address to "any" unless you know what you are doing.

Changed in mpd (Debian):
status: New → Won't Fix
Florian Schlichting (fschlich) wrote :

The problem is really in /etc/hosts, but mpd 0.15 released with a workaround ("bind failure on secondary address is non-fatal")

Changed in mpd (Ubuntu):
status: Triaged → Fix Released
Changed in mpd:
importance: Undecided → Unknown
status: New → Unknown
Changed in mpd:
status: Unknown → Fix Released
Changed in mpd (Debian):
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.