Error 500 on ISPconfig 3.1 (plus latest patches) on Unbuntu14

Discussion in 'ISPConfig 3 Priority Support' started by peterpetr, Nov 21, 2016.

  1. peterpetr

    peterpetr Member

    I've updated this Ubuntu server to ISPconfig 3.1 and installed the latest patches. Every few hours I get Error 500 when accessing any website. I am able to reboot from my terminal. Then everything runs fine for a few hours.
    I'm somewhat new to Linus and ISPconfig. Have several years experience with Windows servers, so I would appreciate Linux newbie level assistance with how to diagnose and resolve this issue. Thank you.

    I checked the: error_log /var/log/nginx/error.log;
    and found:
    2016/11/21 09:17:13 [error] 2830#0: *863 FastCGI sent in stderr: "onnect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 247" while reading response header from upstream, client: 50.xx.xx.xx, server: _, request: "GET /keepalive.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "myhostname.com:8080", referrer: "https://myhostname.com:8080/index.php"
    2016/11/21 09:34:15 [error] 2830#0: *993 FastCGI sent in stderr: "PHP message: PHP Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 79
    PHP message: PHP Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 85
     
  2. peterpetr

    peterpetr Member

    I am still getting the "Error 500" as described in the previous post in this thread. I've attached the "htf_report.txt" output.
    Please reply to help me diagnose and resolve this. This is a production server hosting several WordPress sites. I have to reboot this Unbuntu 14 server several times per day after getting the "Error 500".
    Is there any way to give my request a higher priority?
    I've posted several days ago and have not seen a response yet.
    Thank you.
     

    Attached Files:

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if your MySQL server is unstable as it rejects connections and is offline. You should check the /var/log/syslog file for errors. Beside that, the reasons for 500 errors are logged in the error.log file of the website where it appears, not in the global nginx error.log.

    Are you sure that your server is not running out of RAM? Did you check the ram and processor usage with the top command?

    If you need support by remote login, then please contact the ISPConfig business support: http://www.ispconfig.org/get-support/?type=ispconfig
     
  4. peterpetr

    peterpetr Member

    Thank you for the guidance.
    (a) RAM is at 4% usage, Swap usage: 0%, System load just above 0%, Disk space used; 24%
    (b) /var/log/syslog It seems that there are many error messages with:
    "myservername postfix/error[8987]: warning: connect to mysql server 74.xx.xx.xx: Can't connect to MySQL server on '74.xx.xx.xx' (110)"
    where the IP '74.xx.xx.xx' is NOT the ip address of my server. So, I must have been hacked, correct?
    (c) Error 500, when it happens on one website, it also happens on the other sites and also for the main ISPconfig admin at www.myserver.com:8080

    Question: There are only 5 WordPress sites on this VPS. If in fact, the VPS got hacked, I'm thinking to create another Ubuntu server (or restore from a backup a month ago, before the Error 500 issue), there restore the 5 WordPress sites. Or, do you have any other suggestions? Thank you.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't think that your server got hacked. Such a connects won't make much sense for a hacker. Please check the postfix mysql configuration files in /etc/postfix/ folder, they should contain the localhost IP:

    hosts = 127.0.0.1

    and not an external IP. If they contain an external IP, then there was probably a failure in /etc/hosts file at the time you installed ispconfig.
     

Share This Page