Bug: existing ipv6 address not found from resolution #430

Open
opened 2025-11-20 04:23:58 -05:00 by saavagebueno · 6 comments
Owner

Originally created by @capnsmc on GitHub (Aug 23, 2024).

Cloudflare IPv6 update complains about invalid IPv6 address and updates IPv6 at every interval, spamming the log and notifications. The IPv6 address is already set to the correct value, though (by ddns-updater itself, no less), and does not need any update.

  1. Is this urgent: No
  2. DNS provider(s) you use: Cloudflare
  3. Program version: "Running version latest built on 2024-08-21T09:38:02.154Z (commit c7dbbcb)", though the issue is not limited to that version. It started ten days ago, the day I got IPv6 connectivity.
  4. What are you using to run the container: docker compose
  5. Extra information: See below for Docker Compose file and some things I tried.

Logs:

INFO ipv6 address of any.<domain> is invalid IP and your ipv6 address  is <ipv6 address>
INFO ipv6 address of <domain> is invalid IP and your ipv6 address  is <ipv6 address>
INFO Updating record [domain: <domain> | owner: * | provider: cloudflare | ip: ipv6] to use <ipv6 address>
INFO Updating record [domain: <domain> | owner: @ | provider: cloudflare | ip: ipv6] to use <ipv6 address>

These (and the notifications) get repeated every ten minutes

Configuration file:

{
  "settings": [
    {
      "provider": "cloudflare",
      "zone_identifier": "<zone identifier>",
      "domain": "*.<domain>",
      "ttl": 1,
      "token": "<token>",
      "ip_version": "ipv6"
    },
    {
      "provider": "cloudflare",
      "zone_identifier": "<zone identifier>",
      "domain": "<domain>",
      "ttl": 1,
      "token": "<token>",
      "ip_version": "ipv6"
    },
  ]
}

N.b.: This is an excerpt. I have other entries in the configuration file, including the corresponding IPv4 entries for the very same Cloudflare domain. They only differ in the setting for ip_version (set to ipv4, of course), and they work just fine. I also have entries for other, "historical" domains at other providers that also work just fine (though they are not IPv6, but IPv4-only).

I tried removing everything but the first entry (*.<domain>) from the configuration. No change.

I also tried removing updates.json. No change.

Docker Compose file:

services:
  ddns-updater:
    image: qmcgaw/ddns-updater
    container_name: ddns-updater
    restart: always
    ports:
      - 8250:8000/tcp
    volumes:
      - /srv/container/ddns-updater:/updater/data
    # For IPv6
    network_mode: host
    environment:
      SHOUTRRR_ADDRESSES: gotify://<gotify address>/<gotify token>
      TZ: Europe/Berlin
      LISTENING_ADDRESS: 0.0.0.0:8765

Host OS:
Ubuntu 24.04

Originally created by @capnsmc on GitHub (Aug 23, 2024). Cloudflare IPv6 update complains about invalid IPv6 address and updates IPv6 at every interval, spamming the log and notifications. The IPv6 address is already set to the correct value, though (by *ddns-updater* itself, no less), and does not need any update. 1. Is this urgent: No 2. DNS provider(s) you use: Cloudflare 3. Program version: "Running version latest built on 2024-08-21T09:38:02.154Z (commit c7dbbcb)", though the issue is not limited to that version. It started ten days ago, the day I got IPv6 connectivity. 4. What are you using to run the container: docker compose 5. Extra information: See below for Docker Compose file and some things I tried. # Logs: ```log INFO ipv6 address of any.<domain> is invalid IP and your ipv6 address is <ipv6 address> INFO ipv6 address of <domain> is invalid IP and your ipv6 address is <ipv6 address> INFO Updating record [domain: <domain> | owner: * | provider: cloudflare | ip: ipv6] to use <ipv6 address> INFO Updating record [domain: <domain> | owner: @ | provider: cloudflare | ip: ipv6] to use <ipv6 address> ``` These (and the notifications) get repeated every ten minutes # Configuration file: ```json { "settings": [ { "provider": "cloudflare", "zone_identifier": "<zone identifier>", "domain": "*.<domain>", "ttl": 1, "token": "<token>", "ip_version": "ipv6" }, { "provider": "cloudflare", "zone_identifier": "<zone identifier>", "domain": "<domain>", "ttl": 1, "token": "<token>", "ip_version": "ipv6" }, ] } ``` N.b.: This is an excerpt. I have other entries in the configuration file, including the corresponding IPv4 entries for the very same Cloudflare domain. They only differ in the setting for `ip_version` (set to `ipv4`, of course), and they work just fine. I also have entries for other, "historical" domains at other providers that also work just fine (though they are not IPv6, but IPv4-only). I tried removing everything but the first entry (`*.<domain>`) from the configuration. No change. I also tried removing `updates.json`. No change. # Docker Compose file: ```yaml services: ddns-updater: image: qmcgaw/ddns-updater container_name: ddns-updater restart: always ports: - 8250:8000/tcp volumes: - /srv/container/ddns-updater:/updater/data # For IPv6 network_mode: host environment: SHOUTRRR_ADDRESSES: gotify://<gotify address>/<gotify token> TZ: Europe/Berlin LISTENING_ADDRESS: 0.0.0.0:8765 ``` Host OS: Ubuntu 24.04
Author
Owner

@qdm12 commented on GitHub (Nov 21, 2024):

This might be solved with 89564b763b

Previously I was using the ip network, thinking it would return ip4 and ip6 addresses altogether, but this may be wrong (no way to test right now, my network is without ipv6 currently).
I've changed that to query in parallel the ip4 and ip6 networks, and might do the trick, giving back the missing IPv6 you needed invalid IP. Please try pulling the latest image and check if it works now?

@qdm12 commented on GitHub (Nov 21, 2024): This might be solved with 89564b763bda7c06c9b5a697d3dc6a8925ddcb0f Previously I was using the `ip` network, thinking it would return `ip4` and `ip6` addresses altogether, but this may be wrong (no way to test right now, my network is without ipv6 currently). I've changed that to query in parallel the ip4 and ip6 networks, and might do the trick, giving back the missing IPv6 you needed `invalid IP`. Please try pulling the latest image and check if it works now?
Author
Owner

@capnsmc commented on GitHub (Nov 28, 2024):

I had to reboot my machine since, but quite some time before your change, and ddns-updater started working just fine. I assume it somehow got confused, because Linux was started before it got a global IPv6 address. So I can't reproduce the problem any longer, and I don't even know if the circumstances can be reproduced, sorry.

@capnsmc commented on GitHub (Nov 28, 2024): I had to reboot my machine since, but quite some time before your change, and ddns-updater started working just fine. I assume it somehow got confused, because Linux was started *before* it got a global IPv6 address. So I can't reproduce the problem any longer, and I don't even know if the circumstances can be reproduced, sorry.
Author
Owner

@qdm12 commented on GitHub (Nov 28, 2024):

No problem, maybe you can try with the image tag :v2 to check if it fails for IPv6? 🤔 If it doesn't fail either, let's close this then.

@qdm12 commented on GitHub (Nov 28, 2024): No problem, maybe you can try with the image tag `:v2` to check if it fails for IPv6? 🤔 If it doesn't fail either, let's close this then.
Author
Owner

@capnsmc commented on GitHub (Nov 29, 2024):

I just tried :v2 and it seems to work just fine 😃.

Here the log for verification (redacted for my domains and such):

========================================
========================================
============= ddns-updater =============
========================================
=========== Made with ❤️ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version 2.8.2 built on 2024-11-21T22:57:17.663Z (commit e95816a)
🔧 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? quentin.mcgaw@gmail.com
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-11-29T07:24:07+01: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: 0.0.0.0:8765
|   └── 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: disabled
├── Logger
|   ├── Level: info
|   └── Caller: hidden
└── Shoutrrr
    ├── Default title: DDNS Updater
    └── Addresses
        └── gotify://<sub>.<domain>/<whatever>
2024-11-29T07:24:07+01:00 INFO reading JSON config from file /updater/data/config.json
2024-11-29T07:24:07+01:00 INFO Found 9 settings to update records
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner * ipv4
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner * ipv6
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner @ ipv4
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner @ ipv6
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <sub> ipv4
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <app1>.<sub> ipv4
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <app2>.<sub> ipv4
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <app3>.<sub> ipv4
2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <yet_another_domain> owner <sub> ipv4
2024-11-29T07:24:07+01:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999
2024-11-29T07:24:07+01:00 INFO [http server] http server listening on [::]:8765
2024-11-29T07:24:07+01:00 INFO [backup] disabled
@capnsmc commented on GitHub (Nov 29, 2024): I just tried `:v2` and it seems to work just fine 😃. Here the log for verification (redacted for my domains and such): ``` ======================================== ======================================== ============= ddns-updater ============= ======================================== =========== Made with ❤️ by ============ ======= https://github.com/qdm12 ======= ======================================== ======================================== Running version 2.8.2 built on 2024-11-21T22:57:17.663Z (commit e95816a) 🔧 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? quentin.mcgaw@gmail.com 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12 2024-11-29T07:24:07+01: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: 0.0.0.0:8765 | └── 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: disabled ├── Logger | ├── Level: info | └── Caller: hidden └── Shoutrrr ├── Default title: DDNS Updater └── Addresses └── gotify://<sub>.<domain>/<whatever> 2024-11-29T07:24:07+01:00 INFO reading JSON config from file /updater/data/config.json 2024-11-29T07:24:07+01:00 INFO Found 9 settings to update records 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner * ipv4 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner * ipv6 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner @ ipv4 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <domain> owner @ ipv6 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <sub> ipv4 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <app1>.<sub> ipv4 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <app2>.<sub> ipv4 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <other_domain> owner <app3>.<sub> ipv4 2024-11-29T07:24:07+01:00 INFO Reading history from database: domain <yet_another_domain> owner <sub> ipv4 2024-11-29T07:24:07+01:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999 2024-11-29T07:24:07+01:00 INFO [http server] http server listening on [::]:8765 2024-11-29T07:24:07+01:00 INFO [backup] disabled ```
Author
Owner

@chrste90 commented on GitHub (Dec 8, 2024):

Hi @qdm12,

i had the same problem, but the current solution doesnt seem to fix it completely for me. Instead of the error, i now get the following message:

INFO Updating record [domain: domain.de | owner: * | provider: strato | ip: ipv6] to use <ipv6 address>
INFO ipv6 address of domain.de is  and your ipv6 address is <ipv6 address>

It looks like the ipv6 address couldn't be extracted correctly (see the double whitespace)

My dns provider is strato.

@chrste90 commented on GitHub (Dec 8, 2024): Hi @qdm12, i had the same problem, but the current solution doesnt seem to fix it completely for me. Instead of the error, i now get the following message: ``` INFO Updating record [domain: domain.de | owner: * | provider: strato | ip: ipv6] to use <ipv6 address> INFO ipv6 address of domain.de is and your ipv6 address is <ipv6 address> ``` It looks like the ipv6 address couldn't be extracted correctly (see the double whitespace) My dns provider is strato.
Author
Owner

@qdm12 commented on GitHub (Dec 24, 2024):

@chrste90 does it repeat this every period?

In the code it's that line that resolves your domain name with the network "ip6":

78f30614b1/internal/update/service.go (L69)

It probably does fail with either "no such host" or there is actually no IPv6 address found. Not sure, maybe try with nslookup to double check there is an AAAA record?

@qdm12 commented on GitHub (Dec 24, 2024): @chrste90 does it repeat this every period? In the code it's that line that resolves your domain name with the network "ip6": https://github.com/qdm12/ddns-updater/blob/78f30614b1d085ef6bfbfce92b0e45ca0204f42a/internal/update/service.go#L69 It probably does fail with either "no such host" or there is actually no IPv6 address found. Not sure, maybe try with `nslookup` to double check there is an AAAA record?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#430