You are not logged in.

#1 2015-01-18 18:16:15

Neg
Member
Registered: 2012-07-24
Posts: 17

[Solved] MPD clients connect to server too long first time

When my system start mpd clients cannot connect to server a long(10-15 seconds or more) for some reason.
Same time internet connection and network seems to be ok.

So, It's look like I run mpc for example and it get stuck. This problem is new. 2-4 weeks or less.
I've tried use user and global config without any success.

Mpd config now look like this:

music_directory              "/home/neg/music"
playlist_directory           "/home/neg/.mpd/playlists"
db_file                      "/home/neg/.mpd/mpd.db"
log_file                     "/home/neg/.mpd/mpd.log"
pid_file                     "/home/neg/.mpd/mpd.pid"
state_file                   "/home/neg/.mpd/mpdstate"
sticker_file                 "/home/neg/.mpd/sticker.sql"
user                         "neg"
bind_to_address             "localhost"
port                         "6600"
input {
        plugin "curl"
}
save_absolute_paths_in_playlists  "yes"
metadata_to_use                   "artist,album,title,track,name,genre,date"
follow_inside_symlinks            "yes"
connection_timeout                "2"
filesystem_charset                "UTF-8"
input {
    plugin "curl"
}
audio_output {
       type             "pulse"
       name             "Local Music Player Daemon"
       mixer_type       "hardware"
       server           "127.0.0.1"
}

My netctl profile looks like this:

Description='A basic dhcp ethernet connection'
Interface=enp6s0
Connection=ethernet
SkipNoCarrier=yes
IP=static
DNS=('192.168.1.1')
Address=('192.168.1.35/24')
Gateway='192.168.1.1'
## for DHCPv6
#IP6=dhcp
## for IPv6 autoconfiguration
#IP6=stateless

System start looks almost normal. USB reinit after uefi takes a lot of time sometimes, but it's not critical.

[~] >> PAGER= systemd-analyze blame
          7.483s systemd-udev-settle.service
           543ms zfs-mount.service
           443ms systemd-modules-load.service
           121ms netctl@profile.service
           100ms user@1000.service
            83ms systemd-fsck@dev-sdd3.service
            68ms systemd-logind.service
            68ms lm_sensors.service
            59ms alsa-restore.service
            57ms zfs-share.service
            38ms systemd-vconsole-setup.service
            25ms polkit.service
            24ms systemd-fsck@dev-sdb1.service
            18ms ntpd.service
            14ms systemd-udev-trigger.service
            14ms avahi-daemon.service
            13ms systemd-binfmt.service
            13ms mnt-home.mount
            12ms systemd-tmpfiles-setup-dev.service
            12ms dev-hugepages.mount
            10ms dev-mqueue.mount
            10ms systemd-remount-fs.service
            10ms sys-kernel-debug.mount
             9ms proc-sys-fs-binfmt_misc.mount
             8ms systemd-tmpfiles-setup.service
             6ms systemd-update-utmp.service
             5ms systemd-journal-flush.service
             5ms boot-efi.mount
             5ms systemd-random-seed.service
             4ms kmod-static-nodes.service
             4ms systemd-udevd.service
             3ms var-cache-davfs2.mount
             3ms var-cache-pkgfile.mount
             3ms udisks.service
             3ms var-cache-pacman.mount
             2ms rtkit-daemon.service
             1ms var-tmp.mount
             1ms systemd-sysctl.service
             1ms zfs-import-cache.service
             1ms systemd-user-sessions.service
           937us sys-kernel-config.mount
           911us tmp.mount

Whole system config

[~] >> inxi -FC
System:    Host: unreal Kernel: 3.18.2-2-ARCH x86_64 (64 bit) Desktop: N/A Distro: Arch Linux
Machine:   System: ASUS product: All Series
           Mobo: ASUSTeK model: SABERTOOTH Z97 MARK 1 version: Rev 1.xx
           Bios: American Megatrends version: 0901 date: 05/08/2014
CPU:       Quad core Intel Core i7-4790K CPU (-HT-MCP-) cache: 8192 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx)
           Clock Speeds: 1: 4000.00 MHz 2: 4000.312 MHz 3: 4000.625 MHz 4: 4000.00 MHz 5: 4005.156 MHz 6: 4000.156 MHz 7: 4000.781 MHz 8: 4001.718 MHz
Graphics:  Card: NVIDIA GM204 [GeForce GTX 980] X.Org: 1.16.3 driver: nvidia Resolution: 1920x1200@59.95hz
           GLX Renderer: GeForce GTX 980/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 343.36
Audio:     Card-1: NVIDIA GM204 High Definition Audio Controller Sound: ALSA ver: k3.18.2-2-ARCH
           Card-3: Creative driver: USB Audio
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: 10:c3:7b:96:22:ef
           Card-2: Intel Ethernet Connection (2) I218-V driver: e1000e
           IF: eno1 state: down mac: 40:16:7e:e9:08:e1
Drives:    HDD Total Size: 2378.5GB (20.0% used) 1: id: /dev/sda model: WDC_WD1003FZEX size: 1000.2GB
           2: id: /dev/sdb model: PLEXTOR_PX size: 128.0GB 3: id: /dev/sdc model: ST3250312AS size: 250.1GB
           4: id: /dev/sdd model: WDC_WD1003FZEX size: 1000.2GB
Partition: ID: / size: 89G used: 29G (35%) fs: ext4
Sensors:   System Temperatures: cpu: 32.0C mobo: 34.0C gpu: 40C
           Fan Speeds (in rpm): cpu: N/A fan-1: 0 fan-2: 0 fan-3: 0 fan-4: 0 fan-5: 0 fan-6: 0
Info:      Processes: 424 Uptime: 2 min Memory: 2166.0/15993.2MB Client: Shell (zsh) inxi: 1.9.14

I've tried ::1 addr, sockets etc, nothing gets better.
Also I've tried to upgrade mpd to git or downgrade.

Last edited by Neg (2015-01-28 11:36:46)

Offline

#2 2015-01-18 20:29:18

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [Solved] MPD clients connect to server too long first time

So what happens if you move your mpd config file and try to start mpd.  If moving the file fixes the initial connection issue, then it's something in your config.


Knute

Offline

#3 2015-01-18 21:33:32

hifi25nl
Member
Registered: 2011-05-07
Posts: 264

Re: [Solved] MPD clients connect to server too long first time

Do you have the same problem if you start mpd like this?

/usr/bin/mpd /home/neg/.mpd.conf --no-daemon; 

Last edited by hifi25nl (2015-01-18 21:35:41)

Offline

#4 2015-01-18 21:51:39

Neg
Member
Registered: 2012-07-24
Posts: 17

Re: [Solved] MPD clients connect to server too long first time

hifi25nl wrote:

Do you have the same problem if you start mpd like this?

/usr/bin/mpd /home/neg/.mpd.conf --no-daemon; 

Yes, same thing. And when I use it without "--no-daemon" too.

Also I get

[~] >> tail ~/.mpd/mpd.log
Jan 19 00:48 : client: [105] opened from 127.0.0.1:34740
Jan 19 00:48 : client: [105] closed
Jan 19 00:48 : client: [106] opened from 127.0.0.1:34741
Jan 19 00:48 : client: [106] closed
Jan 19 00:48 : client: [107] opened from 127.0.0.1:34742
Jan 19 00:48 : client: [107] closed
Jan 19 00:48 : client: [108] opened from 127.0.0.1:34743
Jan 19 00:48 : client: [108] closed
Jan 19 00:48 : client: [109] opened from 127.0.0.1:34744
Jan 19 00:48 : client: [109] closed

WTF? I've already set port to 6600!

Offline

#5 2015-01-18 21:58:13

Neg
Member
Registered: 2012-07-24
Posts: 17

Re: [Solved] MPD clients connect to server too long first time

Knute wrote:

So what happens if you move your mpd config file and try to start mpd.  If moving the file fixes the initial connection issue, then it's something in your config.

Nothing works without config, but anyway I have a long stuck before closing mpd for example.

Offline

#6 2015-01-19 01:23:22

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

Re: [Solved] MPD clients connect to server too long first time

have you checked, if pulseaudio was running at that time already?


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

#7 2015-01-19 06:20:18

Neg
Member
Registered: 2012-07-24
Posts: 17

Re: [Solved] MPD clients connect to server too long first time

Rasi wrote:

have you checked, if pulseaudio was running at that time already?

Yes, pulseaudio seems to be ok at that moment.

Also I have such thing in the log ~2 minutes

Jan 19 09:17 : client: [142] opened from 127.0.0.1:38434
Jan 19 09:17 : client: [142] closed
Jan 19 09:17 : client: [143] opened from 127.0.0.1:38435
Jan 19 09:17 : client: [143] closed
Jan 19 09:17 : client: [144] opened from 127.0.0.1:38436
Jan 19 09:17 : client: [144] closed
Jan 19 09:17 : client: [145] opened from 127.0.0.1:38437
Jan 19 09:17 : client: [145] closed
Jan 19 09:17 : client: [146] opened from 127.0.0.1:38438
Jan 19 09:17 : client: [146] closed
Jan 19 09:17 : client: [147] opened from 127.0.0.1:38439
Jan 19 09:17 : client: [147] closed

When daemon seems to be ok

[~] >> systemctl --user status mpd2
● mpd2.service - Music Player Daemon
   Loaded: loaded (/home/neg/.config/systemd/user/mpd2.service; disabled)
   Active: active (running) since Mon 2015-01-19 09:15:59 MSK; 1min 59s ago
 Main PID: 1947 (mpd)
   CGroup: /user.slice/user-1000.slice/user@1000.service/mpd2.service
           └─1947 /usr/bin/mpd --no-daemon /home/neg/.mpd.conf

Jan 19 09:15:59 unreal systemd[953]: Started Music Player Daemon.

Also I've tried to set port manually in ncmpcpp, then log messages are NOT gone.
I've already tried alsa-only config. Same issue.

When daemon is "running" clients of it are not response ~1-2 minute.

Last edited by Neg (2015-01-19 06:26:15)

Offline

#8 2015-01-19 15:58:20

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

Re: [Solved] MPD clients connect to server too long first time

those messages are totally normal. It only tells you FROM where the client connects.

Last edited by Rasi (2015-01-19 15:59:03)


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 2015-01-28 11:36:25

Neg
Member
Registered: 2012-07-24
Posts: 17

Re: [Solved] MPD clients connect to server too long first time

Thanks to all
To solve it you should disable avahi:

	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-libmpdclient \
		--enable-jack \
		--enable-soundcloud \
		--enable-pipe-output \
		--enable-pulse \
		--disable-sidplay \
		--with-zeroconf=no \
		--with-systemdsystemunitdir=/usr/lib/systemd/system

Offline

Board footer

Powered by FluxBB