You are not logged in.

#1 2008-02-15 03:13:37

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

MPD failed to create-db [SOLVED]

Hey,

I've just been trying to install/setup MPD following the wiki but got a great big [FAIL]

I copied /etc/mpd.conf.example to /etc/mpd.conf and added my music directory "/home/ash/Documents/Music"
and moved on to the next step:

"/etc/rc.d/mpd create-db" and this is the error I got.

[root@breakage ash]# /etc/rc.d/mpd create-db
:: Creating mpd's database ...    [BUSY]
cannot open music_directory "/home/ash/Documents/Music/" (config line 11): Permission denied [DONE]

This is my "/etc/mpd.conf" well the unmarked parts:

music_directory                 "/home/ash/Documents/Music"
playlist_directory              "/var/lib/mpd/playlists"
db_file                         "/var/lib/mpd/mpd.db"
log_file                        "/var/log/mpd/mpd.log"
error_file                      "/var/log/mpd/mpd.error"

pid_file                        "/var/run/mpd/mpd.pid"

state_file                      "/var/lib/mpd/mpdstate"

user                            "mpd"

bind_to_address                 "127.0.0.1"

I've read though the steps on this thread http://bbs.archlinux.org/viewtopic.php?id=41131
but still can't get it to work!

Please help I can't live without mpd/ncmpc :'(((

Last edited by Breakage (2008-02-15 04:42:19)

Offline

#2 2008-02-15 03:38:42

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: MPD failed to create-db [SOLVED]

Does user "mpd" have permission to access that music directory? (Maybe set the user to "ash" instead.)


I am a gated community.

Offline

#3 2008-02-15 03:44:36

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

Re: MPD failed to create-db [SOLVED]

How do I check if user "mpd" has the permissions?

I just changed user "mpd" to user "ash" and got another error:

[ash@breakage ~]$ sudo /etc/rc.d/mpd create-db
:: Creating mpd's database ... [BUSY]
Can't create db file in "/var/lib/mpd": Permission denied [DONE]

Offline

#4 2008-02-15 03:52:20

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: MPD failed to create-db [SOLVED]

Try this in your /etc/mpd.conf

######################## REQUIRED PATHS ########################
music_directory                 "/home/ash/music"
playlist_directory              "/home/ash/.mpd/playlists"
db_file                         "/home/ash/.mpd/mpd.db"
log_file                        "/home/ash/.mpd/mpd.log"
error_file                      "/home/ash/.mpd/mpd.error"

Haven't been here in a while. Still rocking Arch. smile

Offline

#5 2008-02-15 04:10:34

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

Re: MPD failed to create-db [SOLVED]

Sigi, thanks that worked it created the db with user "ash" also tried with user "mpd" that didn't work.

But there is another problem sad

[ash@breakage ~]$ /etc/rc.d/mpd start
:: Starting Music Player Daemon                                          [FAIL]
[ash@breakage ~]$ sudo /etc/rc.d/mpd start
:: Starting Music Player Daemon                                          [FAIL]

Last edited by Breakage (2008-02-15 04:13:57)

Offline

#6 2008-02-15 04:14:53

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: MPD failed to create-db [SOLVED]

Maybe it's already running so it cannot bind to the proper port?

So check what the command 'mpd' prints (its more verbose than the init script), and also check the logfiles at ~/.mpd/mpd.log

Last edited by vogt (2008-02-15 04:15:58)

Offline

#7 2008-02-15 04:16:03

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

Re: MPD failed to create-db [SOLVED]

mpd gives:

[ash@breakage ~]$ mpd
could not open pid_file "/var/run/mpd/mpd.pid" (at line 27) for writing: Permission denied

Edit: and mpd.log is blank.

Last edited by Breakage (2008-02-15 04:17:08)

Offline

#8 2008-02-15 04:18:09

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: MPD failed to create-db [SOLVED]

Sigi missed pid_file and state file (or just don't keep the default /var/*) ; you need this in your /etc/mpd.conf or ~/.mpdconf

playlist_directory              "~/.mpd/playlists"
db_file                         "~/.mpd/mpd.db"
log_file                        "~/.mpd/mpd.log"
error_file                      "~/.mpd/mpd.error"
################################################################


######################## OPTIONAL PATHS ########################
#
# If you wish to use mpd --kill to stop MPD, then you must
# specify a file here in which to store MPD's process ID.
#
pid_file                        "~/.mpd/mpd.pid"

state_file                      "~/.mpd/mpdstate"

Last edited by vogt (2008-02-15 04:19:11)

Offline

#9 2008-02-15 04:21:55

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

Re: MPD failed to create-db [SOLVED]

woot :)) <3 thanks guys, after all that hassle it works :D now to add it to deamons.

Last edited by Breakage (2008-02-15 04:22:35)

Offline

#10 2008-02-15 05:46:20

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: MPD failed to create-db [SOLVED]

vogt wrote:

Sigi missed pid_file and state file

Indeed, sorry. I'm glad that you solved it anyway.


Haven't been here in a while. Still rocking Arch. smile

Offline

Board footer

Powered by FluxBB