ispconfig 3.1.11 Ubuntu 18.04.2 postfix amavis unable to connect to DSN DBI

Discussion in 'Installation/Configuration' started by ISPCza, Feb 13, 2019 at 9:54 PM.

  1. ISPCza

    ISPCza New Member

    I upgraded the Server OS and the latest packages of Ubuntu 18.04 today, then ISPConfig started giving out the error and warnings on the Monitor tab for Postfix, Amavis related processes.

    amavis[14252]: (14252-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    amavis[14252]: (14252-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 110) line 253.
    amavis[14252]: (14252-01) (!)Requesting process rundown after fatal error

    postfix/smtp[16119]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    postfix/smtp[16119]: warning: fast_flush_domains: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    postfix/smtp[16119]: warning: 603BA3100D86: flush service failure
     
  2. ISPCza

    ISPCza New Member

    The issue arises from MariaDB config, "skip-name-resolve". I commented it out and the DB connection has been resolved.

    Now I am seeing,
    postfix/qmgr[76906]: warning: connect to transport private/smtp-amavis: No such file or directory

    Here is the content_filter after the upgrade,
    /etc/postfix/main.cf~ <<<<<<
    content_filter = amavis:[127.0.0.1]:10024

    /etc/postfix/main.cf
    content_filter = smtp-amavis:[localhost]:10024

    How to fix /etc/postfix/main.cf~ ?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    /etc/postfix/main.cf~ is a backup copy of /etc/postfix/main.cf, so its not used. But you can try to alter /etc/postfix/main.cf so that the line looks like in /etc/postfix/main.cf~
     
  4. ISPCza

    ISPCza New Member

    Hi Till,

    The following changes applied and services back to function,

    /etc/postfix/main.cf
    content_filter = amavis:[127.0.0.1]:10024

    /etc/postfix/main.cf~
    content_filter = amavis:[127.0.0.1]:10024

    /etc/amavis/conf.d/05-node_id
    $myhostname = "yourhostname.domain.com";

    To summarize, if you have a setup which is running fine on Ubuntu 18.04.1 + ISPConfig 3.1.11 and tried to upgrade the OS and Packages where you end up with Ubuntu 18.04.2 then,
    1.
    /etc/mysql/mariadb.conf.d/50-server.cnf
    skip-name-resolve <<< comment or remove this setting, you may be using it for performance improvements of MaraiDB v10.1.38, I recommend to try not to use it

    2.
    /etc/postfix/main.cf
    /etc/postfix/main.cf~
    content_filter = amavis:[127.0.0.1]:10024 <<< its amavis not smtp-amavis

    3.
    /etc/amavis/conf.d/05-node_id
    $myhostname = "yourhostname.domain.com"; <<< uncomment this config variable and set it to reflect to yourhostname.domain.com

    4.
    Restart postfix, amavisd-new system services

    Thanks Till!!
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    1) This is not set by ispconfig and yes, you should not set it manually.
    2) I have an Ubuntu 18.04 system here with ISPConfig 3.1.13 and the setting is correct, so not sure why its incorrect on your server.
    3) This is not necessary and should not be made, it just indicates that you configured the hostname of your server wrong. So instead of editing that file, better for the server hostname so that:

    hostname

    returns the short hostname and

    hostname -f

    returns the fqdn hostname.
     
  6. ISPCza

    ISPCza New Member

    Hi Till,

    I appreciate your comments. Initially the setup was tried with Ubuntu 18.04.1 and ISPConfig 3.1.13 and the installation didn't complete successfully (I am not sure why) then the decision was made to try with ISPC 3.1.11 and got it successful. May be the Point 2 could be fine with 3.1.13 but not with 3.1.11 after upgrade, its still same version of ISPC not upgraded.

    Until yesterday when I tried with DB performance tuning and upgraded Ubuntu packages on a system wide the setup showed no trouble and after that the issues started, now they are sorted.

    Point 3 may not be necessary, I just shared what I tried and see it helping. But the server hostname config is in order all the time on my server.

    Thanks Till!
     

Share This Page