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

Bug: Domain update status 'Unset' when it exists in system hosts file #891

Open
brammp opened this issue Dec 28, 2024 · 2 comments
Open

Comments

@brammp
Copy link

brammp commented Dec 28, 2024

TLDR: When the domain exists in /etc/hosts the domain status gets stuck on 'Unset', and is not updated when using binary on Linux
image

  1. Is this urgent: No

  2. DNS provider(s) you use: OVH & Custom

  3. Program version: 2.9.0 (commit 78f30614b1d085ef6bfbfce92b0e45ca0204f42a)

  4. What are you using to run the container: N/A, using the binary on Linux

  5. Extra information:
    When the domain entry is removed from /etc/hosts everyting works as expected and the ip is updated after restarting the binary.
    To replicate make sure updates.json is empty.
    Also tested the Windows, MacOS/Darwin versions and Docker, and these are not effected.

Logs OVH:

2024-12-28T22:19:23Z INFO Settings summary:
├── HTTP client
|   └── Timeout: 20s
├── Update
|   ├── Period: 10m0s
|   └── 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 is disabled
├── Paths
|   ├── Data directory: ./data
|   ├── Config file: data/config.json
|   └── Umask: system default
├── Backup: disabled
└── Logger
    ├── Level: INFO
    └── Caller: hidden
2024-12-28T22:19:23Z INFO reading JSON config from file data/config.json
2024-12-28T22:19:23Z INFO Found 2 settings to update records
2024-12-28T22:19:23Z INFO Reading history from database: domain test.lan owner @ ipv4
2024-12-28T22:19:23Z INFO Reading history from database: domain test.lan owner @ ipv6
2024-12-28T22:19:23Z INFO [http server] http server listening on [::]:8000
2024-12-28T22:19:23Z INFO [backup] disabled
2024-12-28T22:19:23Z INFO obtaining ipv4 address succeeded after 1 failed try
^C2024-12-28T22:42:02Z WARN Caught OS signal, shutting down
2024-12-28T22:42:07Z WARN Shutdown timed out

Configuration file OVH:

{
    "settings": [
        {
        "provider": "ovh",
        "mode": "api",
        "domain": "quartz.nxdi.nl",
        "api_endpoint": "ovh-eu",
        "app_key": "<app_key>",
        "app_secret": "<app_secret>",
        "consumer_key": "<consumer_key>",
        "ip_version": "ipv4"
        },
         {
        "provider": "ovh",
        "mode": "api",
        "domain": "quartz.nxdi.nl",
        "api_endpoint": "ovh-eu",
        "app_key": "<app_key>",
        "app_secret": "<app_secret>",
        "consumer_key": "<consumer_key>",
        "ip_version": "ipv6",
        "ipv6_suffix": ""
        }
    ]
}

Logs Custom:

2024-12-28T23:31:59+01:00 INFO Settings summary:
├── HTTP client
|   └── Timeout: 20s
├── Update
|   ├── Period: 10m0s
|   └── 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: ./data
|   ├── Config file: data/config.json
|   └── Umask: system default
├── Backup: disabled
└── Logger
    ├── Level: INFO
    └── Caller: hidden
2024-12-28T23:31:59+01:00 INFO reading JSON config from file data/config.json
2024-12-28T23:31:59+01:00 INFO Found 2 settings to update records
2024-12-28T23:31:59+01:00 INFO Reading history from database: domain test.lan owner @ ipv4
2024-12-28T23:31:59+01:00 INFO Reading history from database: domain test.lan owner @ ipv6
2024-12-28T23:31:59+01:00 INFO [http server] http server listening on [::]:8000
2024-12-28T23:31:59+01:00 INFO [backup] disabled
2024-12-28T23:31:59+01:00 INFO obtaining ipv4 address succeeded after 1 failed try
2024/12/28 23:32:01 "GET http://localhost:8000/ HTTP/1.1" from 127.0.0.1:59368 - 200 2899B in 71.014µs
2024/12/28 23:32:01 "GET http://localhost:8000/static/styles.css HTTP/1.1" from 127.0.0.1:59368 - 200 3203B in 9.520991ms
2024/12/28 23:32:02 "GET http://localhost:8000/ HTTP/1.1" from 127.0.0.1:59368 - 200 2899B in 88.667µs
2024/12/28 23:32:02 "GET http://localhost:8000/static/styles.css HTTP/1.1" from 127.0.0.1:59368 - 200 3203B in 91.753µs
^C2024-12-28T23:40:48+01:00 WARN Caught OS signal, shutting down
2024-12-28T23:40:53+01:00 WARN Shutdown timed out

Configuration file Custom:

{
  "settings": [
    {
      "provider": "custom",
      "domain": "test.lan",
      "url": "https://dev.bramp.nl/ddns/update.php?domain=test.local&hostname=Dev-VM&token=<TokenHere>",
      "ipv4key": "ipv4",
      "ipv6key": "ipv6",
      "success_regex": "good",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    },
    {
      "provider": "custom",
      "domain": "test.lan",
      "url": "https://dev.bramp.nl/ddns/update.php?domain=test.local&hostname=Dev-VM&token=<TokenHere>",
      "ipv4key": "ipv4",
      "ipv6key": "ipv6",
      "success_regex": "good",
      "ip_version": "ipv6",
      "ipv6_suffix": ""
    }
  ]
}

Host OS(s):
Debian 12, Ubuntu 24.04,Fedora 41, Rocky Linux9, Alpine 3.21, Arch Linux,OpenSuse Leap 15.9, Centos-Stream 10

@Asklios
Copy link

Asklios commented Jan 13, 2025

I had the same issue with a persistent unset status using docker and qmcgaw/ddns-updater:v2.9.0
I temporarily fixed it by using an older version.

@ParzivalSan
Copy link

I have the same issue. I was working fine some weeks ago

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

3 participants