WARNING - DB::query(REPLACE INT...

Discussion in 'General' started by vk3heg, Jan 6, 2016.

  1. vk3heg

    vk3heg Member

    I followed the perfect server guide for Centos 7.1 64bit for setting up my server. I don't use the bastille firewall and manage the iptables system myself. I also use the blockcountries system from https://github.com/tlhackque/BlockCountries to block some nine countries (One has cn in the name.) Fail2ban is also used.

    As this is a production server, I did testing on my test server (Centos 7.1 etc... same config etc...). Yesterday I updated the blockcountries to the latest version (2.7, was on 2.3), and am now getting these types of emails every five minutes from the production server..

    Everything else on the server is working fine, email's websites, database access etc...

    Any thoughts from the fellow ispconfig users on fixing this issue?

    I haven't included all of the email as it's 1.03Mb in size.

    06.01.2016-12:25 - WARNING - DB::query(REPLACE INTO monitor_data (server_id, type, created, data, state) VALUES (1, 'iptables_rules', UNIX_TIMESTAMP(), 'a:1:{s:6:\"output\";s:1064248:\"<h2>iptables -S (ipv4)</h2>-P INPUT ACCEPT\n-P FORWARD DROP\n-P OUTPUT ACCEPT\n-N BLOCKCC0-DLOG\n-N BLOCKCC0-I\n-N BLOCKCC0-I-1\n-N BLOCKCC0-I-1-0\n-N BLOCKCC0-I-1-1\n-N BLOCKCC0-I-1-10\n-N BLOCKCC0-I-1-2\n-N BLOCKCC0-I-1-4\n-N BLOCKCC0-I-101\n-N BLOCKCC0-I-101-101\n-N BLOCKCC0-I-101-102\n-N BLOCKCC0-I-101-110\n-N BLOCKCC0-I-101-128\n-N BLOCKCC0-I-101-203\n-N BLOCKCC0-I-101-234\n-N BLOCKCC0-I-101-251\n-N BLOCKCC0-I-101-50\n-N BLOCKCC0-I-101-53\n-N BLOCKCC0-I-101-55\n-N BLOCKCC0-I-101-78\n-N BLOCKCC0-I-101-96\n-N BLOCKCC0-I-101-99\n-N BLOCKCC0-I-103\n-N BLOCKCC0-I-103-1\n-N BLOCKCC0-I-103-10\n-N BLOCKCC0-I-103-11\n-N BLOCKCC0-I-103-12\n-N BLOCKCC0-I-103-13\n-N BLOCKCC0-I-103-14\n-N BLOCKCC0-I-103-15\n-N BLOCKCC0-I-103-16\n-N BLOCKCC0-I-103-17\n-N BLOCKCC0-I-103-18\n-N BLOCKCC0-I-103-19\n-N BLOCKCC0-I-10
    3-192\n-N BLOCKCC0-I-103-193\n-N BLOCKCC0-I-103-194\n-N BLOCKCC0-I-103-195\n-N BLOCKCC0-I-103-196\n-N BLOCKCC0-I-103-197\n-N BLOCKCC0-I-103-198\n-N BLOCKCC0-I-103-199\n-N BLOCKCC0-I-103-2\n-N BLOCKCC0-I-103-20\n-N BLOCKCC0-I-103-200\n-N BLOCKCC0-I-103-201\n-N BLOCKCC0-I-103-202\n-N BLOCKCC0-I-103-203\n-N BLOCKCC0-I-103-204\n-N BLOCKCC0-I-103-205\n-N BLOCKCC0-I-103-21\n-N BLOCKCC0-I-103-22\n-N BLOCKCC0-I-103-224\n-N BLOCKCC0-I-103-225\n-N BLOCKCC0-I-103-226\n-N BLOCKCC0-I-103-227\n-N BLOCKCC0-I-103-228\n-N BLOCKCC0-I-103-229\n-N BLOCKCC0-I-103-23\n-N BLOCKCC0-I-103-230\n-N BLOCKCC0-I-103-231\n-N BLOCKCC0-I-103-232\n-N BLOCKCC0-I-103-233\n-N BLOCKCC0-I-103-234\n-N BLOCKCC0-I-103-235\n-N BLOCKCC0-I-103-236\n-N BLOCKCC0-I-103-237\n-N BLOCKCC0-I-103-238\n-N BLOCKCC0-I-103-239\n-N BLOCKCC0-I-103-24\n-N BLOCKCC0-I-103-240\n-N BLOCKCC0-I-103-241\n-N BLOCKCC0-I-103-242\n-N BLOCKCC0-I-103-243\n-N BLOCKCC0-I-103-244\n-N BLOCKCC0-I-103-245\n-N BLOCKCC0-I-103-246\n-N BLOCKCC0-I-103-247\n-N BLOCK
    CC0-I-103-248\n-N BLOCKCC0-I-103-249\n-N BLO!

    [....]

    an-dovecot -s 87.203.224.35/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot -s 178.216.49.107/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot -s 202.51.116.222/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot -s 103.30.244.77/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot -j RETURN\n-A fail2ban-dovecot-auth -s 87.203.224.35/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-auth -s 178.216.49.107/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-auth -s 202.51.116.222/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-auth -s 103.30.244.77/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-auth -j RETURN\n-A fail2ban-dovecot-pop3imap -s 87.203.224.35/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-pop3imap -s 178.216.49.107/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-pop3im
    ap -s 202.51.116.222/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-pop3imap -s 103.30.244.77/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-dovecot-pop3imap -j RETURN\n-A fail2ban-sasl -s 176.61.137.109/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-sasl -s 104.167.104.13/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-sasl -s 59.115.158.228/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-sasl -s 104.243.24.149/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-sasl -s 203.45.137.83/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-sasl -s 148.101.177.30/32 -j REJECT --reject-with icmp-port-unreachable\n-A fail2ban-sasl -j RETURN\n<br><h2>ip6tables -S (ipv6)</h2>-P INPUT ACCEPT\n-P FORWARD ACCEPT\n-P OUTPUT ACCEPT\n\";}', 'no_state')) -> mysqli_query MySQL server has gone away
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Any errors in mysql log or in syslog regarding mysql?
     
  3. vk3heg

    vk3heg Member

    No error's that I can see, and i went back at least 48hrs,

    mariadb.log just has this:
    160105 20:20:11 [Note] /usr/libexec/mysqld: Normal shutdown

    160105 20:20:11 [Note] Event Scheduler: Purging the queue. 0 events
    160105 20:20:11 InnoDB: Starting shutdown...
    160105 20:20:11 InnoDB: Waiting for 4 pages to be flushed
    160105 20:20:12 InnoDB: Shutdown completed; log sequence number 132584158
    160105 20:20:12 [Note] /usr/libexec/mysqld: Shutdown complete

    160105 20:20:12 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
    160105 20:20:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    160105 20:20:12 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 18917 ...
    160105 20:20:12 InnoDB: The InnoDB memory heap is disabled
    160105 20:20:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    160105 20:20:12 InnoDB: Compressed tables use zlib 1.2.7
    160105 20:20:12 InnoDB: Using Linux native AIO
    160105 20:20:12 InnoDB: Initializing buffer pool, size = 128.0M
    160105 20:20:12 InnoDB: Completed initialization of buffer pool
    160105 20:20:12 InnoDB: highest supported file format is Barracuda.
    160105 20:20:12 InnoDB: Waiting for the background threads to start
    160105 20:20:13 Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 132584158
    160105 20:20:13 [Note] Plugin 'FEEDBACK' is disabled.
    160105 20:20:13 [Note] Server socket created on IP: '0.0.0.0'.
    160105 20:20:13 [Note] Event Scheduler: Loaded 0 events
    160105 20:20:13 [Note] /usr/libexec/mysqld: ready for connections.

    sql info from the /var/log/messages:
    Jan 5 20:20:12 shadow mysqld_safe: 160105 20:20:12 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
    Jan 5 20:20:12 shadow mysqld_safe: 160105 20:20:12 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
    Jan 5 20:20:12 shadow mysqld_safe: 160105 20:20:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    Jan 5 20:20:17 shadow pure-config.pl: Running: /usr/sbin/pure-ftpd --daemonize -A -c50 -B -C8 -D -E -fftp -H -I15 -lmysql:/etc/pure-ftpd/pureftpd-mysql.conf -L7500:8 -m4 -s -U133:022 -u500 -i -Oclf:/var/log/pureftpd.log -k99 -Z
    Jan 5 20:20:17 shadow named[19144]: built with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libtool' '--localstatedir=/var' '--enable-threads' '--enable-ipv6' '--enable-filter-aaaa' '--enable-rrl' '--with-pic' '--disable-static' '--disable-openssl-version-check' '--enable-exportlib' '--with-export-libdir=/usr/lib64' '--with-export-includedir=/usr/include' '--includedir=/usr/include/bind9' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so' '--with-dlopen=yes' '--with-dlz-ldap=yes' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-filesystem=yes' '--with-dlz-bdb=yes' '--with-gssapi=yes' '--disable-isc-spnego' '--enable-fixed-rrset' '--with-docbook-xsl=/usr/share/sgml/docbook/xsl-stylesheets' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS= -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ' 'CPPFLAGS= -DDIG_SIGCHASE'
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to extend the max package size in mysql my.cnf.
     
  5. vk3heg

    vk3heg Member

    Thanks Till,

    I increased it from the default to 32mb, and no longer get the emails every five minutes.
     

Share This Page