[Solved] Connection opened, connection closed

I’ having thousands and thousands of these lines in the mpd.log rendering the log file almost useless.

Nov 12 06:40 : client: [5976] opened from 127.0.0.1:58799
Nov 12 06:40 : client: [5976] closed

There is a forum post in here about this but it does not solve the issue, it’s also a poor post because it describes two problems.
volumio-and-mpd-updating

When I do netstat -aon

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       Timer
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:49152           0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:6600            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:8200            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 127.0.0.1:9001          0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:5002            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 127.0.0.1:9002          0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:56236           0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:81              0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:82              0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 192.168.178.12:53556    192.168.178.14:445      ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:59066         127.0.0.1:6600          ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:56289         127.0.0.1:9000          TIME_WAIT   timewait (52.80/0/0)
tcp        0      0 127.0.0.1:59074         127.0.0.1:6600          TIME_WAIT   timewait (47.78/0/0)
tcp        0      0 127.0.0.1:6600          127.0.0.1:50838         ESTABLISHED keepalive (4234.20/0/0)
tcp        0      0 127.0.0.1:50826         127.0.0.1:6600          ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:59051         127.0.0.1:6600          TIME_WAIT   timewait (27.59/0/0)
tcp        0      0 127.0.0.1:59081         127.0.0.1:6600          TIME_WAIT   timewait (57.82/0/0)
tcp        0      0 127.0.0.1:59037         127.0.0.1:6600          TIME_WAIT   timewait (7.48/0/0)
tcp        0      0 127.0.0.1:59049         127.0.0.1:6600          TIME_WAIT   timewait (22.71/0/0)
tcp        0      0 127.0.0.1:56278         127.0.0.1:9000          ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:56251         127.0.0.1:9000          TIME_WAIT   timewait (7.64/0/0)
tcp        0      0 127.0.0.1:50838         127.0.0.1:6600          ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:56265         127.0.0.1:9000          TIME_WAIT   timewait (27.70/0/0)
tcp        0      0 192.168.178.12:42086    195.24.233.58:80        ESTABLISHED off (0.00/0/0)
tcp        1      1 192.168.178.12:54994    195.24.233.57:80        LAST_ACK    on (13.52/6/0)
tcp        0      0 127.0.0.1:59046         127.0.0.1:6600          TIME_WAIT   timewait (17.67/0/0)
tcp        0      0 127.0.0.1:56275         127.0.0.1:9000          TIME_WAIT   timewait (42.75/0/0)
tcp        0      0 127.0.0.1:56293         127.0.0.1:9000          TIME_WAIT   timewait (57.80/0/0)
tcp        0      0 127.0.0.1:6600          127.0.0.1:47154         ESTABLISHED keepalive (2227.14/0/0)
tcp        0      0 192.168.178.12:55212    195.24.233.57:80        ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:59053         127.0.0.1:6600          TIME_WAIT   timewait (27.70/0/0)
tcp        0      0 127.0.0.1:59042         127.0.0.1:6600          TIME_WAIT   timewait (12.66/0/0)
tcp        0      0 127.0.0.1:56272         127.0.0.1:9000          TIME_WAIT   timewait (37.73/0/0)
tcp        0      0 127.0.0.1:59077         127.0.0.1:6600          TIME_WAIT   timewait (52.78/0/0)
tcp        0      0 192.168.178.12:22       192.168.178.16:46986    ESTABLISHED keepalive (5422.02/0/0)
tcp        0      0 192.168.178.12:6600     192.168.178.16:60458    ESTABLISHED keepalive (4746.18/0/0)
tcp        0      0 127.0.0.1:59056         127.0.0.1:6600          TIME_WAIT   timewait (32.72/0/0)
tcp        0      0 127.0.0.1:6600          127.0.0.1:59066         ESTABLISHED keepalive (7203.78/0/0)
tcp        0      0 127.0.0.1:56261         127.0.0.1:9000          TIME_WAIT   timewait (22.69/0/0)
tcp        0      0 127.0.0.1:59044         127.0.0.1:6600          TIME_WAIT   timewait (17.50/0/0)
tcp        0      0 127.0.0.1:59079         127.0.0.1:6600          TIME_WAIT   timewait (57.70/0/0)
tcp        0      0 127.0.0.1:59039         127.0.0.1:6600          TIME_WAIT   timewait (7.64/0/0)
tcp        0      0 127.0.0.1:56254         127.0.0.1:9000          TIME_WAIT   timewait (12.66/0/0)
tcp        1      1 192.168.178.12:50827    195.24.232.208:80       LAST_ACK    on (13.52/6/0)
tcp        0      0 127.0.0.1:59035         127.0.0.1:6600          TIME_WAIT   timewait (2.63/0/0)
tcp        0      0 192.168.178.12:42089    195.24.233.58:80        ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:59060         127.0.0.1:6600          TIME_WAIT   timewait (37.73/0/0)
tcp        1      1 192.168.178.12:37445    195.24.232.207:80       LAST_ACK    on (13.49/6/0)
tcp        0      0 127.0.0.1:6600          127.0.0.1:58847         TIME_WAIT   timewait (43.84/0/0)
tcp        0      0 127.0.0.1:56247         127.0.0.1:9000          TIME_WAIT   timewait (2.60/0/0)
tcp        8      0 127.0.0.1:9000          127.0.0.1:56278         ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:56268         127.0.0.1:9000          TIME_WAIT   timewait (32.69/0/0)
tcp        0      0 127.0.0.1:47154         127.0.0.1:6600          ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.178.12:80       192.168.178.16:42167    ESTABLISHED off (0.00/0/0)
tcp        1      1 192.168.178.12:41874    195.24.233.58:80        LAST_ACK    on (12.21/6/0)
tcp        0      0 127.0.0.1:56258         127.0.0.1:9000          TIME_WAIT   timewait (17.64/0/0)
tcp        0      0 127.0.0.1:56286         127.0.0.1:9000          TIME_WAIT   timewait (47.73/0/0)
tcp        0      0 192.168.178.12:51045    195.24.232.208:80       ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.178.12:80       192.168.178.16:41980    ESTABLISHED off (0.00/0/0)
tcp        0      0 127.0.0.1:59072         127.0.0.1:6600          TIME_WAIT   timewait (47.63/0/0)
tcp        0      0 127.0.0.1:6600          127.0.0.1:50826         ESTABLISHED keepalive (4234.15/0/0)
tcp        0      0 127.0.0.1:59063         127.0.0.1:6600          TIME_WAIT   timewait (42.71/0/0)
tcp        0      0 127.0.0.1:56059         127.0.0.1:9000          TIME_WAIT   timewait (43.85/0/0)
tcp6       0      0 :::445                  :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 :::60068                :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 :::5002                 :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 :::139                  :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 :::111                  :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 :::22                   :::*                    LISTEN      off (0.00/0/0)
udp        0      0 127.0.0.1:932           0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:51443           0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:50972           0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:68              0.0.0.0:*                           off (0.00/0/0)
udp        0      0 127.0.0.1:57163         0.0.0.0:*                           off (0.00/0/0)
udp        0      0 192.168.178.12:55397    0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:1900            0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:1900            0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:111             0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:900             0.0.0.0:*                           off (0.00/0/0)
udp        0      0 192.168.178.255:137     0.0.0.0:*                           off (0.00/0/0)
udp        0      0 192.168.178.12:137      0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:137             0.0.0.0:*                           off (0.00/0/0)
udp        0      0 192.168.178.255:138     0.0.0.0:*                           off (0.00/0/0)
udp        0      0 192.168.178.12:138      0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:138             0.0.0.0:*                           off (0.00/0/0)
udp        0      0 0.0.0.0:49035           0.0.0.0:*                           off (0.00/0/0)
udp6       0      0 :::36539                :::*                                off (0.00/0/0)
udp6       0      0 :::5353                 :::*                                off (0.00/0/0)
udp6       0      0 :::45811                :::*                                off (0.00/0/0)
udp6       0      0 :::36167                :::*                                off (0.00/0/0)
udp6       0      0 :::111                  :::*                                off (0.00/0/0)
udp6       0      0 :::900                  :::*                                off (0.00/0/0)
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     2347     /var/run/rpcbind.sock
unix  2      [ ACC ]     STREAM     LISTENING     2662     /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     3179     /var/run/samba/winbindd/pipe
unix  2      [ ACC ]     STREAM     LISTENING     2711     /var/run/avahi-daemon/socket
unix  2      [ ACC ]     STREAM     LISTENING     2973     /var/run/samba/nmbd/unexpected
unix  2      [ ACC ]     STREAM     LISTENING     3181     /var/lib/samba/winbindd_privileged/pipe
unix  3      [ ]         STREAM     CONNECTED     45386    
unix  3      [ ]         STREAM     CONNECTED     2668     
unix  3      [ ]         STREAM     CONNECTED     3182     
unix  3      [ ]         STREAM     CONNECTED     96923    
unix  3      [ ]         STREAM     CONNECTED     2443     
unix  3      [ ]         STREAM     CONNECTED     3183     
unix  3      [ ]         STREAM     CONNECTED     96924    
unix  3      [ ]         STREAM     CONNECTED     3623     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     2896     
unix  3      [ ]         STREAM     CONNECTED     2714     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     3622     
unix  3      [ ]         STREAM     CONNECTED     2897     
unix  3      [ ]         STREAM     CONNECTED     2713     
unix  3      [ ]         STREAM     CONNECTED     3297     
unix  3      [ ]         STREAM     CONNECTED     2667     
unix  3      [ ]         STREAM     CONNECTED     3298     
unix  3      [ ]         STREAM     CONNECTED     2707     
unix  3      [ ]         STREAM     CONNECTED     45387    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     2706     
unix  3      [ ]         STREAM     CONNECTED     2444  

It is the monit background check… It checks wether mpd is running… Probably we should change where this check happen…

Isn’t it strange I cannot find this check in the monitrc file and how come the check runs every 2-7 seconds, not regular?

Can’t monit check MPD with a 1 minute interval on a PID file in stead of logging in and opening a data port or something?
If you point me in the monit config direction, I will edit and test this :smiley:

[EDIT]
It’s not monit, stopped it and the lines still get in the log file

When I kill both nginx processes, it stops.

Solution:

sudo nano /etc/mpd.conf

add this line:

log_level "default"

Restart MPD:

sudo /etc/init.d/mpd restart

Good hint. Are you referring to default mpd.conf or Volumio’s custom one? In current version, if you do not edit settings, the default mpd one is loaded…

I made the change in the custom one with “please DO NOT edit it manually!” in it :unamused:
Is there an other file I need to add it to so it does not get overwritten after a settings change?

Unfortunately no… I will deploy a fix very soon for this…