Hello,
I have a problem regarding mailcow installation.
I get the following information in the browser:
What is happening?
Please do not stop the stack while we are initializing the database or do other preparations.
What is happening? - Nginx cannot connect to an upstream server or other services are not ready yet.
This is fine if mailcow was just installed or updated and can take a few minutes to complete.
Please check the logs or contact support if the error persists.
Quick debugging
Check Nginx and PHP logs:
docker-compose logs –tail=200 php-fpm-mailcow nginx-mailcow
Make sure your SQL credentials in mailcow.conf (a link to .env) do fit your initialized SQL volume. If you see an access denied, you might have the wrong mailcow.conf:
source mailcow.conf ; docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
In case of a previous failed installation, create a backup of your existing data, followed by removing all volumes and starting over (NEVER do this with a production system, it will remove ALL data):
BACKUP_LOCATION=/tmp/ ./helper-scripts/backup_and_restore.sh backup all
docker-compose down –volumes ; docker-compose up -d
Make sure your timezone is correct. Use “America/New_York” for example, do not use spaces. Check here for a list.
Click to learn more about getting support.
After running docker-compose logs … I get this:
php-fpm-mailcow_1 | Waiting for SQL…
php-fpm-mailcow_1 | Waiting for SQL…
php-fpm-mailcow_1 | Waiting for SQL…
php-fpm-mailcow_1 | Uptime: 2 Threads: 2 Questions: 3 Slow queries: 0 Opens: 17 Open tables: 10 Queries per second avg: 1.500
php-fpm-mailcow_1 | MySQL @ f65e87eed5d4948a774d12590328ec42a8cf08cbafe1009f0226936d270a6cd0
php-fpm-mailcow_1 | SQL upgrade iteration #1
php-fpm-mailcow_1 | MySQL is up-to-date - debug output:
php-fpm-mailcow_1 | {“msg”:“mysql_upgrade: already upgraded”,“text”:“This installation of MariaDB is already upgraded to 10.5.15-MariaDB.\nThere is no need to run mysql_upgrade again for 10.5.15-MariaDB.\nYou can use –force if you still want to run mysql_upgrade\n”,“type”:“success”}
php-fpm-mailcow_1 | MySQL mysql_tzinfo_to_sql - debug output:
php-fpm-mailcow_1 | {“msg”:“mysql_tzinfo_to_sql: command completed successfully”,“text”:“Warning: Unable to load ‘/usr/share/zoneinfo/leap-seconds.list’ as time zone. Skipping it.\nWarning: Unable to load ‘/usr/share/zoneinfo/leapseconds’ as time zone. Skipping it.\nWarning: Unable to load ‘/usr/share/zoneinfo/tzdata.zi’ as time zone. Skipping it.\n”,“type”:“info”}
php-fpm-mailcow_1 | We are master, preparing…
php-fpm-mailcow_1 | OK
php-fpm-mailcow_1 | OK
php-fpm-mailcow_1 | 1
php-fpm-mailcow_1 | 1
php-fpm-mailcow_1 | 1
php-fpm-mailcow_1 | 1
php-fpm-mailcow_1 | 1
php-fpm-mailcow_1 | Running DB init…
php-fpm-mailcow_1 | Cleaned up memcached
php-fpm-mailcow_1 | DB initialization completed
php-fpm-mailcow_1 | Rebuilding domain map in Redis…
php-fpm-mailcow_1 | find: /web/templates/cache/*: No such file or directory
php-fpm-mailcow_1 | [07-Mar-2022 14:08:11] NOTICE: fpm is running, pid 1
php-fpm-mailcow_1 | [07-Mar-2022 14:08:12] NOTICE: ready to handle connections
nginx-mailcow_1 | 2022/03/07 14:07:51 [emerg] 15#15: host not found in upstream “rspamd” in /etc/nginx/conf.d/includes/site-defaults.conf:111
nginx-mailcow_1 | nginx: [emerg] host not found in upstream “rspamd” in /etc/nginx/conf.d/includes/site-defaults.conf:111
nginx-mailcow_1 | nginx: configuration file /etc/nginx/nginx.conf test failed
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: using the “epoll” event method
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: nginx/1.21.6
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027)
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: OS: Linux 4.19.0-18-cloud-amd64
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start worker processes
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start worker process 22
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start worker process 23
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start worker process 24
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start worker process 25
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start cache manager process 26
nginx-mailcow_1 | 2022/03/07 14:07:55 [notice] 1#1: start cache loader process 27
nginx-mailcow_1 | 2022/03/07 14:07:57 [error] 22#22: *1 connect() failed (111: Connection refused) while connecting to upstream, client: myClientIP, server: mail.domain.de, request: “GET / HTTP/2.0”, upstream: “fastcgi://172.22.1.9:9002”, host: “mail.domain:8443”
nginx-mailcow_1 | 2022/03/07 14:07:57 [error] 22#22: *1 connect() failed (111: Connection refused) while connecting to upstream, client: myClientIP, server: mail.domain.de, request: “GET / HTTP/2.0”, upstream: “fastcgi://[fd4d:6169:6c63:6f77::c]:9002”, host: “mail.domain.de:8443”
nginx-mailcow_1 | myClientIP - - [07/Mar/2022:14:07:57 +0000] “GET / HTTP/2.0” 502 2038 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15”
nginx-mailcow_1 | 2022/03/07 14:07:58 [error] 22#22: *1 no live upstreams while connecting to upstream, client: myClientIP, server: mail.domain.de, request: “GET / HTTP/2.0”, upstream: “fastcgi://phpfpm”, host: “mail.domain.de:8443”
nginx-mailcow_1 | myClientIP - - [07/Mar/2022:14:07:58 +0000] “GET / HTTP/2.0” 502 2038 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15”
I am running a normal website on my server where I tried to install mailcow. My DNS configuration (Cloudflare) looks like this:
TXT - domain.de - “v=spf1 mx a -all” - DNS only
TXT - _dmarc - “v=DMARC1; p=reject; rua=mailto:admin@domain.de” - DNS only
MX - domain.de - mail.domain.de - Prio 10 - DNS only
CNAME - autoconfig - mail.domain.de - DNS only
CNAME - autodiscover - mail.domain.de - DNS only
A - mail - IPv4 address - DNS only
A - domain.de - IPv4 address - Proxied (which redirects to /var/www/domain on the server directory.