You are not logged in.

#1 2018-08-28 11:28:21

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

[Solved]Trouble with starting mpd service as a user.

I came across this link https://bbs.archlinux.org/viewtopic.php?id=120371 , it is the same issue which I faced. Everytime I run mpd --kill it throws me an error "unable to read pid from file". can someone help me with this?
I'm running

systemctl --user start mpd.service

. Which is failing which led me to the above link.

Last edited by beefshepherd (2018-08-28 18:03:14)

Offline

#2 2018-08-28 12:21:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved]Trouble with starting mpd service as a user.

Post your MPD config as well as the output of

journalctl --user-unit=mpd

, simply from the only error message we have so far, remove the pid line from the config, systemd will take care of keeping track of it even without a pid. Also there are several troubleshooting steps mentioned in that thread, the output of which you haven't provided, post the output of them.

Offline

#3 2018-08-28 12:30:31

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

Re: [Solved]Trouble with starting mpd service as a user.

mpd config:

music_directory		"~/Media/Music"

playlist_directory		"~/.mpd/playlists"

db_file			"~/.mpd/database"

log_file			"syslog"

pid_file			"~/.mpd/pid"

bind_to_address		"any"

port				"6600"

auto_update	"yes"

audio_output {
	type		"pulse"
	name		"pulse audio"
}

Offline

#4 2018-08-28 12:33:02

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

Re: [Solved]Trouble with starting mpd service as a user.

output of journalctl --user-unit=mpd

Aug 28 17:29:00 thinkpad systemd[661]: Starting Music Player Daemon...
Aug 28 17:29:00 thinkpad mpd[1432]: exception: Failed to bind to '[::]:6600'
Aug 28 17:29:00 thinkpad mpd[1432]: exception: nested: Failed to bind socket: Address already in use
Aug 28 17:29:00 thinkpad systemd[661]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Aug 28 17:29:00 thinkpad systemd[661]: mpd.service: Failed with result 'exit-code'.
Aug 28 17:29:00 thinkpad systemd[661]: Failed to start Music Player Daemon.

Offline

#5 2018-08-28 12:42:18

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

Re: [Solved]Trouble with starting mpd service as a user.

I uncommented the pid line in config and ran the config file, with

mpd --stderr mpd.conf

I get the following message

exception: Failed to bind to '[::]:6600'
exception: nested: Failed to bind socket: Address already in use

After I run the

mpd --kill

I get

fatal_error: no pid_file specified in the config file

Offline

#6 2018-08-28 12:58:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved]Trouble with starting mpd service as a user.

Please put information like this into a single post in the future instead of bumping three times. You are likely already starting MPD somewhere, did you enable the system wide service as well? Disable/Stop that.

If that isn't it use something like ss to find out what is blocking the port, FWIW post

systemctl status mpd

Offline

#7 2018-08-28 15:08:58

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

Re: [Solved]Trouble with starting mpd service as a user.

Disabled the systemwide mpd service. That stopped it from using the port. Now started the mpd service with

mpd --stderr mpd.conf

It gave me the following output

exception: Failed to bind to '[::]:6600'
exception: nested: Failed to bind socket: Address already in use

Should I ignore these exceptions? And started the mpd client ncmcpp with

ncmpcpp update

to update the database. It showed me playlist 0 items. What could be the reason? The config for ncmpcpp is as follows

mpd_host = localhost
mpd_port = 6600
mpd_music_dir = ~/Media/Music

Both the dirs match even then it is unable to recognize the files in the directory.

Offline

#8 2018-08-28 15:16:41

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

Re: [Solved]Trouble with starting mpd service as a user.

Pressed 4 and it showed me the files in the directory. Anyways thanks for your awesome help @v1del. Hopefully the dbz franchise comes back with a new season smile

Offline

#9 2018-08-28 15:17:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,842

Re: [Solved]Trouble with starting mpd service as a user.

The address usage is "normal" and an IPv4 ./. IPv6 thing, you can ignore that.

Edit, disregard this now
What's the output of "mpc stats"?

Last edited by seth (2018-08-28 15:17:41)

Offline

#10 2018-08-28 15:30:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved]Trouble with starting mpd service as a user.

Glad to hear, please mark as [SOLVED] by editing the title in your first post: https://wiki.archlinux.org/index.php/Co … ow_to_post

You might also want to read up on an ncmpcpp manual tongue

Last edited by V1del (2018-08-28 15:31:03)

Offline

Board footer

Powered by FluxBB