Docker does not read/update from config.json #369

Closed
opened 2025-11-20 04:23:14 -05:00 by saavagebueno · 9 comments
Owner

Originally created by @jehlybean on GitHub (Feb 7, 2024).

TLDR: Describe your issue in a one liner here

I've set up the config.json several times and it wont update when I check the webui.

I recently rebuilt a corrupt docker.img and it was working perfectly before.

  1. Is this urgent: No

  2. DNS provider(s) you use: Cloudflare

  3. Program version:

    Running version latest built on 2020-03-13T01:30:06Z (commit d0f678c)

  4. What are you using to run the container: unraid

  5. Extra information (optional)

Logs:

Running version latest built on 2024-02-04T14:45:13.409Z (commit 133956f)

🔧 Need help? https://github.com/qdm12/ddns-updater/discussions/new
🐛 Bug? https://github.com/qdm12/ddns-updater/issues/new
✨ New feature? https://github.com/qdm12/ddns-updater/issues/new
☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new
💻 Email? quentin.mcgaw@gmail.com
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-02-08T01:32:00Z 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
├── Backup: disabled
└── Logger
    ├── Level: info
    └── Caller: hidden
2024-02-08T01:32:00Z INFO reading JSON config from file /updater/data/config.json
2024-02-08T01:32:00Z WARN Found no setting to update record
2024-02-08T01:32:00Z INFO [backup] disabled
2024-02-08T01:32:00Z INFO [http server] listening on :8000
2024-02-08T01:32:00Z INFO [healthcheck server] listening on 127.0.0.1:9999

Host OS:
Unraid

Originally created by @jehlybean on GitHub (Feb 7, 2024). **TLDR**: *Describe your issue in a one liner here* I've set up the config.json several times and it wont update when I check the webui. I recently rebuilt a corrupt docker.img and it was working perfectly before. 1. Is this urgent: No 2. DNS provider(s) you use: Cloudflare 3. Program version: <!-- See the line at the top of your logs --> `Running version latest built on 2020-03-13T01:30:06Z (commit d0f678c)` 4. What are you using to run the container: unraid 5. Extra information (optional) Logs: ``` Running version latest built on 2024-02-04T14:45:13.409Z (commit 133956f) 🔧 Need help? https://github.com/qdm12/ddns-updater/discussions/new 🐛 Bug? https://github.com/qdm12/ddns-updater/issues/new ✨ New feature? https://github.com/qdm12/ddns-updater/issues/new ☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new 💻 Email? quentin.mcgaw@gmail.com 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12 2024-02-08T01:32:00Z 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 ├── Backup: disabled └── Logger ├── Level: info └── Caller: hidden 2024-02-08T01:32:00Z INFO reading JSON config from file /updater/data/config.json 2024-02-08T01:32:00Z WARN Found no setting to update record 2024-02-08T01:32:00Z INFO [backup] disabled 2024-02-08T01:32:00Z INFO [http server] listening on :8000 2024-02-08T01:32:00Z INFO [healthcheck server] listening on 127.0.0.1:9999 ``` Host OS: Unraid
Author
Owner

@qdm12 commented on GitHub (Feb 7, 2024):

2024-02-08T01:32:00Z INFO reading JSON config from file /updater/data/config.json
2024-02-08T01:32:00Z WARN Found no setting to update record

Check the config.json file is bind mounted correctly? It seems it doesn't find it (so it creates it as empty)

@qdm12 commented on GitHub (Feb 7, 2024): ``` 2024-02-08T01:32:00Z INFO reading JSON config from file /updater/data/config.json 2024-02-08T01:32:00Z WARN Found no setting to update record ``` Check the config.json file is bind mounted correctly? It seems it doesn't find it (so it creates it as empty)
Author
Owner

@jehlybean commented on GitHub (Feb 7, 2024):

It created an empty file which I later filled. How do I verify if bind is mounted? I followed each step.

@jehlybean commented on GitHub (Feb 7, 2024): It created an empty file which I later filled. How do I verify if bind is mounted? I followed each step.
Author
Owner

@qdm12 commented on GitHub (Feb 8, 2024):

Where is your config.json file on your host system, and what's your bind mount configured for the /updater/data directory?

@qdm12 commented on GitHub (Feb 8, 2024): Where is your config.json file on your host system, and what's your bind mount configured for the `/updater/data` directory?
Author
Owner

@jehlybean commented on GitHub (Feb 8, 2024):

/mnt/user/appdata/ddns-updater/data I don’t follow on bind mount - is that the “touch” command? I followed each line from the unraid instructions exactly.

@jehlybean commented on GitHub (Feb 8, 2024): `/mnt/user/appdata/ddns-updater/data` I don’t follow on bind mount - is that the “touch” command? I followed each line from the unraid instructions exactly.
Author
Owner

@qdm12 commented on GitHub (Feb 8, 2024):

You should a volume mount (aka bind mount) between /mnt/user/appdata/ddns-updater/data (on your host system) and /updater/data (in the container)

@qdm12 commented on GitHub (Feb 8, 2024): You should a volume mount (aka bind mount) between `/mnt/user/appdata/ddns-updater/data` (on your host system) and `/updater/data` (in the container)
Author
Owner

@jehlybean commented on GitHub (Feb 8, 2024):

Correct. That’s how mine is setup. /updater/data in the container and /mnt/user/appdata/ddns-updater/data is where config is stored.

@jehlybean commented on GitHub (Feb 8, 2024): Correct. That’s how mine is setup. /updater/data in the container and /mnt/user/appdata/ddns-updater/data is where config is stored.
Author
Owner

@qdm12 commented on GitHub (Feb 8, 2024):

Try running it with LOG_LEVEL=debug and see what logs it has? It should log out the entire configuration read, I guess in this case likely just {}?

@qdm12 commented on GitHub (Feb 8, 2024): Try running it with `LOG_LEVEL=debug` and see what logs it has? It should log out the entire configuration read, I guess in this case likely just `{}`?
Author
Owner

@jehlybean commented on GitHub (Feb 8, 2024):

Running version latest built on 2024-02-08T13:09:44.329Z (commit e676983)

🔧 Need help? https://github.com/qdm12/ddns-updater/discussions/new
🐛 Bug? https://github.com/qdm12/ddns-updater/issues/new
✨ New feature? https://github.com/qdm12/ddns-updater/issues/new
☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new
💻 Email? ***@***.***
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-02-08T17:05:31Z 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
├── Backup: disabled
└── Logger
    ├── Level: debug
    └── Caller: hidden
2024-02-08T17:05:31Z INFO reading JSON config from file /updater/data/config.json
2024-02-08T17:05:31Z DEBUG config read: {}
2024-02-08T17:05:31Z WARN Found no setting to update record
2024-02-08T17:05:32Z DEBUG configured to fetch IP: v4 or v6: false, v4: false, v6: false
2024-02-08T17:05:32Z INFO [healthcheck server] listening on 127.0.0.1:9999
2024-02-08T17:05:32Z INFO [backup] disabled
2024-02-08T17:05:32Z DEBUG your public IP address are: v4 or v6: invalid IP, v4: invalid IP, v6: invalid IP
2024-02-08T17:05:32Z INFO [http server] listening on :8000
2024/02/08 17:06:06 "GET http://192.168.1.100:8000/ HTTP/1.1" from 192.168.3.3:64069 - 200 1273B in 17.391µs
2024/02/08 17:06:06 "GET http://192.168.1.100:8000/favicon.ico HTTP/1.1" from 192.168.3.3:64069 - 404 19B in 6.801µs
@jehlybean commented on GitHub (Feb 8, 2024): ``` Running version latest built on 2024-02-08T13:09:44.329Z (commit e676983) 🔧 Need help? https://github.com/qdm12/ddns-updater/discussions/new 🐛 Bug? https://github.com/qdm12/ddns-updater/issues/new ✨ New feature? https://github.com/qdm12/ddns-updater/issues/new ☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new 💻 Email? ***@***.*** 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12 2024-02-08T17:05:31Z 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 ├── Backup: disabled └── Logger ├── Level: debug └── Caller: hidden 2024-02-08T17:05:31Z INFO reading JSON config from file /updater/data/config.json 2024-02-08T17:05:31Z DEBUG config read: {} 2024-02-08T17:05:31Z WARN Found no setting to update record 2024-02-08T17:05:32Z DEBUG configured to fetch IP: v4 or v6: false, v4: false, v6: false 2024-02-08T17:05:32Z INFO [healthcheck server] listening on 127.0.0.1:9999 2024-02-08T17:05:32Z INFO [backup] disabled 2024-02-08T17:05:32Z DEBUG your public IP address are: v4 or v6: invalid IP, v4: invalid IP, v6: invalid IP 2024-02-08T17:05:32Z INFO [http server] listening on :8000 2024/02/08 17:06:06 "GET http://192.168.1.100:8000/ HTTP/1.1" from 192.168.3.3:64069 - 200 1273B in 17.391µs 2024/02/08 17:06:06 "GET http://192.168.1.100:8000/favicon.ico HTTP/1.1" from 192.168.3.3:64069 - 404 19B in 6.801µs ```
Author
Owner

@qdm12 commented on GitHub (Feb 9, 2024):

Yes it doesn't find the file /updater/data/config.json.

DEBUG config read: {}

so it creates as an empty json object {}.

Try accessing a terminal on your Unraid machine and run

docker inspect --format "{{json .Mounts}}" $(docker ps --filter "label=org.opencontainers.image.title=ddns-updater" --latest --format "{{.ID}}" --no-trunc)

That should print out the bind mounts

@qdm12 commented on GitHub (Feb 9, 2024): Yes it doesn't find the file `/updater/data/config.json`. ``` DEBUG config read: {} ``` so it creates as an empty json object `{}`. Try accessing a terminal on your Unraid machine and run ```sh docker inspect --format "{{json .Mounts}}" $(docker ps --filter "label=org.opencontainers.image.title=ddns-updater" --latest --format "{{.ID}}" --no-trunc) ``` That should print out the bind mounts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#369