View previous topic :: View next topic |
Author |
Message |
cafaia n00b

Joined: 11 Oct 2014 Posts: 40 Location: Frederico Westphalen/Brasil
|
Posted: Thu May 25, 2023 11:39 pm Post subject: MPD fail to create socket like user on SystemD [SOLVED] |
|
|
Hello everybody!
I have a pure PipeWire system (USE="-pulseaudio") and my MPD config points to this sound output but I have to start the MPD service manually.
Every time I start the graphical environment, KDE, the MPD service doesn't start automatically, I have this:
Code: |
systemctl --user status mpd
○ mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
Active: inactive (dead) since Thu 2023-05-25 20:13:15 -03; 14min ago
Docs: man:mpd(1)
man:mpd.conf(5)
Main PID: 2406 (code=exited, status=1/FAILURE)
CPU: 49ms
mai 25 20:13:15 gentoo systemd[2253]: Starting mpd.service...
mai 25 20:13:15 gentoo mpd[2406]: May 25 20:13 : exception: Failed to bind to '192.168.1.10:6600'; Failed to bind socket: Cannot assign requested address
mai 25 20:13:15 gentoo systemd[2253]: mpd.service: Main process exited, code=exited, status=1/FAILURE
mai 25 20:13:15 gentoo systemd[2253]: mpd.service: Failed with result 'exit-code'.
mai 25 20:13:15 gentoo systemd[2253]: Failed to start mpd.service.
|
But if I start it with the command 'systemctl --user start mpd' I have this:
Code: |
systemctl --user status mpd
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
Active: active (running) since Thu 2023-05-25 20:29:53 -03; 8s ago
Docs: man:mpd(1)
man:mpd.conf(5)
Main PID: 6719 (mpd)
Tasks: 9 (limit: 38442)
Memory: 156.5M
CPU: 2.649s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/mpd.service
└─6719 /usr/bin/mpd --systemd
mai 25 20:29:50 gentoo systemd[2253]: Starting mpd.service...
mai 25 20:29:53 gentoo systemd[2253]: Started mpd.service.
|
This is my MPD configuration:
Code: |
grep -v '^#' .config/mpd/mpd.conf
music_directory "/hd/Musics"
playlist_directory "/home/eduardo/.config/mpd/playlists"
db_file "/home/eduardo/.config/mpd/database"
log_file "/home/eduardo/.config/mpd/log"
state_file "/home/eduardo/.config/mpd/state"
user "eduardo"
bind_to_address "192.168.1.10"
bind_to_address "/run/user/1000/mpd.socket"
port "6600"
auto_update "yes"
input {
plugin "curl"
enabled "yes"
}
neighbors {
plugin "upnp"
}
neighbors {
plugin "udisks"
}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "lame" # optional, vorbis or lame
port "8000"
bind_to_address "192.168.1.10" # optional, IPv4 or IPv6
bitrate "320" # do not define if quality is defined
format "44100:16:2"
max_clients "0" # optional 0=no limit
}
audio_output {
type "pipewire"
name "Pipewire Output"
}
filesystem_charset "UTF-8"
|
I hope that with this data you can help me!
Last edited by cafaia on Fri May 26, 2023 1:44 pm; edited 2 times in total |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3479
|
Posted: Fri May 26, 2023 10:17 am Post subject: |
|
|
Try
Code: |
systemctl disable mpd
systemctl --user enable mpd
|
Its enabled by default
You have
Code: |
Failed to bind to '192.168.1.10:6600'; Failed to bind socket: Cannot assign requested address
|
Is someone else using this address?Maybe the system-wide mpd daemon?Just a thought. _________________
 |
|
Back to top |
|
 |
cafaia n00b

Joined: 11 Oct 2014 Posts: 40 Location: Frederico Westphalen/Brasil
|
Posted: Fri May 26, 2023 12:51 pm Post subject: |
|
|
Hi, alamahant!
Thanks for the answer!
First of all I had done 'systemctl disable mpd' as root and 'systemctl --user enable mpd' as regular user...
I see mpd as not active as system-wide daemon... Because I have:
Code: |
systemctl status mpd.service
○ mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; preset: disabled)
Active: inactive (dead)
Docs: man:mpd(1)
man:mpd.conf(5)
|
and:
Code: |
systemctl status mpd.socket
○ mpd.socket
Loaded: loaded (/usr/lib/systemd/system/mpd.socket; disabled; preset: disabled)
Active: inactive (dead)
Triggers: ● mpd.service
Listen: /run/mpd/socket (Stream)
[::]:6600 (Stream)
|
What is confusing me is that after I enter the KDE environment I can start the service normally... |
|
Back to top |
|
 |
cafaia n00b

Joined: 11 Oct 2014 Posts: 40 Location: Frederico Westphalen/Brasil
|
Posted: Fri May 26, 2023 1:39 pm Post subject: |
|
|
To all that may concern!
I made two modifications and it worked, now everything is working as it should!
The first modification I made I believe does not matter much, but it is this:
Code: |
bind_to_address "/run/user/1000/mpd/socket"
|
in file '.config/mpd/mpd.conf'.
The second change I made was to add the MPD socket to start the service:
Code: |
systemctl --user enable mpd.service
systemctl --user enable mpd.socket
|
Hope this can help someone!
Best regards! |
|
Back to top |
|
 |
|