mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.25k stars 1.12k forks source link

Mailcow admin ui (/debug) empty after update #5927

Closed SwissOS closed 4 days ago

SwissOS commented 5 days ago

Contribution guidelines

I've found a bug and checked that ...

Description

I have a very similar problem to https://github.com/mailcow/mailcow-dockerized/issues/5024
As per issue 5024, my TZ is correct in mailcow.conf (TZ=Europe/Zurich)

I just updated to the June 2024 version and now I can no longer see the system/information (/debug) page. I get an empty page. The server works (SoGO is functional) but when I go to /admin, I get this error:

An unknown error occured: TypeError Object( [message:protected] => Cannot access offset of type string on string [string:Error:private] => [code:protected] => 0 [file:protected] => /web/debug.php [line:protected] => 32 [trace:Error:private] => Array ( ) [previous:Error:private] => )

This seems like a PHP error from my googling. I don't know where to look further though. Any pointers?


### Logs:

```plain text
I don't see any particular errors in the nginx docker log. /debug has return code 200, all good:

[28/Jun/2024:10:02:49 +0200] "GET /debug HTTP/1.1" 200 31 "https://webmail.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0"

Steps to reproduce:

Updated with update.sh this morning to latest version
Go to webmail page, login, get redirected to domain.com/debug but no page is shown.

Which branch are you using?

master

Which architecture are you using?

ARM64 (aarch64)

Operating System:

Ubuntu 22.04

Server/VM specifications:

24GB/4 cores

Is Apparmor, SELinux or similar active?

no

Virtualization technology:

none

Docker version:

27.02

docker-compose version or docker compose version:

2.28.1

mailcow version:

2024-06a

Reverse proxy:

Nginx (proxy_pass http://mailcowdockerized-nginx-mailcow-1:8080)

Logs of git diff:

way too long, but not the issue (didn't change the code).
The only change I added was my hostname to extra.cf in Postfix.
Mail server still works perfectly, it's just a webpage issue (/debug).

Logs of iptables -L -vn:

way too long, but not the issue

Logs of ip6tables -L -vn:

way too long, but not the issue

Logs of iptables -L -vn -t nat:

way too long, but not the issue

Logs of ip6tables -L -vn -t nat:

way too long, but not the issue

DNS check:

172.64.155.249
104.18.32.7
Niroda commented 4 days ago

Same ..

MrBridgefarm commented 4 days ago

Login to the admin panel, show's only a white page on the debug page. Then you change the link to /admin it shows errors.. An unknown error occured: TypeError Object( [message:protected] => Cannot access offset of type string on string [string:Error:private] => [code:protected] => 0 [file:protected] => /web/debug.php [line:protected] => 32 [trace:Error:private] => Array ( ) [previous:Error:private] => ) image

i've tried to re-install, no backup. Plain install on arm64 (Oracle) same error.

milkmaker commented 4 days ago

THIS IS A AUTOMATED MESSAGE!

It seems your issue is not a bug. Therefore we highly advise you to get support!

You can get support either by:

This issue will be closed. If you think your reported issue is not a support case feel free to comment above and if so the issue will reopened.

SwissOS commented 4 days ago

"It seems your issue is not a bug." If it's not a bug, then what is it?

I had a perfectly working mailcow, did an update this morning and it stopped working. Is that not a bug?

It's not like I tried to add some extra feature or something else; I am not asking for "support". I see other people have the same problem, so obviously not a lone case.

Try to install it new on an Oracle ARM64 VM and report back if it works? You can get a free account, so you don't need to spend anything.

MrBridgefarm commented 4 days ago

I don't get it, it was working fine on 24.04 but it's broken on 24.06 So it's clearly a big. As SWISSOS says try to install it on a arm64

I've installed it on a complete new vn on oracle no reverse proxy. Still same error. Arm is broken

psonntag1 commented 4 days ago

I have the same issue on one of my machines after update to the latest stable version. Logging in with an admin account, the /debug page is empty and /admin shows the array error. If I login with a normal user account the GUI works just fine.

psonntag1 commented 4 days ago

I narrowed it down a bit:

After switching on DEV_MODE for php_fpm_mailcow in docker-compose.yml I get the following error after login: Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /web/debug.php:32 Stack trace: #0 {main} thrown in /web/debug.php on line 32

With adding a echo in debug.php date_default_timezone_set('UTC'); -->> echo $container_info; $StartedAt = date_parse($container_info['State']['StartedAt']);

I receive the following hint: Failed to connect to dockerapi port 443 after 14 ms: Couldn't connect to server Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /web/debug.php:33 Stack trace: #0 {main} thrown in /web/debug.php on line 33

So, connecting to the dockerapi container fails. Currently I have no idea why that happens.

A workaround is to comment the whole container block (line 26-54) in data/web/debug.php.

@DerLinkman I like to ask you to reevaluate your opinion regarding bug/support.

esackbauer commented 4 days ago

That sounds for me that something that was hot-fixed in 2024-06 broke the dockerapi integration: https://github.com/mailcow/mailcow-dockerized/issues/5924#issuecomment-2195095580 Maybe containers for ARM and x86 are a little different?

Magelo commented 4 days ago

After the june update, when you visit https://mailcow.url, it redirects you to https://mailcow.url/debug, which displays a blank page. However, if you manually replace /debug with /admin, you gain access to the configuration settings but not the desired information page.

psonntag1 commented 3 days ago

In my case I was able to resolve the issue by removing the "search" option in /etc/resolv.conf

Magelo commented 2 days ago

Removing "search" in /etc/resolv.conf is not working for me.

trying multiple refresh of https://mailcow.url/debug, then replace debug by admin I see this:

An unknown error occured: TypeError Object( [message:protected] => Cannot access offset of type string on string [string:Error:private] => [code:protected] => 0 [file:protected] => /web/debug.php [line:protected] => 32 [trace:Error:private] => Array ( ) [previous:Error:private] => )

Callahan78 commented 2 days ago

same here after udate to 2024-06a I´ve rolled back for now and hope that a solution can be found

mendozal commented 2 days ago

I have the same situation on an ARM machine on Oracle Cloud. Same blank page and error message. It only started to happened after the 2024-06 update.

I temporarily moved to an x86 machine and it's working fine there.

sergedc commented 2 days ago

Same here on ARM machine on Oracle Cloud

If I add in debug.php: echo “Container Info: ”; print_r($container_info); // Print the entire container_info array for debugging

I get: "Container Info: Could not resolve host: dockerapi"