Posts by Starlight

    Hey @Nuxwin, first of all, I need to thank you, having the patience to explain me, how the listeners work (I can use this to work on plugins whenever I find the time) and secondly about your impatience to do my part of the work. ;)


    Great work. And for sure, I help improving (or at least complaining about bugs), since I use the software and open source should work like this!


    Edit: @Nuxwin, which changes make them only work with i-MSCP 1.3.x? I would like to run it on my current 1.3.7 already and therefore modify it. Thanks!

    Dear @Nuxwin, great effort and faster than me. However, I have some points where I doubt, that it will work as intended:


    1) Line 36: I guess, it should be an array definition with equal instead of an arrow
    2) Line 70: $nsNumber should start with 1, there should not be an ns0. However, I would make it configurable, if people want to start with e.g. ns3
    3) Line 69: the for $ipAddrType is run twice and will add each ns two times in $nsRecordEntries
    4) The namespace is actually named instead of bind9


    I did not had the time to fix the third flaw.

    That might be true, if I just want to modify the content in a way like adding ns1 IN A IP. However, my plan was to use the build in functions of i-MSCP.


    The easiest way would be the definition of the DNS strings in an array and adding them in a one-liner.



    Your listener will receives:

    • A ref to scalar containing the content of the /etc/imscp/bind/parts/db.tpl template file
    • A ref to hash containing data as provided by Module data provider method

    That won't work, because the listener 10_named_override_default_ns_rr.pl already removed the block, before my listener kicks in... For getting the expected behavior, I would need to fix the other listener.


    Perl
    1. # Remove default nameservers records
    2. $$wrkFile =~ s/^(?:\@(?:\s+\d+)?\s+IN\s+NS|ns[0-9]\s+IN)\s+[^\n]+\n//gm;


    Comments?

    I created a listener file, and would add it to the i-mscp repository, when I patched the issue with the parallel A and AAAA records for the same NS (see @TODO).


    There must be also a possibility to get the location of the template file via variables in line 63 and 65. Help is highly appreciated.


    Sorry for the lat reply. My environment is:

    • i-MSCP 1.3.7
    • Debian GNU/Linux 8.6 (jessie)
    • Error on access via http and https
    • SQL-Server on another host

    I tried your fix and I did not changed my problem. I will investigate a bit further and let you know.

    By coding a little script. See the attachment or pastbin link below ;)

    I thought so, I should have asked a more precise question. ;)



    Wow, thank you for creating this. Result: The encrypted password is the original password without any additional escape chars. Nonetheless, the extra ' are added by the setup / upgrade script.


    I compared your script with the with the Servers::sqld::Remote_Server.pl and found a small but important difference:


    In line 188 you are calling escapeShell() and this adds the additional chars around the string.


    escapeShell() triggers always when the tested string contains other chars than [a-zA-Z0-9_\-].


    The fix should be trivial and I do not see any security issues.

    The description in #IP-1653 fits. However, I set the A-records via the (own) DNS Function. It looks like, they get added later to the template.


    I see two solutions now:
    1) i-MSCP build the template completely, before it checks the DNS records or
    2) I write a listener which invokes the ns1 and ns2 A and AAAA records during installation


    For the second option, I would like to know, which i-MSCP event would be the best to catch?

    Version: i-MSCP >= 1.2.0
    Setup with two or more name servers


    Problem
    When updating i-MSCP to the latest version, the name server settings are not properly set when using slave name server provisioning on a hosted domain name.


    Let example.com be hosted on i-MSCP and ns1.example.com and ns2.example.com be the two name servers used (ns2 is a slave to ns1 and provided with updated information by a listener script). All Domains use the same ns entries (ns1.example.com and ns2.example.com) as glue records.


    When updating the DNS entries during i-MSCP setup, an error occurs:

    Code
    1. [ERROR] main::setupDbTasks: Servers::named::bind::_addDmnDb: Could not dump example.com zone: zone example.com/IN: NS 'ns1.example.com' has no address records (A or AAAA)
    2. zone ylabs.de/IN: NS 'ns2.example.com has no address records (A or AAAA)
    3. zone ylabs.de/IN: not loaded due to errors. at /usr/local/src/imscp-1.3.7/engine/PerlLib/iMSCP/DbTasksProcessor.pm line 446.
    4. autoinstaller::Functions::install: An error occurred while performing installation steps

    Workaround
    Backup zone file before update and insert it between creation of the zone file (while updating the domain) and inserting the NS entries from database.


    Fix

    To investigate

    Version: i-MSCP >= 1.3.5
    Tool: Awstats

    Problem
    running http(s)://example.com/stats throws a Proxy error 502:


    Quote


    Proxy Error
    The proxy server received an invalidresponse from an upstream server.
    The proxy server could not handle the request GET /stats/.
    Reason: Error reading from remote server


    error.log gives following information:


    Quote


    [Wed Oct 26 23:48:04.309078 2016] [proxy_http:error] [pid 9876:tid 139666770597632] (20014)Internal error: [client <IP>:45748] AH01102: error reading status line from remote server 127.0.0.1:8889
    [Wed Oct 26 23:48:04.309116 2016] [proxy:error] [pid 9876:tid 139666770597632] [client <IP>:45748] AH00898: Error reading from remote server returned by /stats/


    Workaround
    None.


    Fix

    To investigate