Bug: awstats not accessible: proxy error

  • 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

  • Distro? Codename?

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

  • No answer...


    Well, I cannot reproduce the problem


    Environment

    • i-MSCP 1.3.x
    • Debian GNU/Linux 8.6 (jessie)

    Access through http


    stats_http.png


    Access through https


    stats_https.png


    However such problem can be caused for many reasons. I'll commit a change to try to mitigate this issue.

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

  • A fix has been added in the 1.3.x branch. See https://github.com/i-MSCP/imsc…dc8fde4dafd3edd4989177728
    This fix will be part of next release.


    Thank you for your report.


    Thread closed.

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

  • 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.

    Edited once, last by Starlight ().

  • @Starlight


    You use an external SQL server. I need to check if that could be the problem (mod_dbd apache module that cannot connect to your SQL server).

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

  • @Starlight


    Can you give a try by setting manually the mod_dbd params as follow in the 01_awstats.conf file, and restarting apache?:


    Code
    1. DBDMin 2
    2. DBDKeep 5
    3. DBDMax 10
    4. DBDExptime 300


    Also please, do you use an IP or hostname for access to your remote SQL server?


    Anyway, I think that I'll drop dbd and back to File auth provider.

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

  • Dear @Nuxwin your proposed settings work


    The connection string contains the hostname of the DB-Server (what resolves perfectly, because it is added to the server's host-file).


    I played a bit around with the settings and it looks like, that DBDMin 0 not a valid option is (DBDmin 1 works).


    Thank you for your debugging.

  • @Starlight


    The problem of this setting set to a non-zero value is that if the MySQL server is not running, Apache will not start...
    Furthermore, my thinking is that using MySQL as data source for credential is an error in that context (Basic Auth). I prefer back to the file authentication provider.


    Anyway, thank you for your tests.

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