You are not logged in.

#1 2022-12-06 19:49:36

runkli
Member
Registered: 2022-12-06
Posts: 2

[RESOLVED] MPD failing to startup, failed to bind socket

Note: running as root on a server.
Trying to start mpd with: systemctl start mpd, which exists with error code.

Below is systemctl status mpd (I've replaced the actual ip address with the word "ipaddress". the ip address is the server's ip, not another remote ip.

Starting Music Player Daemon...
exception: Failed to bind to 'ipaddress:6600'; Failed to bind socket: Address already in use
mpd.service: Main process exited, code=exited, status=1/FAILURE
mpd.service: Failed with result 'exit-code'.
Failed to start Music Player Daemon.

This would imply that 6600 is busy, but checking with netstat -tulpn:

tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN      294274/lua5.2 
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      294274/lua5.2       
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      234607/nginx: maste 
tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN      294274/lua5.2       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      11891/sshd: /usr/sb 
tcp        0      0 127.0.0.1:8888          0.0.0.0:*               LISTEN      232422/uwsgi        
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      234607/nginx: maste 
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN      294274/lua5.2       
tcp6       0      0 :::5222                 :::*                    LISTEN      294274/lua5.2       
tcp6       0      0 :::5000                 :::*                    LISTEN      294274/lua5.2       
tcp6       0      0 :::80                   :::*                    LISTEN      234607/nginx: maste 
tcp6       0      0 :::5269                 :::*                    LISTEN      294274/lua5.2       
tcp6       0      0 :::22                   :::*                    LISTEN      11891/sshd: /usr/sb 
tcp6       0      0 :::5280                 :::*                    LISTEN      294274/lua5.2      

There is no mention of port 6600 whatsoever. Changing the port in ~/.mpd/mpd.conf to another port results in the same issue. What's going on? Thank you in advance.

EDIT: Changing the bind_to_address to "0.0.0.0" from "ipaddress" worked

Last edited by runkli (2022-12-07 13:48:59)

Offline

#2 2022-12-06 21:45:03

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

Re: [RESOLVED] MPD failing to startup, failed to bind socket

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

What specifically was "ipaddress"?
The obfuscation would suggest it to have been some WAN IP?
You'd want the LAN IP.

Offline

#3 2022-12-07 13:50:27

runkli
Member
Registered: 2022-12-06
Posts: 2

Re: [RESOLVED] MPD failing to startup, failed to bind socket

seth wrote:

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Updated the subject line, thanks!

seth wrote:

What specifically was "ipaddress"?
The obfuscation would suggest it to have been some WAN IP?
You'd want the LAN IP.

This was definitely the issue; ipaddress was my server's WAN IP address.

Offline

Board footer

Powered by FluxBB