Ispconfig 3 Mirror Setup - apache2 server - ServerAlias Bug?

Discussion in 'General' started by ChrisPhotonic3, Jun 21, 2015.

  1. ChrisPhotonic3

    ChrisPhotonic3 New Member

    I believe I found a bug in ISPConfig. Everything seemed to be working until I rebooted one of the nodes. Here is whats happening.

    My websites have two IP's, and are setup in a mirrored configuration. I have aliases prod1.domain.com and prod2.domain.com for domain.com. This allows me to test each node independently. Ispconfig was apparently writing them correctly on both nodes until something has changed.

    Node1: Writes apache2 files just fine. No problems.
    Node2: Missing required aliases.

    Example:
    /etc/apache2/sites-avaiable /testdomain

    ServerName testdomain
    ServerAlias testdomain prod2xxxx prod1xxxxx



    The file is writable because, I can add in Apache options or custom PHP variables and they show up in the file. The standard ones (www) show up but the custom ones do not on the second node.

    Anything else that I should check? Its annoying an error prone to have to rsync the apache files over.

    Any help would be greatly appreciated.

    Thanks,
    Chris

    PS - This is the second mirrored setup that's having the same problem.
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Verify that the system-log is empty and debug node2. I just check a alias-domain in a mirror-setup and the alias was written to both vhosts.
     
  3. ChrisPhotonic3

    ChrisPhotonic3 New Member

    I couple days ago I remember seeing an error to ispconfig2 in the mail.log. My clustered setup was working just fine for a while, then no email was getting sent out of the mail queue. I kept getting accessed denied from the second node, so I added a new user for the second node in phpmyadmin. Could that have something to do with it? It got rid of the error messages, and I was then able to send email just fine.

    I viewed: /usr/local/ispconfig/server/lib/config.inc.php and found

    $conf['db_database'] = 'dbispconfig2';
    $conf['db_user'] = 'dbispconfig2';
    $conf['db_password'] = 'xxxxxxxxxxx';

    I added another user with privileges. What I don't understand is why I had to do that after a few days of it running fine in a mirror configuration.

    My syslog looks like this:

    2015-06-20 15:30 azswsprod2.superiorwebdesign.com Error Unable to connect to the database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    2015-06-20 15:30 azswsprod2.superiorwebdesign.com Error Unable to connect to the database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    2015-06-20 15:30 azswsprod2.superiorwebdesign.com Error Unable to connect to the database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    2015-06-20 15:30 azswsprod2.superiorwebdesign.com Error Unable to connect to the database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    2015-06-20 15:30 azswsprod2.superiorwebdesign.com Error Unable to connect to the database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    2015-06-20 15:30 azswsprod2.superiorwebdesign.com Error Unable to connect to the database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    I believe that's from me restarting mysql. I can connect just fine now with my ~/.my.cnf for credentials:

    root@azswsprod2:/etc/bind# mysql -h localhost
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3898
    Server version: 5.5.43-0ubuntu0.14.04.1-log (Ubuntu)

    Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql>

    I added in a new test domain and the alias worked for test77 on the second node:

    ServerName test77com
    ServerAlias wwwtest77com
    ServerAlias wwwprod1test77.com prod1.est77com
    ServerAdmin webmastertest77com

    That worked this morning. This bug appears to be random. I took out the periods so I wouldn't get flagged as spam.
     

Share This Page