Setting up Mautic on Mac M1 | Health Check failing

Hey everyone, I ran into a problem while setting up the development environment for Mautic on my Mac M1. The issue was that the installation kept failing because of a health check problem. After investigating, I found out that the reason was using an outdated image of redis-commander (Docker), which hasn’t been updated in three years. This old image isn’t compatible with the type of processor (linux/arm64) that Mac M1 uses, so it needed emulation, which caused the health check to fail. Additionally, this old image has a lot of security vulnerabilities.
Now, many organizations use a different image for redis-commander (GitHub - joeferner/redis-commander: Redis management tool written in node.js) that gets updated frequently with patches and has good security ratings. It also supports all platforms, so I replaced the old image in the config with this one to make Mautic run smoothly. One big advantage of this new image is that it compiles directly on the Mac, which makes it faster compared to the old one.
Let me know if we would want to update this image officially for mautic or is there any reason that we are still using an old image for redis-commander? I can raise a PR for the same.

I’m using ddev on a M1 chip for years with no issue but perhaps I didn’t try to use Redis and so I didn’t get the same issues. Please send the PR with steps to test.

When I tried to run ddev start for setting up mautic, I got the following error:

Network ddev_default created
Starting mautic...
Network ddev-mautic_default created
Downloading https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-darwin-aarch64 ...
docker-compose 57.36 MiB / 57.36 MiB [======================================] 100.00% 25s
Download complete.
v1.22.7: Pulling from ddev/ddev-webserver
7760e74ccfac: Already exists
Digest: sha256:7fb390fd9ab428598c9ab814180003f634a21f518f6add38fd41c9cc0dbbe429
Status: Downloaded newer image for ddev/ddev-webserver:v1.22.7
docker.io/ddev/ddev-webserver:v1.22.7
v1.22.7: Pulling from ddev/ddev-ssh-agent
3027f1243ed9: Already exists
8eabb0ac8313: Already exists
83d0b1a4ded3: Already exists
4f4fb700ef54: Already exists
0c3b9e4264a3: Already exists
fb1411930bea: Already exists
Digest: sha256:e8361bbfec07763cfcec5851090038580a4b50e3b8b0ffecc7996ef5cd896aec
Status: Downloaded newer image for ddev/ddev-ssh-agent:v1.22.7
docker.io/ddev/ddev-ssh-agent:v1.22.7
v1.22.7: Pulling from ddev/ddev-traefik-router
c6b39de5b339: Pull complete
ce888d154752: Pull complete
81d93ef9adfa: Pull complete
60dbfa04f97d: Pull complete
da94b767f7b3: Pull complete
9d3636c09484: Pull complete
ac959ac71175: Pull complete
fb3fbd34603c: Pull complete
Digest: sha256:6cf1ddc3d57fee3a5f4bdf9e23ff42358c830d396926a7c84e63e3ed6952b593
Status: Downloaded newer image for ddev/ddev-traefik-router:v1.22.7
docker.io/ddev/ddev-traefik-router:v1.22.7
Downloading https://github.com/mutagen-io/mutagen/releases/download/v0.17.2/mutagen_darwin_arm64_v0.17.2.tar.gz ...
mutagen.tgz 91.51 MiB / 91.51 MiB [=========================================] 100.00% 46s
Download complete.
Stopped Mutagen daemon
 Container ddev-ssh-agent  Created
 Container ddev-ssh-agent  Started
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
v1.22.7: Pulling from ddev/ddev-dbserver-mariadb-10.3
2378679266ac: Already exists
f4c227d9b91d: Already exists
50d0716d74d0: Already exists
673f317ed742: Already exists
4d78d0014f81: Already exists
185e70d205e5: Already exists
4534fea313e2: Already exists
9b164fe96108: Already exists
aa2fc3b92caa: Already exists
4f4fb700ef54: Already exists
a1cd97ac0cb2: Already exists
b38fc15a1cec: Already exists
9c0aa2cf26aa: Already exists
fcf17bfb2dd8: Already exists
2e31c7508e69: Already exists
e51288f8c33b: Already exists
552bdd4124ed: Already exists
ff28d66fd067: Already exists
6c3f6ccdebaf: Already exists
958a448dd4c0: Already exists
56c11bb09b06: Already exists
661472af6c33: Already exists
99d9e73c20c8: Already exists
70511fdb3987: Already exists
Digest: sha256:57f47324a475110169a31b10d0cb12341232f0ad5bd407bb45d0d6af4c404a97
Status: Downloaded newer image for ddev/ddev-dbserver-mariadb-10.3:v1.22.7
docker.io/ddev/ddev-dbserver-mariadb-10.3:v1.22.7
Building project images...
Project images built in 1s.
 redis-commander The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 Container ddev-mautic-redis-commander  Created
 Container ddev-mautic-db  Created
 Container ddev-mautic-redis  Created
 Container ddev-mautic-web  Created
 Container ddev-mautic-db  Started
 Container ddev-mautic-redis-commander  Started
 Container ddev-mautic-redis  Started
 Container ddev-mautic-web  Started
You have Mutagen enabled and your 'php' project type doesn't have `upload_dirs` set.
For faster startup and less disk usage, set upload_dirs to where your user-generated files are stored.
If this is intended you can disable this warning with `ddev config --disable-upload-dirs-warning`.
Starting Mutagen sync process...
...Mutagen sync flush completed in 7s.
For details on sync status 'ddev mutagen st mautic -l'
Waiting for web/db containers to become ready: [web db]
Starting ddev-router if necessary...
 Container ddev-router  Created
 Container ddev-router  Started
Waiting for additional project containers to become ready...
Failed to start mautic: container(s) failed to become healthy before their configured timeout or in 120 seconds. This might be a problem with the healthcheck and not a functional problem. (health check timed out: labels map[com.ddev.site-name:mautic] timed out without becoming healthy, status=, detail= ddev-mautic-redis-commander:starting - more info with `docker inspect --format "{{json .State.Health }}" ddev-mautic-redis-commander` )

I tried to inspect it using docker inspect --format "{{json .State.Health }}" ddev-mautic-redis-commander and got the following output:

{"Status":"starting","FailingStreak":2,"Log":[{"Start":"2024-03-13T08:57:32.309618501Z","End":"2024-03-13T08:57:34.411254919Z","ExitCode":-1,"Output":"Health check exceeded timeout (2s)"},{"Start":"2024-03-13T08:58:34.41763521Z","End":"2024-03-13T08:58:36.485690461Z","ExitCode":-1,"Output":"Health check exceeded timeout (2s)"}]}

When i checked the redis-commander image on docker desktop, it showed a warning sign with image using linux/amd arch with emulation having performance issues and also the image being vulnerable.

Therefore, I checked the image on dockerhub and when it was updated and for which platforms it was available and if there are any alternatives that are being used widely that’s when i came across https://github.com/joeferner/redis-commander

2 Likes