You are not logged in.

#1 2014-09-10 23:26:11

noobshit
Member
Registered: 2014-09-10
Posts: 9

[SOLVED] Multiple issues preventing MPD from starting

Hey, Arch noob here. I installed MPD and ncmpcpp according to the Wiki. However, I cannot get MPD to run.

Terminal output after running the mpd --verbose --no-daemon command:

config_file: loading file /etc/mpd.conf
server_socket: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
fatal_error: Failed to set group 45: Operation not permitted

This is the journal output, after systemctl start mpd:

Sep 10 23:37:34 arch sudo[7173]: lightning : TTY=pts/3 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/systemctl start mpd
Sep 10 23:37:34 arch sudo[7173]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 10 23:37:34 arch sudo[7173]: pam_unix(sudo:session): session closed for user root
Sep 10 23:37:35 arch mpd[7176]: server_socket: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
Sep 10 23:37:35 arch mpd[7176]: mapper: Failed to stat directory "/mnt/DATA/Music": Permission denied
Sep 10 23:37:35 arch mpd[7176]: errno: Failed to open database file "/var/lib/mpd/mpd.db": No such file or directory
Sep 10 23:37:35 arch dbus[246]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Sep 10 23:37:35 arch dbus[246]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory.
Sep 10 23:37:35 arch mpd[7176]: state_file: failed to open /var/lib/mpd/mpdstate: No such file or directory
Sep 10 23:37:35 arch mpd[7176]: update: Failed to stat /mnt/DATA/Music: Permission denied

My /etc/mpd.conf, just for kicks:

# See: /usr/share/doc/mpd/mpdconf.example

user "mpd"
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "/var/lib/mpd/playlists"
music_directory "/mnt/DATA/Music"
audio_output {
        type            "alsa"
        name            "Intel [HDA Intel]"
        mixer_type      "software"      # optional
}

DATA is a NTFS partiton mounted to /mnt/DATA through fstab, as explained in the Beginner's Guide (I think).

If you need more information or would like me to change something in this post, feel free to ask.

Thanks!

Last edited by noobshit (2014-09-14 01:00:54)

Offline

#2 2014-09-10 23:40:24

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Multiple issues preventing MPD from starting

https://bbs.archlinux.org/viewtopic.php?pid=1455406
https://wiki.archlinux.org/index.php/Mpd#Setup
 The user mpd cannot access /mnt/DATA/Music.

PS. Instead of colorizing, use [⁣b][⁣/b] bold tags, the dark theme, makes it very hard to read.

Offline

#3 2014-09-11 01:07:39

noobshit
Member
Registered: 2014-09-10
Posts: 9

Re: [SOLVED] Multiple issues preventing MPD from starting

Hmm, So,  could I give the user 'mpd' read/write permissions to DATA or should I setup MPD using the local configuration method?

EDIT: Wording.

Last edited by noobshit (2014-09-11 01:10:31)

Offline

#4 2014-09-11 03:02:21

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Multiple issues preventing MPD from starting

 Whatever suits your needs.

Offline

#5 2014-09-11 22:20:46

noobshit
Member
Registered: 2014-09-10
Posts: 9

Re: [SOLVED] Multiple issues preventing MPD from starting

Turns out this may be a symptom of something bigger. Even though my user account has read/write privileges to all NTFS partitions (according to the fstab and thunar at least), I cannot actually change anything. I can't create a directory, I can't copy something to my home folder (btrfs partition), nothing at all. It always comes back to 'Operation not permitted', whatever that means... Root can't either.

EDIT: I plugged in an USB flash drive (NTFS too, yeah I know, but unfortunately I have to be around a lot of Windows machines, so I need compatibility), and it auto-mounted nicely and everything, but I also couldn't touch it. It said the system was read-only and I couldn't even change the permissions. Seems like this goes beyond Multimedia and Games. Maybe someone could point me to the appropriate forum?

Either way, thank you for your time!

Last edited by noobshit (2014-09-11 22:25:51)

Offline

#6 2014-09-11 22:26:00

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Multiple issues preventing MPD from starting

 You need to mount ntfs partitions with appropriate rights. 'Operation not permitted' means you lack permissions to write to the drives partition.

man mount.ntfs-3g

Edit: How was the usb drive mounted and with what? Are there any hardware switches on it?

Last edited by emeres (2014-09-11 22:28:31)

Offline

#7 2014-09-11 23:00:15

noobshit
Member
Registered: 2014-09-10
Posts: 9

Re: [SOLVED] Multiple issues preventing MPD from starting

I believe the permissions should already be set, according to my fstab:

# /dev/sdb1
UUID=984791e7-1af3-4d5d-9a9b-b1c363a0d73a	/         	btrfs     	rw,relatime,space_cache	0 0

# /dev/sdb5 LABEL=DATA
UUID=480DD2BD2018AB6E	/mnt/DATA     	ntfs      	rw,nosuid,nodev,relatime,uid=lightning,gid=users	0 2

# /dev/sda1 LABEL=Sistema\134x20Reservado
UUID=58C633D5C633B1DC	/mnt/winC     	ntfs      	rw,nosuid,nodev,relatime,uid=lightning,gid=users	0 2

# /dev/sda2
UUID=966A33666A334273	/mnt/win2     	ntfs    	rw,nosuid,nodev,relatime,uid=lightning,gid=users	0 2

# /dev/sda3
UUID=3632E40132E3C449	/mnt/win3     	ntfs      	rw,nosuid,nodev,relatime,uid=lightning,gid=users	0 2

/DATA/Music             /var/lib/mpd/music  none        bind

The usb drive has no hardware switch, and thunar mounted it I believe, through either gvfs or thunar-volman. I did find this entry in journalctl:

Sep 11 22:01:32 arch kernel: ntfs: (device sdd1): load_system_files(): $LogFile is not clean.  Mounting read-only.  Mount in Windows.

Probably because I didn't eject it the last time I used it...

Offline

#8 2014-09-11 23:05:59

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Multiple issues preventing MPD from starting

you dont need write permissions. only read permissions and executable bit to access folders.

your mpd runs as user "mpd" but your ntfs mount is accessible to user lightning and group users only.
the least troublesome solution is to run mpd as your own user... (which will also solve the next issue that will come up: audio not working)

Last edited by Rasi (2014-09-11 23:07:29)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#9 2014-09-11 23:11:30

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Multiple issues preventing MPD from starting

 I would use dmask=002 and fmask=113 and windows_names option.
https://wiki.archlinux.org/index.php/Ntfs#Installation

Edit: But probably not in your case OP.

Last edited by emeres (2014-09-11 23:18:45)

Offline

#10 2014-09-11 23:40:40

noobshit
Member
Registered: 2014-09-10
Posts: 9

Re: [SOLVED] Multiple issues preventing MPD from starting

I will try and set up mpd as my user, then.

Eventually I'll try to remount the partitions using ntfs-3g as the type and and regenerate the fstab.

Thank you.

Offline

#11 2014-09-14 00:34:01

noobshit
Member
Registered: 2014-09-10
Posts: 9

Re: [SOLVED] Multiple issues preventing MPD from starting

I think MPD is working now. I'd like to leave a solution to other noobs, but in the end the problems were just so many rookie mistakes involved I can't even attempt to write them here. And the shame too.

Anyway, I ended up removing MPD and starting all over again, setting it up on my user account. Setting ntfs-3g as the partition type in fstab took care of my permission problems. From there on all I did was tinker with the mpd.conf file until it worked. I think I'm going to have a lot of trouble with my database due to the way my music folder is structured, and it's size (over 18000 tracks). But that's something to tackle next.

Thanks to all you guys for the help!

Offline

#12 2014-09-14 00:46:39

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Multiple issues preventing MPD from starting

 To restructure your music library you can use MusicBrainz Picard for example, and there are many other tools. Should you consider this issue solved, then please mark the thread as such.

Offline

#13 2014-09-14 00:59:15

noobshit
Member
Registered: 2014-09-10
Posts: 9

Re: [SOLVED] Multiple issues preventing MPD from starting

Yep, just wanted to give it a go with ncmpcpp before marking it solved. Turns out it worked right out of the box! Awesome.

Thanks/

Offline

#14 2014-09-14 10:09:39

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Multiple issues preventing MPD from starting

the only thing important to mpd are the tags. make sure tags are filled in for all tracks.

18000 tracks should not be an issue. i have 30k tracks and its fluid. I also made tests with 100k tracks. no issues at all.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB