Internal server error (500) for click fail2ban buttons [SOLVED!]

Hi all!

My problem internal server error 500 for clicks for fail2ban button.

Internal Server Error

Oops! Something went wrong.

The server encountered an internal error or misconfiguration and was unable to complete your request.
Error Code: 500

nginx-error.log:

2023/04/15 14:25:45 [error] 48852#0: *71 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $ERROR in /usr/local/hestia/web/templates/pages/login/login_1.php on line 11" while reading response header from upstream, client: 91.82.171.23, server: _, request: "POST /login/ HTTP/1.1", upstream: "fastcgi://unix:/run/hestia-php.sock:", host: "95.138.193.62:8083", referrer: "https://95.138.193.62:8083/login/"
2023/04/15 14:25:57 [error] 48852#0: *71 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /usr/local/hestia/web/list/firewall/banlist/index.php:16
Stack trace:
#0 /usr/local/hestia/web/list/firewall/banlist/index.php(16): array_reverse()
#1 {main}
  thrown in /usr/local/hestia/web/list/firewall/banlist/index.php on line 16" while reading response header from upstream, client: 91.82.171.23, server: _, request: "GET /list/firewall/banlist/ HTTP/1.1", upstream: "fastcgi://unix:/run/hestia-php.sock:", host: "95.138.193.62:8083", referrer: "https://95.138.193.62:8083/list/firewall/"

My server: Debian 11, 64Bit, Hestia version: latest (1.7.2)

Please help, thanks!

What do you when run v-list-firewall-ban json ?

It is usually caused when the json out is not valid

List all banned ips.

        "IP": "43.153.210.18",
        "CHAIN": "RECIDIVE",
        "TIME": "13:24:04",
        "DATE": "2023-04-14"
    }
    "45.119.9.158": {
        "IP": "45.119.9.158",
        "CHAIN": "RECIDIVE",
        "TIME": "13:24:04",
        "DATE": "2023-04-14"
    }
    "46.148.40.62": {
        "IP": "46.148.40.62",
        "CHAIN": "RECIDIVE",
        "TIME": "13:24:04",
        "DATE": "2023-04-14"
    }

I have only copied a short part of it because there is so much.

Looks fine…

It is caused by issues in the json generation…

Solved!

1 Like

please share how :).

ftp to: /usr/local/hestia/data/firewall/
notepad++ open for: banlist.conf
There was a row among the many ips that started with NULL NULL and had strange letters. = empty banlist.conf and work.

But I also deleted the fail2ban database at the following: /var/lib/fail2ban/fail2ban.sqlite3
This is so that you don’t get stuck if hestia blocks an ip. This way it’s safer to avoid it collapsing again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.