Bug: IPv4 and IPv6 addresses of the same host mismatched after daemon restart #199

Closed
opened 2025-11-20 04:21:26 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @stelas on GitHub (Jul 18, 2022).

Originally assigned to: @qdm12 on GitHub.

TLDR: After a daemon restart, the persisted IP4 and IP6 addresses are not properly mapped to the corresponding host entries.

  1. Is this urgent: No
  2. DNS provider(s) you use: Hurricane Electric
  3. Program version: Running version latest built on 2022-03-15T14:38:50Z (commit 584597d)
  4. What are you using to run the container: Running /updater/app of latest container under local user

First start without updates.json:
first-start

2022/07/18 12:20:10 INFO reading JSON config from file /home/ddns-updater/data/config.json
2022/07/18 12:20:10 DEBUG config read: {
  "settings": [
    {
      "provider": "he",
      "domain": "dyn.xxx.de",
      "host": "freya",
      "password": "xxx",
      "ip_version": "ipv4"
    },
    {
      "provider": "he",
      "domain": "dyn.xxx.de",
      "host": "freya",
      "password": "xxx",
      "ip_version": "ipv6"
    }
  ]
}
2022/07/18 12:20:10 INFO Found 2 settings to update records
2022/07/18 12:20:10 INFO Reading history from database: domain dyn.xxx.de host freya
2022/07/18 12:20:10 INFO Reading history from database: domain dyn.xxx.de host freya
2022/07/18 12:20:10 INFO healthcheck server: listening on 127.0.0.1:9999
2022/07/18 12:20:10 DEBUG configured to fetch IP: v4 or v6: false, v4: true, v6: true
2022/07/18 12:20:10 INFO backup: disabled
2022/07/18 12:20:10 INFO http server: listening on :8000
2022/07/18 12:20:11 DEBUG your public IP address are: v4 or v6: <nil>, v4: 85.212.x.x, v6: 2001:x:x:1::5
2022/07/18 12:20:11 DEBUG IPv4 address of freya.dyn.xxx.de is 85.212.x.x and your IPv4 address is 85.212.x.x, skipping update
2022/07/18 12:20:11 DEBUG IPv6 address of freya.dyn.xxx.de is 2001:x:x:1::5 and your IPv6 address is 2001:x:x:1::5, skipping update

Data file updates.json:

{
  "records": [
    {
      "domain": "dyn.xxx.de",
      "host": "freya",
      "ips": [
        {
          "ip": "85.212.x.x",
          "time": "2022-07-17T20:10:44.754153567+02:00"
        },
        {
          "ip": "2001:x:x:1::5",
          "time": "2022-07-17T20:10:44.754153567+02:00"
        }
      ]
    }
  ]
}

Restart with updates.json:
The IPv6 address is suddenly also in the IPv4 entry.
second-start

2022/07/18 12:20:59 INFO reading JSON config from file /home/ddns-updater/data/config.json
2022/07/18 12:20:59 DEBUG config read: {
  "settings": [
    {
      "provider": "he",
      "domain": "dyn.xxx.de",
      "host": "freya",
      "password": "xxx",
      "ip_version": "ipv4"
    },
    {
      "provider": "he",
      "domain": "dyn.xxx.de",
      "host": "freya",
      "password": "xxx",
      "ip_version": "ipv6"
    }
  ]
}
2022/07/18 12:20:59 INFO Found 2 settings to update records
2022/07/18 12:20:59 INFO Reading history from database: domain dyn.xxx.de host freya
2022/07/18 12:20:59 INFO Reading history from database: domain dyn.xxx.de host freya
2022/07/18 12:20:59 DEBUG configured to fetch IP: v4 or v6: false, v4: true, v6: true
2022/07/18 12:20:59 INFO healthcheck server: listening on 127.0.0.1:9999
2022/07/18 12:20:59 INFO backup: disabled
2022/07/18 12:20:59 INFO http server: listening on :8000
2022/07/18 12:21:00 DEBUG your public IP address are: v4 or v6: <nil>, v4: 85.212.x.x, v6: 2001:x:x:1::5
2022/07/18 12:21:00 DEBUG record freya.dyn.xxx.de is within ban period or cooldown period, skipping update
2022/07/18 12:21:00 DEBUG record freya.dyn.xxx.de is within ban period or cooldown period, skipping update

Host OS: Linux freya 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 x86_64 GNU/Linux

Originally created by @stelas on GitHub (Jul 18, 2022). Originally assigned to: @qdm12 on GitHub. **TLDR**: After a daemon restart, the persisted IP4 and IP6 addresses are not properly mapped to the corresponding host entries. 1. Is this urgent: No 2. DNS provider(s) you use: Hurricane Electric 3. Program version: Running version latest built on 2022-03-15T14:38:50Z (commit 584597d) 4. What are you using to run the container: Running /updater/app of latest container under local user First start without updates.json: ![first-start](https://user-images.githubusercontent.com/15674535/179510893-23d7768b-684d-48e7-82d3-b53f559051bf.png) ``` 2022/07/18 12:20:10 INFO reading JSON config from file /home/ddns-updater/data/config.json 2022/07/18 12:20:10 DEBUG config read: { "settings": [ { "provider": "he", "domain": "dyn.xxx.de", "host": "freya", "password": "xxx", "ip_version": "ipv4" }, { "provider": "he", "domain": "dyn.xxx.de", "host": "freya", "password": "xxx", "ip_version": "ipv6" } ] } 2022/07/18 12:20:10 INFO Found 2 settings to update records 2022/07/18 12:20:10 INFO Reading history from database: domain dyn.xxx.de host freya 2022/07/18 12:20:10 INFO Reading history from database: domain dyn.xxx.de host freya 2022/07/18 12:20:10 INFO healthcheck server: listening on 127.0.0.1:9999 2022/07/18 12:20:10 DEBUG configured to fetch IP: v4 or v6: false, v4: true, v6: true 2022/07/18 12:20:10 INFO backup: disabled 2022/07/18 12:20:10 INFO http server: listening on :8000 2022/07/18 12:20:11 DEBUG your public IP address are: v4 or v6: <nil>, v4: 85.212.x.x, v6: 2001:x:x:1::5 2022/07/18 12:20:11 DEBUG IPv4 address of freya.dyn.xxx.de is 85.212.x.x and your IPv4 address is 85.212.x.x, skipping update 2022/07/18 12:20:11 DEBUG IPv6 address of freya.dyn.xxx.de is 2001:x:x:1::5 and your IPv6 address is 2001:x:x:1::5, skipping update ``` Data file updates.json: ``` { "records": [ { "domain": "dyn.xxx.de", "host": "freya", "ips": [ { "ip": "85.212.x.x", "time": "2022-07-17T20:10:44.754153567+02:00" }, { "ip": "2001:x:x:1::5", "time": "2022-07-17T20:10:44.754153567+02:00" } ] } ] } ``` Restart with updates.json: The IPv6 address is suddenly also in the IPv4 entry. ![second-start](https://user-images.githubusercontent.com/15674535/179510921-20f8349d-17ac-4d13-aa3e-916421bbaea2.png) ``` 2022/07/18 12:20:59 INFO reading JSON config from file /home/ddns-updater/data/config.json 2022/07/18 12:20:59 DEBUG config read: { "settings": [ { "provider": "he", "domain": "dyn.xxx.de", "host": "freya", "password": "xxx", "ip_version": "ipv4" }, { "provider": "he", "domain": "dyn.xxx.de", "host": "freya", "password": "xxx", "ip_version": "ipv6" } ] } 2022/07/18 12:20:59 INFO Found 2 settings to update records 2022/07/18 12:20:59 INFO Reading history from database: domain dyn.xxx.de host freya 2022/07/18 12:20:59 INFO Reading history from database: domain dyn.xxx.de host freya 2022/07/18 12:20:59 DEBUG configured to fetch IP: v4 or v6: false, v4: true, v6: true 2022/07/18 12:20:59 INFO healthcheck server: listening on 127.0.0.1:9999 2022/07/18 12:20:59 INFO backup: disabled 2022/07/18 12:20:59 INFO http server: listening on :8000 2022/07/18 12:21:00 DEBUG your public IP address are: v4 or v6: <nil>, v4: 85.212.x.x, v6: 2001:x:x:1::5 2022/07/18 12:21:00 DEBUG record freya.dyn.xxx.de is within ban period or cooldown period, skipping update 2022/07/18 12:21:00 DEBUG record freya.dyn.xxx.de is within ban period or cooldown period, skipping update ``` Host OS: Linux freya 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 x86_64 GNU/Linux
saavagebueno added the Category: Database 🗃️Priority: 🚨 Urgent labels 2025-11-20 04:21:26 -05:00
Author
Owner

@qdm12 commented on GitHub (Jan 19, 2024):

This should be fixed by https://github.com/qdm12/ddns-updater/pull/514 (merged a few days ago). If it's not, please comment here and I'll re-open the issue! Thanks for the detailed issue reporting this!

@qdm12 commented on GitHub (Jan 19, 2024): This should be fixed by https://github.com/qdm12/ddns-updater/pull/514 (merged a few days ago). If it's not, please comment here and I'll re-open the issue! Thanks for the detailed issue reporting this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#199