TrueNAS charts generate json config with results parent key #438

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

Originally created by @RebelliousX on GitHub (Sep 19, 2024).

v2.8.0 broke FreeDNS, I can't use it with v1 dynamic update interface or the new v2 dynamic interface I get empty results in the WebUI. In v2.7.0 I used the token from v1 dynamic update interface, didn't change that and it worked fine. Since 2.8.0 broke things, I tried the new token for v2, same thing.

v2.7.0 is working fine, I am using TrueNAS Scale 24.10 beta1. I didn't change any settings when I upgraded from 2.7.0 to 2.8.0.

It seems and I am not sure, the config file is empty?!
Screenshot 2024-09-19 065239

Here is the container log from Portainer. Note that I installed DDNS-Updater from TrueNAS App section, not from Portainer itself, I just used portainer to grab the logs.

========================================

========================================

============= ddns-updater =============

========================================

=========== Made with ❤️ by ============

======= https://github.com/qdm12 =======

========================================

========================================

Running version 2.8.0 built on 2024-09-17T20:59:44.124Z (commit 0674864)

📣 Public IP http provider GOOGLE is no longer working

🔧 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-09-19T04:24:41-05: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: :30007

|   └── Root URL: /

├── Health

|   └── Server listening address: 127.0.0.1:9999

├── Paths

|   ├── Data directory: /updater/data

|   ├── Config file: /updater/data/config.json

|   └── Umask: -----w--w-

├── Backup

|   ├── Period: 24h0m0s

|   └── Directory: /updater/data

└── Logger

    ├── Level: info

    └── Caller: hidden

2024-09-19T04:24:41-05:00 INFO reading JSON config from environment variable CONFIG

2024-09-19T04:24:41-05:00 INFO reading JSON config from file /updater/data/config.json

2024-09-19T04:24:41-05:00 WARN Found no setting to update record

2024-09-19T04:24:41-05:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999

2024-09-19T04:24:41-05:00 INFO [http server] http server listening on [::]:30007

2024-09-19T04:24:41-05:00 INFO [backup] each 24h0m0s; writing zip files to directory /updater/data
Originally created by @RebelliousX on GitHub (Sep 19, 2024). v2.8.0 broke FreeDNS, I can't use it with v1 dynamic update interface or the new [v2 dynamic interface](https://freedns.afraid.org/dynamic/v2/) I get empty results in the WebUI. In v2.7.0 I used the token from v1 dynamic update interface, didn't change that and it worked fine. Since 2.8.0 broke things, I tried the new token for v2, same thing. v2.7.0 is working fine, I am using TrueNAS Scale 24.10 beta1. I didn't change any settings when I upgraded from 2.7.0 to 2.8.0. ~It seems and I am not sure, the config file is empty?!~ ![Screenshot 2024-09-19 065239](https://github.com/user-attachments/assets/5dbb3438-e397-44f6-adff-f097fcebbe42) Here is the container log from Portainer. Note that I installed DDNS-Updater from TrueNAS App section, not from Portainer itself, I just used portainer to grab the logs. ``` ======================================== ======================================== ============= ddns-updater ============= ======================================== =========== Made with ❤️ by ============ ======= https://github.com/qdm12 ======= ======================================== ======================================== Running version 2.8.0 built on 2024-09-17T20:59:44.124Z (commit 0674864) 📣 Public IP http provider GOOGLE is no longer working 🔧 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-09-19T04:24:41-05: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: :30007 | └── Root URL: / ├── Health | └── Server listening address: 127.0.0.1:9999 ├── Paths | ├── Data directory: /updater/data | ├── Config file: /updater/data/config.json | └── Umask: -----w--w- ├── Backup | ├── Period: 24h0m0s | └── Directory: /updater/data └── Logger ├── Level: info └── Caller: hidden 2024-09-19T04:24:41-05:00 INFO reading JSON config from environment variable CONFIG 2024-09-19T04:24:41-05:00 INFO reading JSON config from file /updater/data/config.json 2024-09-19T04:24:41-05:00 WARN Found no setting to update record 2024-09-19T04:24:41-05:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999 2024-09-19T04:24:41-05:00 INFO [http server] http server listening on [::]:30007 2024-09-19T04:24:41-05:00 INFO [backup] each 24h0m0s; writing zip files to directory /updater/data ```
Author
Owner

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

Found no setting to update record - that's odd. Try deleting and recreating the container? What's the content of your config json file?

@qdm12 commented on GitHub (Sep 19, 2024): `Found no setting to update record` - that's odd. Try deleting and recreating the container? What's the content of your config json file?
Author
Owner

@RebelliousX commented on GitHub (Sep 19, 2024):

@qdm12 I did that multiple times, rebooted the system, nothing. I tried the old token for v1 dynamic update and v2, same thing.

I updated the original post with a screenshot of config.json file, so it seems valid. I am still struggling how to copy/paste from shell webui from truenas, lol.

But according to the freedns settings. Is the result dictionary okay to be there in the screenshot above? I don't know.

{
  "settings": [
    {
      "provider": "freedns",
      "domain": "sub.domain.com",
      "token": "token",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    }
  ]
}
@RebelliousX commented on GitHub (Sep 19, 2024): @qdm12 I did that multiple times, rebooted the system, nothing. I tried the old token for v1 dynamic update and v2, same thing. I updated the original post with a screenshot of `config.json` file, so it seems valid. I am still struggling how to copy/paste from shell webui from truenas, lol. But according to the[ freedns settings](https://github.com/qdm12/ddns-updater/blob/master/docs/freedns.md). Is the `result` dictionary okay to be there in the screenshot above? I don't know. ```json { "settings": [ { "provider": "freedns", "domain": "sub.domain.com", "token": "token", "ip_version": "ipv4", "ipv6_suffix": "" } ] } ```
Author
Owner

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

Try running with LOG_LEVEL=debug? It should log out your JSON configuration, does it look like it matches what you show?

Let's not focus on freedns, it just looks like ddns-updater does not find any configuration to use, so it's not even aware it should update anything (freedns or not).

@qdm12 commented on GitHub (Sep 19, 2024): Try running with `LOG_LEVEL=debug`? It should log out your JSON configuration, does it look like it matches what you show? Let's not focus on freedns, it just looks like ddns-updater does not find any configuration to use, so it's not even aware it should update anything (freedns or not).
Author
Owner

@RebelliousX commented on GitHub (Sep 19, 2024):

@qdm12 Thank you for your help. I added LOG_LEVEL=DEBUG as environment variable and here is the log. (I removed personal details like the exact subdomain and token), it matches the settings.

2024-09-19 21:11:57.590165+00:00========================================
2024-09-19 21:11:57.590188+00:00========================================
2024-09-19 21:11:57.590194+00:00============= ddns-updater =============
2024-09-19 21:11:57.590197+00:00========================================
2024-09-19 21:11:57.590201+00:00=========== Made with ❤️ by ============
2024-09-19 21:11:57.590208+00:00======= https://github.com/qdm12 =======
2024-09-19 21:11:57.590212+00:00========================================
2024-09-19 21:11:57.590216+00:00========================================
2024-09-19 21:11:57.590219+00:002024-09-19T21:11:57.590219785Z
2024-09-19 21:11:57.590223+00:00Running version 2.8.0 built on 2024-09-17T20:59:44.124Z (commit 0674864)
2024-09-19 21:11:57.590229+00:002024-09-19T21:11:57.590229439Z
2024-09-19 21:11:57.590233+00:00📣 Public IP http provider GOOGLE is no longer working
2024-09-19 21:11:57.590236+00:002024-09-19T21:11:57.590236645Z
2024-09-19 21:11:57.590240+00:00🔧 Need help? ☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new/choose
2024-09-19 21:11:57.590246+00:00🐛 Bug? ✨ New feature? https://github.com/qdm12/ddns-updater/issues/new/choose
2024-09-19 21:11:57.590250+00:00💻 Email? quentin.mcgaw@gmail.com
2024-09-19 21:11:57.590253+00:00💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-09-19 21:11:57.590578+00:002024-09-19T16:11:57-05:00 INFO Settings summary:
2024-09-19 21:11:57.590596+00:00├── HTTP client
2024-09-19 21:11:57.590601+00:00|   └── Timeout: 10s
2024-09-19 21:11:57.590605+00:00├── Update
2024-09-19 21:11:57.590609+00:00|   ├── Period: 5m0s
2024-09-19 21:11:57.590612+00:00|   └── Cooldown: 5m0s
2024-09-19 21:11:57.590616+00:00├── Public IP fetching
2024-09-19 21:11:57.590622+00:00|   ├── HTTP enabled: yes
2024-09-19 21:11:57.590626+00:00|   ├── HTTP IP providers
2024-09-19 21:11:57.590629+00:00|   |   └── all
2024-09-19 21:11:57.590633+00:00|   ├── HTTP IPv4 providers
2024-09-19 21:11:57.590637+00:00|   |   └── all
2024-09-19 21:11:57.590643+00:00|   ├── HTTP IPv6 providers
2024-09-19 21:11:57.590646+00:00|   |   └── all
2024-09-19 21:11:57.590650+00:00|   ├── DNS enabled: yes
2024-09-19 21:11:57.590653+00:00|   ├── DNS timeout: 3s
2024-09-19 21:11:57.590657+00:00|   └── DNS over TLS providers
2024-09-19 21:11:57.590662+00:00|       └── all
2024-09-19 21:11:57.590666+00:00├── Resolver: use Go default resolver
2024-09-19 21:11:57.590670+00:00├── Server
2024-09-19 21:11:57.590673+00:00|   ├── Listening address: :30007
2024-09-19 21:11:57.590677+00:00|   └── Root URL: /
2024-09-19 21:11:57.590683+00:00├── Health
2024-09-19 21:11:57.590687+00:00|   └── Server listening address: 127.0.0.1:9999
2024-09-19 21:11:57.590690+00:00├── Paths
2024-09-19 21:11:57.590694+00:00|   ├── Data directory: /updater/data
2024-09-19 21:11:57.590698+00:00|   ├── Config file: /updater/data/config.json
2024-09-19 21:11:57.590704+00:00|   └── Umask: -----w--w-
2024-09-19 21:11:57.590708+00:00├── Backup
2024-09-19 21:11:57.590711+00:00|   ├── Period: 24h0m0s
2024-09-19 21:11:57.590715+00:00|   └── Directory: /updater/data
2024-09-19 21:11:57.590718+00:00└── Logger
2024-09-19 21:11:57.590724+00:00├── Level: debug
2024-09-19 21:11:57.590727+00:00└── Caller: hidden
2024-09-19 21:11:57.590731+00:002024-09-19T16:11:57-05:00 INFO reading JSON config from environment variable CONFIG
2024-09-19 21:11:57.590734+00:002024-09-19T16:11:57-05:00 DEBUG config read: {"result": {"settings": [{"domain": "mysubdomain.crabdance.com", "ip_version": "ipv4", "provider": "freedns", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxx"}]}, "warnings": []}
2024-09-19 21:11:57.590920+00:002024-09-19T16:11:57-05:00 INFO reading JSON config from file /updater/data/config.json
2024-09-19 21:11:57.590935+00:002024-09-19T16:11:57-05:00 DEBUG config read: {
2024-09-19 21:11:57.590940+00:00"result": {
2024-09-19 21:11:57.590951+00:00"settings": [
2024-09-19 21:11:57.590955+00:00{
2024-09-19 21:11:57.590959+00:00"domain": "mysubdomain.crabdance.com",
2024-09-19 21:11:57.590963+00:00"ip_version": "ipv4",
2024-09-19 21:11:57.590968+00:00"provider": "freedns",
2024-09-19 21:11:57.590972+00:00"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
2024-09-19 21:11:57.590979+00:00}
2024-09-19 21:11:57.590983+00:00]
2024-09-19 21:11:57.590987+00:00},
2024-09-19 21:11:57.590990+00:00"warnings": []
2024-09-19 21:11:57.590994+00:00}
2024-09-19 21:11:57.590998+00:002024-09-19T16:11:57-05:00 WARN Found no setting to update record
2024-09-19 21:11:57.751655+00:002024-09-19T16:11:57-05:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999
2024-09-19 21:11:57.751921+00:002024-09-19T16:11:57-05:00 INFO [http server] http server listening on [::]:30007
2024-09-19 21:11:57.752167+00:002024-09-19T16:11:57-05:00 INFO [backup] each 24h0m0s; writing zip files to directory /updater/data
2024-09-19 21:11:57.752323+00:002024-09-19T16:11:57-05:00 DEBUG configured to fetch IP: v4 or v6: false, v4: false, v6: false
2024-09-19 21:11:57.752404+00:002024-09-19T16:11:57-05:00 DEBUG your public IP address are: v4 or v6: invalid IP, v4: invalid IP, v6: invalid IP
2024-09-19 21:12:07.212464+00:002024/09/19 16:12:07 "GET http://192.168.4.32:30007/ HTTP/1.1" from 192.168.4.179:53805 - 200 1907B in 543.763µs
2024-09-19 21:12:07.334399+00:002024/09/19 16:12:07 "GET http://192.168.4.32:30007/static/styles.css HTTP/1.1" from 192.168.4.179:53805 - 200 3203B in 950.317µs
2024-09-19 21:12:07.357053+00:002024/09/19 16:12:07 "GET http://192.168.4.32:30007/static/favicon.svg HTTP/1.1" from 192.168.4.179:53805 - 200 3192B in 1.056065ms

Things I tried too:

  • installing app under different name, so the app_mounts config folder will be different.
  • installing the app in portainer using docker compose / creating stack
  • installing the app and choosing host dataset instead of built-in ix-volume generated by TrueNAS.
  • I tried editing the config file manually from TrueNAS webui shell using nano editor. lol.

Same thing.

And the WebUI:
Screenshot 2024-09-19 at 16-18-47 DDNS Updater

@RebelliousX commented on GitHub (Sep 19, 2024): @qdm12 Thank you for your help. I added LOG_LEVEL=DEBUG as environment variable and here is the log. (I removed personal details like the exact subdomain and token), it matches the settings. ```log 2024-09-19 21:11:57.590165+00:00======================================== 2024-09-19 21:11:57.590188+00:00======================================== 2024-09-19 21:11:57.590194+00:00============= ddns-updater ============= 2024-09-19 21:11:57.590197+00:00======================================== 2024-09-19 21:11:57.590201+00:00=========== Made with ❤️ by ============ 2024-09-19 21:11:57.590208+00:00======= https://github.com/qdm12 ======= 2024-09-19 21:11:57.590212+00:00======================================== 2024-09-19 21:11:57.590216+00:00======================================== 2024-09-19 21:11:57.590219+00:002024-09-19T21:11:57.590219785Z 2024-09-19 21:11:57.590223+00:00Running version 2.8.0 built on 2024-09-17T20:59:44.124Z (commit 0674864) 2024-09-19 21:11:57.590229+00:002024-09-19T21:11:57.590229439Z 2024-09-19 21:11:57.590233+00:00📣 Public IP http provider GOOGLE is no longer working 2024-09-19 21:11:57.590236+00:002024-09-19T21:11:57.590236645Z 2024-09-19 21:11:57.590240+00:00🔧 Need help? ☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new/choose 2024-09-19 21:11:57.590246+00:00🐛 Bug? ✨ New feature? https://github.com/qdm12/ddns-updater/issues/new/choose 2024-09-19 21:11:57.590250+00:00💻 Email? quentin.mcgaw@gmail.com 2024-09-19 21:11:57.590253+00:00💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12 2024-09-19 21:11:57.590578+00:002024-09-19T16:11:57-05:00 INFO Settings summary: 2024-09-19 21:11:57.590596+00:00├── HTTP client 2024-09-19 21:11:57.590601+00:00| └── Timeout: 10s 2024-09-19 21:11:57.590605+00:00├── Update 2024-09-19 21:11:57.590609+00:00| ├── Period: 5m0s 2024-09-19 21:11:57.590612+00:00| └── Cooldown: 5m0s 2024-09-19 21:11:57.590616+00:00├── Public IP fetching 2024-09-19 21:11:57.590622+00:00| ├── HTTP enabled: yes 2024-09-19 21:11:57.590626+00:00| ├── HTTP IP providers 2024-09-19 21:11:57.590629+00:00| | └── all 2024-09-19 21:11:57.590633+00:00| ├── HTTP IPv4 providers 2024-09-19 21:11:57.590637+00:00| | └── all 2024-09-19 21:11:57.590643+00:00| ├── HTTP IPv6 providers 2024-09-19 21:11:57.590646+00:00| | └── all 2024-09-19 21:11:57.590650+00:00| ├── DNS enabled: yes 2024-09-19 21:11:57.590653+00:00| ├── DNS timeout: 3s 2024-09-19 21:11:57.590657+00:00| └── DNS over TLS providers 2024-09-19 21:11:57.590662+00:00| └── all 2024-09-19 21:11:57.590666+00:00├── Resolver: use Go default resolver 2024-09-19 21:11:57.590670+00:00├── Server 2024-09-19 21:11:57.590673+00:00| ├── Listening address: :30007 2024-09-19 21:11:57.590677+00:00| └── Root URL: / 2024-09-19 21:11:57.590683+00:00├── Health 2024-09-19 21:11:57.590687+00:00| └── Server listening address: 127.0.0.1:9999 2024-09-19 21:11:57.590690+00:00├── Paths 2024-09-19 21:11:57.590694+00:00| ├── Data directory: /updater/data 2024-09-19 21:11:57.590698+00:00| ├── Config file: /updater/data/config.json 2024-09-19 21:11:57.590704+00:00| └── Umask: -----w--w- 2024-09-19 21:11:57.590708+00:00├── Backup 2024-09-19 21:11:57.590711+00:00| ├── Period: 24h0m0s 2024-09-19 21:11:57.590715+00:00| └── Directory: /updater/data 2024-09-19 21:11:57.590718+00:00└── Logger 2024-09-19 21:11:57.590724+00:00├── Level: debug 2024-09-19 21:11:57.590727+00:00└── Caller: hidden 2024-09-19 21:11:57.590731+00:002024-09-19T16:11:57-05:00 INFO reading JSON config from environment variable CONFIG 2024-09-19 21:11:57.590734+00:002024-09-19T16:11:57-05:00 DEBUG config read: {"result": {"settings": [{"domain": "mysubdomain.crabdance.com", "ip_version": "ipv4", "provider": "freedns", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxx"}]}, "warnings": []} 2024-09-19 21:11:57.590920+00:002024-09-19T16:11:57-05:00 INFO reading JSON config from file /updater/data/config.json 2024-09-19 21:11:57.590935+00:002024-09-19T16:11:57-05:00 DEBUG config read: { 2024-09-19 21:11:57.590940+00:00"result": { 2024-09-19 21:11:57.590951+00:00"settings": [ 2024-09-19 21:11:57.590955+00:00{ 2024-09-19 21:11:57.590959+00:00"domain": "mysubdomain.crabdance.com", 2024-09-19 21:11:57.590963+00:00"ip_version": "ipv4", 2024-09-19 21:11:57.590968+00:00"provider": "freedns", 2024-09-19 21:11:57.590972+00:00"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxx" 2024-09-19 21:11:57.590979+00:00} 2024-09-19 21:11:57.590983+00:00] 2024-09-19 21:11:57.590987+00:00}, 2024-09-19 21:11:57.590990+00:00"warnings": [] 2024-09-19 21:11:57.590994+00:00} 2024-09-19 21:11:57.590998+00:002024-09-19T16:11:57-05:00 WARN Found no setting to update record 2024-09-19 21:11:57.751655+00:002024-09-19T16:11:57-05:00 INFO [healthcheck server] health http server listening on 127.0.0.1:9999 2024-09-19 21:11:57.751921+00:002024-09-19T16:11:57-05:00 INFO [http server] http server listening on [::]:30007 2024-09-19 21:11:57.752167+00:002024-09-19T16:11:57-05:00 INFO [backup] each 24h0m0s; writing zip files to directory /updater/data 2024-09-19 21:11:57.752323+00:002024-09-19T16:11:57-05:00 DEBUG configured to fetch IP: v4 or v6: false, v4: false, v6: false 2024-09-19 21:11:57.752404+00:002024-09-19T16:11:57-05:00 DEBUG your public IP address are: v4 or v6: invalid IP, v4: invalid IP, v6: invalid IP 2024-09-19 21:12:07.212464+00:002024/09/19 16:12:07 "GET http://192.168.4.32:30007/ HTTP/1.1" from 192.168.4.179:53805 - 200 1907B in 543.763µs 2024-09-19 21:12:07.334399+00:002024/09/19 16:12:07 "GET http://192.168.4.32:30007/static/styles.css HTTP/1.1" from 192.168.4.179:53805 - 200 3203B in 950.317µs 2024-09-19 21:12:07.357053+00:002024/09/19 16:12:07 "GET http://192.168.4.32:30007/static/favicon.svg HTTP/1.1" from 192.168.4.179:53805 - 200 3192B in 1.056065ms ``` Things I tried too: - installing app under different name, so the app_mounts config folder will be different. - installing the app in portainer using docker compose / creating stack - installing the app and choosing host dataset instead of built-in `ix-volume ` generated by TrueNAS. - I tried editing the config file manually from TrueNAS webui shell using nano editor. lol. Same thing. And the WebUI: ![Screenshot 2024-09-19 at 16-18-47 DDNS Updater](https://github.com/user-attachments/assets/8076c81a-c180-42ac-b3d3-bca971d82be3)
Author
Owner

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

Oh the top most key should be settings, not results. I'm not sure where you read about results or warnings.

@qdm12 commented on GitHub (Sep 19, 2024): Oh the top most key should be settings, not results. I'm not sure where you read about results or warnings.
Author
Owner

@RebelliousX commented on GitHub (Sep 19, 2024):

@qdm12 Exactly. It gets generated by TrueNAS somehow, like I said, I even edited the config file manually using nano editor, it reverts back with results dictionary or hashmap or whatever it is called. Also please look at the UMASK, is it correct, I see only writes, I am not sure?

On another issue, I lost the ability to rollback to the previous container version from TrueNAS WebUI, since I deleted the app while testing things. Now I am kind of stuck. I tried to use Portainer to create new stack with docker compose and install version 2.7.0.

I used the docker compose template in the main page. Modified the environment variable

CONFIG={"settings":[{"domain":"mysubdomain.crabdance.com","ip_version":"ipv4","provider":"freedns","token":"xxxxxxxxxxxxxxxxxxxxxxxxx"}]}

The issue I get error that permission denied can't read config.json file. I even gave the container SYS_ADMIN privileges.

When installing the app normally through TrueNAS web interface, I know the UID should be 1000, but when TrueNAS tries to install the app, it wants UID=568 which I believe the built-in apps user if I am not mistaken. And that always worked fine.

Any suggestions?

Edit:

ERROR cannot write configuration to file: open /updater/data/config.json: permission denied

INFO Shutdown successful

If I delete the volume it bypasses the error, and the webui shows the correct results.
That works even on 2.8.0. But that means, any settings can't be saved per the ReadMe on the main page.

I deleted the BIND and created a new empty volume and gave it a name, changed the volume mapping from BIND to Volume and the path /updater/data for its value. As for the Host value, changed it from /data/compose/13/data and I pointed it towards the new created volume.

Now the output log:

INFO reading JSON config from environment variable CONFIG
DEBUG config read: {"settings":[{"domain":"mysubdomain.crabdance.com","ip_version":"ipv4","provider":"freedns","token":"xxxxxxxxxxxxxxxxxxxxxxxx"}]}
INFO Found single setting to update record
INFO Reading history from database: domain crabdance.com owner mysubdomain ipv4
INFO [healthcheck server] health http server listening on 127.0.0.1:9999
INFO [http server] http server listening on [::]:8000
INFO [backup] disabled

With this, it works with latest version 2.8.0.

But this is not a real solution, this is just a band-aid if you will. I think there might be a need to modify the way settings key is read. That is, if it is not found, then we need to loop through any keys in the JSON and get their values until settings key is found. That will solve the problem for sure. I hope you implement this.

@RebelliousX commented on GitHub (Sep 19, 2024): @qdm12 Exactly. It gets generated by TrueNAS somehow, like I said, I even edited the config file manually using nano editor, it reverts back with `results` dictionary or hashmap or whatever it is called. Also please look at the UMASK, is it correct, I see only writes, I am not sure? On another issue, I lost the ability to rollback to the previous container version from TrueNAS WebUI, since I deleted the app while testing things. Now I am kind of stuck. I tried to use Portainer to create new stack with docker compose and install version 2.7.0. I used the docker compose template in the main page. Modified the environment variable ``` CONFIG={"settings":[{"domain":"mysubdomain.crabdance.com","ip_version":"ipv4","provider":"freedns","token":"xxxxxxxxxxxxxxxxxxxxxxxxx"}]} ``` The issue I get error that permission denied can't read config.json file. I even gave the container SYS_ADMIN privileges. When installing the app normally through TrueNAS web interface, I know the UID should be 1000, but when TrueNAS tries to install the app, it wants UID=568 which I believe the built-in `apps` user if I am not mistaken. And that always worked fine. Any suggestions? **Edit:** ```log ERROR cannot write configuration to file: open /updater/data/config.json: permission denied INFO Shutdown successful ``` ~If I delete the volume it bypasses the error, and the webui shows the correct results. That works even on 2.8.0. But that means, any settings can't be saved per the ReadMe on the main page.~ I deleted the BIND and created a new empty volume and gave it a name, changed the volume mapping from BIND to Volume and the path `/updater/data` for its value. As for the `Host` value, changed it from `/data/compose/13/data` and I pointed it towards the new created volume. Now the output log: ```log INFO reading JSON config from environment variable CONFIG DEBUG config read: {"settings":[{"domain":"mysubdomain.crabdance.com","ip_version":"ipv4","provider":"freedns","token":"xxxxxxxxxxxxxxxxxxxxxxxx"}]} INFO Found single setting to update record INFO Reading history from database: domain crabdance.com owner mysubdomain ipv4 INFO [healthcheck server] health http server listening on 127.0.0.1:9999 INFO [http server] http server listening on [::]:8000 INFO [backup] disabled ``` With this, it works with latest version 2.8.0. ### **But this is not a real solution, this is just a band-aid if you will. I think there might be a need to modify the way `settings` key is read. That is, if it is not found, then we need to loop through any keys in the JSON and get their values until `settings` key is found. That will solve the problem for sure. I hope you implement this.**
Author
Owner

@qdm12 commented on GitHub (Sep 20, 2024):

Also please look at the UMASK, is it correct, I see only writes, I am not sure?

Not exactly sure what you mean, but I made a v2.8.1 release fixing the umask behavior. It would work fine more or less on v2.8.0 though.

That is, if it is not found, then we need to loop through any keys in the JSON and get their values until settings key is found.

Actually that would be a band aid solution 😄 What is creating that JSON file with the results and warnings keys? That's where the problem is. I would guess it's truenas charts repository, so please create an issue on https://github.com/truenas/charts/issues/new so that they fix that json configuration file generation.

@qdm12 commented on GitHub (Sep 20, 2024): > Also please look at the UMASK, is it correct, I see only writes, I am not sure? Not exactly sure what you mean, but I made a v2.8.1 release fixing the umask behavior. It would work fine more or less on v2.8.0 though. > That is, if it is not found, then we need to loop through any keys in the JSON and get their values until settings key is found. Actually that would be a band aid solution 😄 What is creating that JSON file with the `results` and `warnings` keys? That's where the problem is. I would guess it's truenas charts repository, so please create an issue on https://github.com/truenas/charts/issues/new so that they fix that json configuration file generation.
Author
Owner

@RebelliousX commented on GitHub (Sep 20, 2024):

@qdm12 True, I guess both solutions are band aids. I created a new issue in TrueNAS charts. I would like to keep this open until it gets fixed if you don't mind, I will close it then. Thanks for your help.

This is getting fixed here https://github.com/truenas/apps/pull/469

Thanks @qdm12 for your help.

@RebelliousX commented on GitHub (Sep 20, 2024): @qdm12 True, I guess both solutions are band aids. I created a new issue in TrueNAS charts. I would like to keep this open until it gets fixed if you don't mind, I will close it then. Thanks for your help. This is getting fixed here https://github.com/truenas/apps/pull/469 Thanks @qdm12 for your help.
Author
Owner

@haldi4803 commented on GitHub (Jan 2, 2025):

It's not fixed....

image

but every time the container starts it creates a new "config.json" file and overwrites the one i created.

@haldi4803 commented on GitHub (Jan 2, 2025): It's not fixed.... ![image](https://github.com/user-attachments/assets/47cad71a-9e61-415b-ae4c-51c06c1351b1) but every time the container starts it creates a new "config.json" file and overwrites the one i created.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#438