When your mpd reports 'Error reading db, fgets'

This morning our mp3 server at work ran out of disk space entirely, which caused mpd to stop (we run mpd, icecast with the Pitchfork frontend off a Debian server over our stereo system in the office. It's great except for the terrible music that often gets played).

After clearing some space (also known as deleting aforementioned terrible music), I was unable to start mpd simply with /etc/init.d/mpd start. The error I received was 'Error reading db, fgets'.

There wasn't much around on the internet about why this happens, but it doesn't take a genius to figure that the mpd database either got corrupted or simply became unavailable due to the lack of disk space.

The solution: run mpd --create-db from the command line, which forces the database to recreate itself. Once this is finished, you should be able to run /etc/init.d/mpd start without any problems.

Edit: Had issues with icecast after this as well. Restarting didn't help, had to kill a rogue process and it automagically recovered..

Comments

Thanks, the mpd fix helped me out.

Anonymous (not verified)
Tue, 09/16/2008 - 04:46

Glad to hear it! :)

diveli
Tue, 09/16/2008 - 14:25

thanks :)

zo (not verified)
Sat, 11/15/2008 - 08:28

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.