Internal Server Error

Hello, I just updated my server from ubuntu 20.04 to 22.04 and all my websites are running normally but I can’t access the hestiacp admin panel (Internal Server Error)

Here’s the log via /var/log/hestia/nginx-error.log

2022/08/08 15:49:30 [error] 4171217#0: *39877 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "look" in /usr/local/hestia/web/templates/pages/list_backup.html on line 97" while reading upstream, client:, server: _, request: "GET /list/backup/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "", referrer: ""
2022/08/09 02:45:45 [crit] 740#0: *1 connect() to unix:/var/run/hestia-php.sock failed (2: No such file or directory) while connecting to upstream, client:, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: ""

The SMTP function has also become error so that I can’t receive and send emails

*For smtp function I don’t know how to get the error log

Hard to give advice without being able to get inside the machine and poke around. As general advice, have you rebooted since the upgrade? A reboot sometimes clears up mysterious errors like these.

Second thought, I think on upgrading from 20.x to 22.x you might have got a later version of exim which needs a different config file. You can see the different versions here

“apt policy exim4” will tell you what you have installed

Hi, I have rebooted once since the upgrade.

I have no experience with this kind of thing as this is the first time I’ve had an error like this so if you have a workaround for this I would really appreciate it

Here’s the output after run “apt policy exim4” command

[email protected]:~# apt policy exim4
  Installed: 4.95-4ubuntu2.1
  Candidate: 4.95-4ubuntu2.1
  Version table:
 *** 4.95-4ubuntu2.1 500
        500 jammy-updates/main amd64 Packages
        500 jammy-updates/main i386 Packages
        500 jammy-updates/main amd64 Packages
        500 jammy-updates/main i386 Packages
        100 /var/lib/dpkg/status
     4.95-4ubuntu2 500
        500 jammy/main amd64 Packages
        500 jammy/main i386 Packages
        500 jammy/main amd64 Packages
        500 jammy/main i386 Packages

OK, well you’ve definitely got the later version of exim, which needs the later config. And I see from the Hestia Install file, that the only difference between the two installs is the single config file.

if [ "$exim" = 'yes' ]; then
    echo "[ * ] Configuring Exim mail server..."
    gpasswd -a Debian-exim mail > /dev/null 2>&1
    if [ "$release" = "22.04" ]; then
      # Jammyy uses Exim 4.95 instead but config works with Exim4.94
      cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.4.94.template /etc/exim4/exim4.conf.template 
      cp -f $HESTIA_INSTALL_DIR/exim/exim4.conf.template /etc/exim4/

So I’d suggest taking a backup of your existing exim config file and replacing it with the new version. Are you comfortable doing that yourself?
I’m not saying this will definitely fix the problem, but it seems like something that needs to be done anyway.

I’d do something like this, but don’t just copy what I’m suggesting here, without understanding it.

cd /etc/exim4/
cp exim4.conf.template exim4.conf.backup220809
cp /usr/local/hestia/install/deb/exim/exim4.conf.4.94.template ./exim4.conf.template
systemctl restart exim4 
systemctl status exim4 

Should do the trick

But you are right…


Wow TYSM for your help, It works :blush:

Do you also have a solution for the admin panel (Internal Server Error) ?

Hi Eris, Do you also have a solution for the admin panel (Internal Server Error) ?

systemctl status hestia?

Try reinstalling hestia, hestia-php and hestia-nginx

Can you give the command to reinstall hestia, hestia-php and hestia-nginx?

Try first removing:
and replace it with libzip4

apt-get --reinstall install hestia hestia-php hestia-nginx

will reinstall hestia + its packages

I got this error message after run the reinstall command

when you upgrade your os, you also need to adjust the apt config files to your new os codename in /etc/apt/apt.d/. Do this, then apt update && apt --reinstall hestia-php and it should work.

1 Like

Hi ScIT, I can’t find apt.d, do you mean apt.conf.d ?

exactly, yes.

Can you tell me what files need to be adjusted ?

The output after run apt --reinstall hestia-php command :

[email protected]:/etc/apt/apt.conf.d# apt-get --reinstall install hestia-php
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  golang-1.18-go golang-1.18-src golang-1.19-doc golang-doc python3-libxml2
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for hestia-php:amd64

sorry, wrong path, sources.list.d is the folder.

So I just need to change “focal” to “jammy” in hestia.list file ?

1 Like

Yes, exactly.

But the problems still exist

have you done an apt update?