WARNING - DB::query(REPLACE INTO spamfilter_policy

Discussion in 'ISPConfig 3 Priority Support' started by muekno, Jun 23, 2015.

  1. muekno

    muekno Active Member HowtoForge Supporter

    get continuing error messages after changeing spam policy

    3.06.2015-16:30 - WARNING - DB::query(REPLACE INTO spamfilter_policy (`id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`policy_name`,`virus_lover`,`spam_lover`,`banned_files_lover`,`bad_header_lover`,`bypass_virus_checks`,`bypass_spam_checks`,`bypass_banned_checks`,`bypass_header_checks`,`spam_modifies_subj`,`virus_quarantine_to`,`spam_quarantine_to`,`banned_quarantine_to`,`bad_header_quarantine_to`,`clean_quarantine_to`,`other_quarantine_to`,`spam_tag_level`,`spam_tag2_level`,`spam_kill_level`,`spam_dsn_cutoff_level`,`spam_quarantine_cutoff_level`,`addr_extension_virus`,`addr_extension_spam`,`addr_extension_banned`,`addr_extension_bad_header`,`warnvirusrecip`,`warnbannedrecip`,`warnbadhrecip`,`newvirus_admin`,`virus_admin`,`banned_admin`,`bad_header_admin`,`spam_admin`,`spam_subject_tag`,`spam_subject_tag2`,`message_size_limit`,`banned_rulenames`,`policyd_quota_in`,`policyd_quota_in_period`,`policyd_quota_out`,`policyd_quota_out_period`,`policyd_gre
    ylist`) VALUES ('6','1','0','riud','riud','r','Trigger happy','N','N','N','N','N','N','N','N','Y','','','','','','','2','5','5','0','0','','','','','','','','','','','','','*** May be SPAM ***','*** SPAM ***','','','-1','24','-1','24','N')) -> mysqli_query Data truncated for column 'warnvirusrecip' at row 1

    Monitor errorlog tells me the same. The server in question is running an can connect to mysql on the master server via port 3306, tested with telnet vom slave to master. System (musltiserver 6 server) running fine since months, never got problems with sync. It is only one servr make the problem.

    Need help, thanks

    Rainer
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    compare the database table layout of the table spamfilter_policy between master and slave, most likely there is a column missing on the slave.
     
  3. muekno

    muekno Active Member HowtoForge Supporter

    can not see any difference fields from slave below
    mysql> show fields from spamfilter_policy;
    +------------------------------+------------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra |
    +------------------------------+------------------+------+-----+---------+----------------+
    | id | int(11) unsigned | NO | PRI | NULL | auto_increment |
    | sys_userid | int(11) unsigned | NO | | 0 | |
    | sys_groupid | int(11) unsigned | NO | | 0 | |
    | sys_perm_user | varchar(5) | NO | | | |
    | sys_perm_group | varchar(5) | NO | | | |
    | sys_perm_other | varchar(5) | NO | | | |
    | policy_name | varchar(64) | YES | | NULL | |
    | virus_lover | enum('N','Y') | YES | | NULL | |
    | spam_lover | enum('N','Y') | YES | | NULL | |
    | banned_files_lover | enum('N','Y') | YES | | NULL | |
    | bad_header_lover | enum('N','Y') | YES | | NULL | |
    | bypass_virus_checks | enum('N','Y') | YES | | NULL | |
    | bypass_spam_checks | enum('N','Y') | YES | | NULL | |
    | bypass_banned_checks | enum('N','Y') | YES | | NULL | |
    | bypass_header_checks | enum('N','Y') | YES | | NULL | |
    | spam_modifies_subj | enum('N','Y') | YES | | NULL | |
    | virus_quarantine_to | varchar(255) | YES | | NULL | |
    | spam_quarantine_to | varchar(255) | YES | | NULL | |
    | banned_quarantine_to | varchar(255) | YES | | NULL | |
    | bad_header_quarantine_to | varchar(255) | YES | | NULL | |
    | clean_quarantine_to | varchar(255) | YES | | NULL | |
    | other_quarantine_to | varchar(255) | YES | | NULL | |
    | spam_tag_level | float | YES | | NULL | |
    | spam_tag2_level | float | YES | | NULL | |
    | spam_kill_level | float | YES | | NULL | |
    | spam_dsn_cutoff_level | float | YES | | NULL | |
    | spam_quarantine_cutoff_level | float | YES | | NULL | |
    | addr_extension_virus | varchar(64) | YES | | NULL | |
    | addr_extension_spam | varchar(64) | YES | | NULL | |
    | addr_extension_banned | varchar(64) | YES | | NULL | |
    | addr_extension_bad_header | varchar(64) | YES | | NULL | |
    | warnvirusrecip | enum('N','Y') | YES | | NULL | |
    | warnbannedrecip | enum('N','Y') | YES | | NULL | |
    | warnbadhrecip | enum('N','Y') | YES | | NULL | |
    | newvirus_admin | varchar(64) | YES | | NULL | |
    | virus_admin | varchar(64) | YES | | NULL | |
    | banned_admin | varchar(64) | YES | | NULL | |
    | bad_header_admin | varchar(64) | YES | | NULL | |
    | spam_admin | varchar(64) | YES | | NULL | |
    | spam_subject_tag | varchar(64) | YES | | NULL | |
    | spam_subject_tag2 | varchar(64) | YES | | NULL | |
    | message_size_limit | int(11) unsigned | YES | | NULL | |
    | banned_rulenames | varchar(64) | YES | | NULL | |
    | policyd_quota_in | int(11) | NO | | -1 | |
    | policyd_quota_in_period | int(11) | NO | | 24 | |
    | policyd_quota_out | int(11) | NO | | -1 | |
    | policyd_quota_out_period | int(11) | NO | | 24 | |
    | policyd_greylist | enum('Y','N') | NO | | N | |
    +------------------------------+------------------+------+-----+---------+----------------+
    48 rows in set (0.02 sec)
    Can not see any difference in my.cnf from both servers. Only Difference master running mariaDB 'mariadb-5.5.33-2.2.i586', slave running mysql 'mysql-community-server-5.6.12-7.2.2.i586' both latest available version for opensuse, all other servers running mariadb.
    Any other idea

    Rainer
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run this sql query with phpmyadmin on the slave server where the error occurred:

    Code:
    REPLACE INTO spamfilter_policy (`id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`policy_name`,`virus_lover`,`spam_lover`,`banned_files_lover`,`bad_header_lover`,`bypass_virus_checks`,`bypass_spam_checks`,`bypass_banned_checks`,`bypass_header_checks`,`spam_modifies_subj`,`virus_quarantine_to`,`spam_quarantine_to`,`banned_quarantine_to`,`bad_header_quarantine_to`,`clean_quarantine_to`,`other_quarantine_to`,`spam_tag_level`,`spam_tag2_level`,`spam_kill_level`,`spam_dsn_cutoff_level`,`spam_quarantine_cutoff_level`,`addr_extension_virus`,`addr_extension_spam`,`addr_extension_banned`,`addr_extension_bad_header`,`warnvirusrecip`,`warnbannedrecip`,`warnbadhrecip`,`newvirus_admin`,`virus_admin`,`banned_admin`,`bad_header_admin`,`spam_admin`,`spam_subject_tag`,`spam_subject_tag2`,`message_size_limit`,`banned_rulenames`,`policyd_quota_in`,`policyd_quota_in_period`,`policyd_quota_out`,`policyd_quota_out_period`,`policyd_gre
    ylist`) VALUES ('6','1','0','riud','riud','r','Trigger happy','N','N','N','N','N','N','N','N','Y','','','','','','','2','5','5','0','0','','','','','','','','','','','','','*** May be SPAM ***','*** SPAM ***','','','-1','24','-1','24','N')
    
    and post the error message that you get in phpmyadmin.
     
  5. muekno

    muekno Active Member HowtoForge Supporter

    see result
    mysql> REPLACE INTO spamfilter_policy (`id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`policy_name`,`virus_lover`,`spam_lover`,`banned_files_lover`,`bad_header_lover`,`bypass_virus_checks`,`bypass_spam_checks`,`bypass_banned_checks`,`bypass_header_checks`,`spam_modifies_subj`,`virus_quarantine_to`,`spam_quarantine_to`,`banned_quarantine_to`,`bad_header_quarantine_to`,`clean_quarantine_to`,`other_quarantine_to`,`spam_tag_level`,`spam_tag2_level`,`spam_kill_level`,`spam_dsn_cutoff_level`,`spam_quarantine_cutoff_level`,`addr_extension_virus`,`addr_extension_spam`,`addr_extension_banned`,`addr_extension_bad_header`,`warnvirusrecip`,`warnbannedrecip`,`warnbadhrecip`,`newvirus_admin`,`virus_admin`,`banned_admin`,`bad_header_admin`,`spam_admin`,`spam_subject_tag`,`spam_subject_tag2`,`message_size_limit`,`banned_rulenames`,`policyd_quota_in`,`policyd_quota_in_period`,`policyd_quota_out`,`policyd_quota_out_period`,`policyd_greylist`) VALUES ('6','1','0','riud','riud','r','Trigger happy','N','N','N','N','N','N','N','N','Y','','','','','','','2','5','5','0','0','','','','','','','','','','','','','*** May be SPAM ***','*** SPAM ***','','','-1','24','-1','24','N');
    ERROR 1265 (01000): Data truncated for column 'warnvirusrecip' at row 1
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Add or change the following line in the mysql my.cnf file so that it is like this one:

    sql_mode=NO_ENGINE_SUBSTITUTION

    The files are:

    /etc/my.cnf
    /usr/my.cnf

    and restart mysql.
     
  7. muekno

    muekno Active Member HowtoForge Supporter

    Sorry forgot to mention sql_mode is correct on all servers, otherwise I would have problems all the time. As I remember without correct sql_mode even installation of ISPConfig fails.

    Extrcat from my.cnf of slave, didn't change anything

    "
    # Remove leading # to set options mainly useful for reporting servers.
    # The server defaults are faster for transactions and fast SELECTs.
    # Adjust sizes as needed, experiment to find the optimal values.
    # join_buffer_size = 128M
    # sort_buffer_size = 2M
    # read_rnd_buffer_size = 2M

    sql_mode=NO_ENGINE_SUBSTITUTION

    [mysqld_multi]
    mysqld = /usr/bin/mysqld_safe
    mysqladmin = /usr/bin/mysqladmin
    log = /var/log/mysqld_multi.log

    # If you want to use mysqld_multi uncomment 1 or more mysqld sections
    # below or add your own ones.

    # WARNING
    # --------
    # If you uncomment mysqld1 than make absolutely sure, that database mysql,
    # configured above, is not started. This may result in corrupted data!
    #"
     
  8. muekno

    muekno Active Member HowtoForge Supporter

    Shall I try to move from mysql to mariadb on the slave?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The mysql server must be still in strict mode. There must be a my.cnf file that is used by mysql that does not contain the line somewhere.

    Did you check the location /usr/my.cnf as well? It overrides the /etc/my.cnf file. Maybe there is also a file in /etc/mysql/my.cnf?

    If you cant find it that you can try as a last resort:

    find / | grep my.cnf
     
  10. muekno

    muekno Active Member HowtoForge Supporter

    Thank you, /usr/my.cnfwas there. Since I had the problem some month before, you remember, on every new installation I check for duplicate my.cnf. That server was running fine since serveral months. From where ever in hell it sometimes reapears.
    I any case thank you very much for help

    Rainer
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you can try to make a symlink /usr/my.cnf and point it to /etc/my.cnf.
     

Share This Page