mailcow-dockerized icon indicating copy to clipboard operation
mailcow-dockerized copied to clipboard

Update to June update not possible

Open timscha opened this issue 2 years ago โ€ข 19 comments

Contribution guidelines

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

  • [X] ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
  • [X] ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
  • [X] ... I have understood that answers are voluntary and community-driven, and not commercial support.
  • [X] ... I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description

I tried to update to new june update. I installed docker compose 2 on the server. When running the update.sh script the following happens:

root@mx2:/opt/mailcow# ./update.sh
checking docker compose version...
Found Compose v2!
Checking internet connection... OK
Checking for newer update script...
Updated 0 paths from 81c34126
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y
Great! Native IPv6 NAT is active.
Validating docker-compose stack configuration...
1 error(s) decoding:

* error decoding 'Ports': Invalid ip address :: address ::: too many colons in address

Oh no, something went wrong. Please check the error message above.

Logs

No logs available. That's all I got.

Steps to reproduce

  1. Install docker compose 2 as mentioned on the offical documentation
  2. run the ./update.sh script

System information

Question Answer
My operating system Debian 11
Is Apparmor, SELinux or similar active? No
Virtualization technology (KVM, VMware, Xen, etc - LXC and OpenVZ are not supported KVM
Server/VM specifications (Memory, CPU Cores) 4 GB, 4 Cores
Docker version (docker version) 20.10.17
docker-compose version (docker-compose version) Docker Compose version v2.6.0
mailcow version (git describe --tags `git rev-list --tags --max-count=1` ) 2022-06
Reverse proxy (custom solution) No

Output of git diff origin/master, any other changes to the code? If so, please post them:

root@mx2:/opt/mailcow# git diff origin/master
diff --git a/data/Dockerfiles/acme/Dockerfile b/data/Dockerfiles/acme/Dockerfile
index f5b7b56c..a0ec058c 100644
--- a/data/Dockerfiles/acme/Dockerfile
+++ b/data/Dockerfiles/acme/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.16
+FROM alpine:3.15

 LABEL maintainer "Andre Peters <[email protected]>"

diff --git a/data/Dockerfiles/clamd/Dockerfile b/data/Dockerfiles/clamd/Dockerfile
index a4971133..42d0ce97 100644
--- a/data/Dockerfiles/clamd/Dockerfile
+++ b/data/Dockerfiles/clamd/Dockerfile
@@ -1,4 +1,4 @@
-FROM clamav/clamav:0.105.0_base
+FROM clamav/clamav:0.104.2-2_base

 LABEL maintainer "Andrรฉ Peters <[email protected]>"

diff --git a/data/Dockerfiles/dockerapi/Dockerfile b/data/Dockerfiles/dockerapi/Dockerfile
index 41d4a78f..fb51f079 100644
--- a/data/Dockerfiles/dockerapi/Dockerfile
+++ b/data/Dockerfiles/dockerapi/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.16
+FROM alpine:3.15

 LABEL maintainer "Andre Peters <[email protected]>"

diff --git a/data/Dockerfiles/netfilter/Dockerfile b/data/Dockerfiles/netfilter/Dockerfile
index 621da149..ce8fddbc 100644
--- a/data/Dockerfiles/netfilter/Dockerfile
+++ b/data/Dockerfiles/netfilter/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.16
+FROM alpine:3.15
 LABEL maintainer "Andre Peters <[email protected]>"

 ENV XTABLES_LIBDIR /usr/lib/xtables
diff --git a/data/Dockerfiles/olefy/Dockerfile b/data/Dockerfiles/olefy/Dockerfile
index 889f84b4..a1a42482 100644
--- a/data/Dockerfiles/olefy/Dockerfile
+++ b/data/Dockerfiles/olefy/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.16
+FROM alpine:3.15
 LABEL maintainer "Andre Peters <[email protected]>"

timscha avatar Jun 07 '22 14:06 timscha

I've got the same Problem with Ubuntu 20.04

TokkCorp avatar Jun 07 '22 14:06 TokkCorp

have you set HTTP_BIND or HTTPS_BIND in mailcow.conf? Currently only IPv4 bindings are possible for the Admin UI. IPv6 binding must be done with a docker.override.yml

probably triggered by these lines https://github.com/mailcow/mailcow-dockerized/blob/63f718178e22ad0c89e0cacd64aadb8beda9301b/docker-compose.yml#L379-L381

FreddleSpl0it avatar Jun 07 '22 14:06 FreddleSpl0it

I have the following lines in my docker-compose.yml:

    ports:
        - "${HTTPS_BIND:-:}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
        - "${HTTP_BIND:-:}:${HTTP_PORT:-80}:${HTTP_PORT:-80}"

TokkCorp avatar Jun 07 '22 14:06 TokkCorp

I have the following lines in my docker-compose.yml:

    ports:
        - "${HTTPS_BIND:-:}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
        - "${HTTP_BIND:-:}:${HTTP_PORT:-80}:${HTTP_PORT:-80}"

please adjust these lines to this. https://github.com/mailcow/mailcow-dockerized/blob/63f718178e22ad0c89e0cacd64aadb8beda9301b/docker-compose.yml#L379-L381

I'll have a look why your docker-compose.yml wasn't updated

FreddleSpl0it avatar Jun 07 '22 14:06 FreddleSpl0it

@FreddleSpl0it: With you bugfix it worked. Update completed.

timscha avatar Jun 07 '22 14:06 timscha

please adjust these lines to this.

https://github.com/mailcow/mailcow-dockerized/blob/63f718178e22ad0c89e0cacd64aadb8beda9301b/docker-compose.yml#L379-L381

Thank you, it worked for me too.

chatainsim avatar Jun 07 '22 14:06 chatainsim

@FreddleSpl0it Worked for me too! Thank you.
Perhaps it is worth mentioning that I chanceled the update-script to install docker-compose v2 after the warning and restarted the update afterwards.

TokkCorp avatar Jun 07 '22 14:06 TokkCorp

Oh and for further debugging @FreddleSpl0it: HTTP_BIND & HTTPS_BIND are not set in my config.

timscha avatar Jun 07 '22 14:06 timscha

Maybe there is an docker-compose.override.yml file which defines some redirects with ipv6 addresses.

https://github.com/docker/compose/issues/8721#issuecomment-932403006

docker compose v2 uses now [2a01::1]:25:25 as an valid format (before 2a01::1:25:25).

mnin avatar Jun 07 '22 14:06 mnin

Nop, on my installations there is no docker-compose.override.yml file :)

timscha avatar Jun 07 '22 14:06 timscha

@timscha are you have some ipv6 addresses defined in the other config files on your setup?

mnin avatar Jun 07 '22 15:06 mnin

For all who have the same issue:

  1. Uninstall Docker Compose v2 (apt remove docker-compose-plugin)
  2. Run the update.sh Script
  3. Reinstall Docker Compose v2 (apt install docker-compose-plugin)
  4. Stop the mailcow Stack with Docker Compose v1 (docker-compose down)
  5. Start the mailcow Stack with Docker Compose v2 (docker compose up -d)

DerLinkman avatar Jun 07 '22 15:06 DerLinkman

@mnin I have two instances. One updated, one old one. On both IPV6_NETWORK in mailcow.conf is filled in with something that looks like a private IPv6 address.

timscha avatar Jun 07 '22 15:06 timscha

Second instance update worked without a problem, following the steps provided by @DerLinkman. I guess, having installed both docker-compose versions causing the problem.

timscha avatar Jun 07 '22 15:06 timscha

Could be. As the update.sh Script use the newest compose he finds to run the update process. If you have a unpatched compose.yml inside your mailcow directory then this error will thrown, since this format is to old for the new compose.

DerLinkman avatar Jun 07 '22 15:06 DerLinkman

Same issue here on 3 instances. The steps from @DerLinkman did not work, I needed to manually correct the two mentioned lines to get it working.

jacotec avatar Jun 07 '22 18:06 jacotec

Yes alternatively do a git checkout origin/master docker-compose.yml and rerun the script again.

DerLinkman avatar Jun 07 '22 18:06 DerLinkman

I did my usual and checked for bug reports before running upgrade, and found this one - anyway, after finding and reading this I found the following upgrade path worked for me:

  1. Remove Docker compose v1
  2. Install Docker compose v2
  3. Apply changes by FreddleSpl0it
  4. Run update.sh
  5. Done - successful upgrade!

Anyway, thanks again to all the mailcow devs!

CrazyLinuxNerd avatar Jun 09 '22 03:06 CrazyLinuxNerd

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

milkmaker avatar Aug 08 '22 09:08 milkmaker