Skip to content

Container is unhealthy #85

@twiesing

Description

@twiesing

Behaviour

Steps to reproduce this issue

  1. ?
  2. ?
  3. ?

Expected behaviour

Container is healthy and I can use mail function from other containers in the same network.

Actual behaviour

Container goes unhealthy after a period of time. After recreating the container, it works again for few days.

Configuration

services:
  app:
    image: crazymax/msmtpd:latest
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
      - SMTP_HOST=mail.agenturserver.de
      - SMTP_TLS=on
      - SMTP_STARTTLS=on
      - SMTP_TLS_CHECKCERT=on
      - SMTP_AUTH=on
      - SMTP_USER
      - SMTP_PASSWORD
      - SMTP_FROM
      - SMTP_PORT=587
    networks:
      proxy_mails:

networks:
  proxy_mails:
    name: proxy_mails

Other apps connect to the network proxy_mails.

Docker info

Client:
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.19.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.31.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 105
  Running: 101
  Paused: 0
  Stopped: 4
 Images: 47
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: local
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 207ad711eabd375a01713109a8a197d197ff6542
 runc version: 7cb363254b69e10320360b63fb73e0ffb5da7bf2
 init version:
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.8-0-lts
 Operating System: Alpine Linux v3.21
 OSType: linux
 Architecture: aarch64
 CPUs: 8
 Total Memory: 15.23GiB
 Name: cloud-02.hostname.de
 ID: 921281b2-1f88-477e-b460-96024ae2ed2a
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: true
 Default Address Pools:
   Base: 172.16.0.0/12, Size: 24

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Logs

/home/username/services/msmtpd [git::main] [username@cloud-02] [6:34]
> dcps
NAME           IMAGE                    COMMAND   SERVICE   CREATED      STATUS                  PORTS
msmtpd-app-1   crazymax/msmtpd:latest   "/init"   app       9 days ago   Up 9 days (unhealthy)   2500/tcp
/home/username/services/msmtpd [git::main] [username@cloud-02] [6:34]
> docker compose logs
app-1  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
app-1  | [s6-init] ensuring user provided files have correct perms...exited 0.
app-1  | [fix-attrs.d] applying ownership & permissions fixes...
app-1  | [fix-attrs.d] done.
app-1  | [cont-init.d] executing container initialization scripts...
app-1  | [cont-init.d] 00-fix-logs.sh: executing...
app-1  | [cont-init.d] 00-fix-logs.sh: exited 0.
app-1  | [cont-init.d] 01-fix-uidgid.sh: executing...
app-1  | [cont-init.d] 01-fix-uidgid.sh: exited 0.
app-1  | [cont-init.d] 02-config.sh: executing...
app-1  | Setting timezone to Europe/Berlin...
app-1  | Creating configuration...
app-1  | [cont-init.d] 02-config.sh: exited 0.
app-1  | [cont-init.d] 03-create-service.sh: executing...
app-1  | [cont-init.d] 03-create-service.sh: exited 0.
app-1  | [cont-init.d] ~-socklog: executing...
app-1  | [cont-init.d] ~-socklog: exited 0.
app-1  | [cont-init.d] done.
app-1  | [services.d] starting services
app-1  | [services.d] done.
            "Health": {
                "Status": "unhealthy",
                "FailingStreak": 35688,
                "Log": [
                    {
                        "Start": "2025-01-27T06:42:29.635452+01:00",
                        "End": "2025-01-27T06:42:34.735151284+01:00",
                        "ExitCode": -1,
                        "Output": "Health check exceeded timeout (5s)"
                    },
                    {
                        "Start": "2025-01-27T06:42:44.736538082+01:00",
                        "End": "2025-01-27T06:42:49.825242674+01:00",
                        "ExitCode": -1,
                        "Output": "Health check exceeded timeout (5s)"
                    },
                    {
                        "Start": "2025-01-27T06:42:59.826693754+01:00",
                        "End": "2025-01-27T06:43:04.910975149+01:00",
                        "ExitCode": -1,
                        "Output": "Health check exceeded timeout (5s)"
                    },
                    {
                        "Start": "2025-01-27T06:43:14.911679222+01:00",
                        "End": "2025-01-27T06:43:20.013179721+01:00",
                        "ExitCode": -1,
                        "Output": "Health check exceeded timeout (5s)"
                    },
                    {
                        "Start": "2025-01-27T06:43:30.013705153+01:00",
                        "End": "2025-01-27T06:43:35.117999594+01:00",
                        "ExitCode": -1,
                        "Output": "Health check exceeded timeout (5s)"
                    }
                ]
            }
/home/username/customers/cus1 [git::main] [username@cloud-02] [6:39]
> docker compose exec app sh
/var/www/html $ ping msmtpd-app-1
PING msmtpd-app-1 (172.16.17.5): 56 data bytes
64 bytes from 172.16.17.5: seq=0 ttl=42 time=0.082 ms
64 bytes from 172.16.17.5: seq=1 ttl=42 time=0.098 ms
/home/username/services/msmtpd [git::main] [username@cloud-02] [6:39]
> docker compose exec app sh
/ # ping cus1-app-1
PING 1-app-1 (172.16.17.27): 56 data bytes
64 bytes from 172.16.17.27: seq=0 ttl=64 time=0.333 ms
64 bytes from 172.16.17.27: seq=1 ttl=64 time=0.075 ms

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions