v1.1.0.RC4.3 - Managed to confuse the database - setup script now failing

  • Ok - first I have to apologize - I dont have a set of steps to reproduce this


    What I'd been doing is modifying the bind templates so that sites would generate with the 2 external name servers I want to use, then rerunning the setup script. Somewhere in the middle of this, I noticed that the .db files being produced were being written with SOA records that looked like


    Code
    1. www.domain.tld IN SOA ns1.www.domiain.tld postmaster.domain.tld.


    when I would have expected them to be


    Code
    1. domain.tld IN SOA ns1.domiain.tld postmaster.domain.tld.


    So I started deleting and re-adding the website.


    That worked a couple times. And my templates looked better (still only produced one NS line - but thats another question)


    And then, for no apparent reason, after deleting the domain, re-adding it and running the imscp-setup, setup failed with this error


    Code
    1. [Sun Oct 20 14:35:26 2013] [debug] iMSCP::Execute::execute: Execute /etc/init.d/apache2 start[Sun Oct 20 14:35:26 2013] [debug] iMSCP::Execute::getExitCode: External command exited with value 1[Sun Oct 20 14:35:26 2013] [debug] Servers::httpd::apache_fcgi::start: Starting web server: apache2Action 'start' failed.The Apache error log may have more information. failed![Sun Oct 20 14:35:12 2013] [debug] iMSCP::Execute::execute: Execute /usr/bin/dialog --backtitle 'i-MSCP - internet Multi Server Control Panel' --title 'i-MSCP Setup Dialog' --colors --msgbox '\Z1[ERROR]\ZnError while performing step:Rebuilding customers filesError was:\Z1main::setupRebuildCustomerFiles:[ERROR]Servers::httpd::apache_fcgi::restart: apache2: bad user name vu2006iMSCP::Debug::END: Exit code: 1 \Zn


    When I try and start Apache, it gives me this error


    Code
    1. apache2: bad user name ${APACHE_RUN_USER}


    but this is set in the envvars


    Code
    1. # Since there is no sane way to get the parsed apache2 config in scripts, some
    2. # settings are defined via environment variables and then used in apache2ctl,
    3. # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
    4. export APACHE_RUN_USER=www-data
    5. export APACHE_RUN_GROUP=www-data


    I can roll back to a snapshot to get around this - but there's something weird going on with either setup or deletion...

  • I know that bumping an old topic isn't the way we'd like this to go down, but in the most recent version of i-MSCP (1.1.13), I am still having this issue.
    After adding a domain to i-MSCP, I get an unknown error (domain status) and when I check the details it gives me this error for example:

    Code
    1. Servers::named::bind::_addDmnDb: Unable to install lala.com.db


    I was not able to find the issue, even with the DEBUG mode set to 1.
    The request manager pl script didn't give any errors either.
    The cp seems to be able to remove the domain, but when I try to re-add it, it gives me:

    Code
    1. Domain lala.com is unavailable.


    I have (like TS) altered the template file with an extra nameserver, guess that is what is causing all of this.


    To reproduce:
    Edit the db.tpl file in /etc/imscp/bind/parts and add a domain, now wait a few seconds and click details.

  • @theemstra


    And so?


    Do you are asking us how to solve your own mistakes ? If you start to customize i-MSCP, this mean that you know what you're doing. Here I see one possible issue: Orphan entry. You must now check the database to be sure that all data which belong to the domain you want to remove are deleted.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @theemstra


    And so?


    Do you are asking us how to solve your own mistakes ? If you start to customize i-MSCP, this mean that you know what you're doing. Here I see one possible issue: Orphan entry. You must now check the database to be sure that all data which belong to the domain you want to remove are deleted.


    Hi Nuxwin,


    Thanks for taking the time to answer.
    Could you tell me if there's any development in using multiple nameservers and also providing the bind DNS zones with multiple NS entries?


    I'll have a look at the deletion process, but that's only part of the problem.
    Also when registering a new domain in the system the error (below) appears in the domain status unknown.

    Code
    1. Servers::named::bind::_addDmnDb: Unable to install lala.com.db


    I can't be the only one here trying to configure a second (maybe a third) NS for a domain.


    Best regards

  • Re;


    In the last releases, the zones are checked. This mean that if something goes wrong such as a CNAME record which overmatch another record, the process will fail. If you want further help, you must provide us the related log which you can find in the /var/log/imscp directory.


    In order, try the following:

    • Enable the debug mode in the imscp.conf file
    • Change the status of the related domain to 'tochange'
    • Run the /var/www/imscp/engine/imscp-rqst-mngr perl script manually
    • Post the output
    • Post the log file content


    About the secondary DNS


    It's already possible to add a secondary DNS. Currently, it's not possible to set custom DNS server names. This will be implemented in near future.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi Nuxwin,


    Thanks again for taking the time to respond.
    I've found and fixed the problem.
    I had changed the dns template, but made a type (one double . with CNAME), after removing the domain name failed php-fpm config wasn't deleted properly.
    After searching good and well it started working again.


    I curreltly have two NS'ses installed, both with imscp.
    Customers could use the main server, the second one is used for backups and ns2.


    When I try testing the second nameserver (set up via the setup script) it just gives me "not authoritative" answers.
    After checking, it seems that imscp does not set up slave records in named.config.local, is that right or did I do something wrong?

  • Hello ;


    You modified the tpl manually so I cannot really say what is wrong here. I'll process some test by setting the slave DNS as usually through the installer and give you some feedback.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Some more information here:


    On the main server, this is correct:

    Code
    1. ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> domain.tld;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2248;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0;; QUESTION SECTION:;domain.tld. IN A;; ANSWER SECTION:domain.tld. 10800 IN A {IPADDR};; Query time: 0 msec;; SERVER: 127.0.0.1#53(127.0.0.1);; WHEN: Tue Jul 29 09:15:07 2014;; MSG SIZE rcvd: 50


    Now on the slave, same domain, when requested remotely:

    Code
    1. dig domain.tld @slaveserver; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> domain.tld @slaveserver;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 20136;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0;; WARNING: recursion requested but not available;; QUESTION SECTION:;domain.tld. IN A;; Query time: 7 msec;; SERVER: ipv6-addr:53;; WHEN: Tue Jul 29 09:16:27 2014;; MSG SIZE rcvd: 34


    On slave server, now local:


    This shows that the slave server does actually see the remote zone, but will not answer authoritive when asked from remote servers.