Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: Docker container shows as up but unhealthy. #843

Open
devanteweary opened this issue Oct 18, 2024 · 8 comments
Open

Help: Docker container shows as up but unhealthy. #843

devanteweary opened this issue Oct 18, 2024 · 8 comments

Comments

@devanteweary
Copy link

TLDR: * Docker container shows as up but unhealthy.

  1. Is this urgent: No
  2. DNS provider(s) you use: Porkbun, Cloudflare, DuckDNS, NO-IP
  3. Program version: 2024-10-12T17:50:09.387Z (commit 74077df)
  4. What are you using to run the container: Unraid Docker
  5. Host OS: Unraid 6.12.13
  6. Extra information (optional)

This actually started happening months ago. I've just been too lazy to report it.

It was working fine, then one day it stopped.
Probably after an update or something.

The container will show as up but unhealthy.
For example, right now it shows "Up 16 hours (unhealthy)".

It seems to be working fine; the only reason I noticed is because now UptimeKuma reports it as down even though it's running.
I posted over there at the UptimeKuma github and they suggested if the container is showing up and unhealthy, it means the container itself is reporting an issue. (but if it showed healthy, then UptimeKuma could have been the issue).

Logs:



========================================
========================================
============= ddns-updater =============
========================================
=========== Made with ❤️ by ============
======= https://github.com/qdm12 =======
========================================
========================================

Running version latest built on 2024-10-12T17:50:09.387Z (commit 74077df)

🔧 Need help? ☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new/choose
🐛 Bug? ✨ New feature? https://github.com/qdm12/ddns-updater/issues/new/choose
💻 Email? [email protected]
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-10-17T22:27:38-07:00 INFO Settings summary:
├── HTTP client
|   └── Timeout: 10s
├── Update
|   ├── Period: 5m0s
|   └── Cooldown: 5m0s
├── Public IP fetching
|   ├── HTTP enabled: yes
|   ├── HTTP IP providers
|   |   └── all
|   ├── HTTP IPv4 providers
|   |   └── all
|   ├── HTTP IPv6 providers
|   |   └── all
|   ├── DNS enabled: yes
|   ├── DNS timeout: 3s
|   └── DNS over TLS providers
|       └── all
├── Resolver: use Go default resolver
├── Server
|   ├── Listening address: :8000
|   └── Root URL: /
├── Health
|   └── Server listening address: 127.0.0.1:9999
├── Paths
|   ├── Data directory: /updater/data
|   ├── Config file: /updater/data/config.json
|   └── Umask: system default
├── Backup
|   ├── Period: 24h0m0s
|   └── Directory: /updater/data/backup
└── Logger
    ├── Level: info
    └── Caller: hidden
2024-10-17T22:27:38-07:00 INFO reading JSON config from file /updater/data/config.json
2024-10-17T22:27:38-07:00 INFO Found 6 settings to update records

2024-10-17T22:27:38-07:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999
2024-10-17T22:27:38-07:00 INFO [http server] http server listening on [::]:8000
2024-10-17T22:27:38-07:00 INFO [backup] each 24h0m0s; writing zip files to directory /updater/data/backup

Configuration file (remove your credentials!):

{
  "settings": [
    {
      "provider": "porkbun",
      "domain": "mydomain.rocks",
      "api_key": "mykey",
      "secret_api_key": "mykey",
      "ip_version": "ipv4"
        },
    {
      "provider": "porkbun",
      "domain": "mydomain.com",
      "api_key": "mykey",
      "secret_api_key": "mykey",
      "ip_version": "ipv4"
        },
    {
      "provider": "cloudflare",
      "zone_identifier": "mykey",
      "domain": "mydomain.rocks",
      "ttl": 1,
      "token": "mykey",
      "ip_version": "ipv4"
        },
    {
      "provider": "cloudflare",
      "zone_identifier": "myid",
      "domain": "mydomain.com",
      "ttl": 1,
      "token": "mykey",
      "ip_version": "ipv4"
        },
    {
      "provider": "noip",
      "domain": "mydomain.servebeer.com",
      "username": "myusername",
      "password": "mypass",
      "ip_version": "ipv4"
        },
    {
      "provider": "duckdns",
      "domain": "mydomain.duckdns.org",
      "token": "mykey",
      "ip_version": "ipv4"
        }
  ]
}


And lastly, my container settings for ddns-updater:

image

@tegralens
Copy link

I have the same issue as well. I thought it was just me. I'm using portainer with Cloudflare.

@raintheory
Copy link

Seeing this as well in Dockge using Cloudflare, DuckDNS, & NoIP.

@qdm12
Copy link
Owner

qdm12 commented Oct 23, 2024

Maybe you need to set the cloudflare "proxied": true field?

@qdm12
Copy link
Owner

qdm12 commented Oct 23, 2024

Otherwise, please share the healthcheck failing error message which you can find with docker inspect <container-name>

@tegralens
Copy link

Maybe you need to set the cloudflare "proxied": true field?

I have 1 with proxied true and one without same issue.

@tegralens
Copy link

I keep seeing things like this. But I removed that website and it still shows another. Funny thing is that it still works. I changed the IPs and Macs.

    "Id": "xxxxxxx",
    "Created": "2024-10-18T22:53:20.852455308Z",
    "Path": "/updater/ddns-updater",
    "Args": [],
    "State": {
        "Status": "running",
        "Running": true,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 816737,
        "ExitCode": 0,
        "Error": "",
        "StartedAt": "2024-10-18T23:06:16.705617709Z",
        "FinishedAt": "2024-10-18T23:05:24.744813042Z",
        "Health": {
            "Status": "unhealthy",
            "FailingStreak": 12832,
            "Log": [
                {
                    "Start": "2024-10-27T17:58:11.692148835-04:00",
                    "End": "2024-10-27T17:58:11.924436088-04:00",
                    "ExitCode": 1,
                    "Output": "2024-10-27T17:58:11-04:00 ERROR program is unhealthy: lookup IP addresses do not match: 111.1                       7.111.111,111.01.66.238,2222:0000:4444::5555:42ee,eeee:ffff:aaaa::cccc:dddd instead of 1.1.1.1 for photos.website.com                       \n\n2024-10-27T17:58:11-04:00 INFO Shutdown successful\n"
                },
                {
                    "Start": "2024-10-27T17:59:11.997433439-04:00",
                    "End": "2024-10-27T17:59:12.208252816-04:00",
                    "ExitCode": 1,
                    "Output": "2024-10-27T17:59:12-04:00 ERROR program is unhealthy: lookup IP addresses do not match: 111.0                       1.66.238,111.17.111.111,2222:0000:4444::5555:42ee,eeee:ffff:aaaa::cccc:dddd instead of 1.1.1.1 for photos.website.com                       \n\n2024-10-27T17:59:12-04:00 INFO Shutdown successful\n"
                },
                {
                    "Start": "2024-10-27T18:00:12.282896157-04:00",
                    "End": "2024-10-27T18:00:12.519523973-04:00",
                    "ExitCode": 1,
                    "Output": "2024-10-27T18:00:12-04:00 ERROR program is unhealthy: lookup IP addresses do not match: 111.1                       7.111.111,111.01.66.238,eeee:ffff:aaaa::cccc:dddd,2222:0000:4444::5555:42ee instead of 1.1.1.1 for photos.website.com                       \n\n2024-10-27T18:00:12-04:00 INFO Shutdown successful\n"
                },
                {
                    "Start": "2024-10-27T18:01:12.594592554-04:00",
                    "End": "2024-10-27T18:01:12.830547315-04:00",
                    "ExitCode": 1,
                    "Output": "2024-10-27T18:01:12-04:00 ERROR program is unhealthy: lookup IP addresses do not match: 111.0                       1.66.238,111.17.111.111,2222:0000:4444::5555:42ee,eeee:ffff:aaaa::cccc:dddd instead of 1.1.1.1 for photos.website.com                       \n\n2024-10-27T18:01:12-04:00 INFO Shutdown successful\n"
                },
                {
                    "Start": "2024-10-27T18:02:12.909410735-04:00",
                    "End": "2024-10-27T18:02:13.12192341-04:00",
                    "ExitCode": 1,
                    "Output": "2024-10-27T18:02:13-04:00 ERROR program is unhealthy: lookup IP addresses do not match: 111.0                       1.66.238,111.17.111.111,eeee:ffff:aaaa::cccc:dddd,2222:0000:4444::5555:42ee instead of 1.1.1.1 for photos.website.com                       \n\n2024-10-27T18:02:13-04:00 INFO Shutdown successful\n"
                }
            ]
        }
    },

@jrwhitehead
Copy link

I have the same type of message as [tegralens]. It is due to split-brain DNS.

ddns-updater was resolving widgets.domain.com locally to 172.16.x.x and was configure to update the A record for widgets.domain.com externally (ovbiously to a different address).

@devanteweary
Copy link
Author

devanteweary commented Oct 30, 2024

Otherwise, please share the healthcheck failing error message which you can find with docker inspect <container-name>

Hey, sorry it took a week.

OK I tried proxied true and it showed me a different error in the web UI.

Here's the docker inspect results: after adding proxied:true > https://pastebin.com/Tk6LPYEk

So I'm guessing when a DNS record is fails to update, for some reason reports the Docker container as unhealthy, which then UptimeKuma sees as unhealthy.
The container and program itself are working just fine and as intended.

Is there a way to unlink the health of the container from if DNS don't get updated?
I imagine that'd have to be an update of some sort?

And to reiterate, this only started happening several updates ago.
Just thought I'd throw that out there again!

Ok thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants