ERROR: no settings found in config.json #22

Closed
opened 2025-11-20 04:18:53 -05:00 by saavagebueno · 18 comments
Owner

Originally created by @mollusko on GitHub (Apr 3, 2020).

Originally assigned to: @qdm12 on GitHub.

Using docker-compose; have properly formatted config.json via jsonlint, however when I start the container & run docker logs ddns-updater I receive the error 'no settings found in config.json'
getting the same result both with a specific volumes line pointing to the config file: './ddns/data:/config.json' & without that volume line.

permissions for directory & config.json are set as per configuration instructions.

Best I can tell I've got config.json placed incorrectly, or at least placed where ddns-updater isn't seeing it; can you provide some guidance on either properly mapping the volume line in docker-compose.yml or placement of the config file?

Thanks for this tool, not only does it serve a much-needed purpose but I'm learning about several things in the process of getting it up & running which I really appreciate.

Originally created by @mollusko on GitHub (Apr 3, 2020). Originally assigned to: @qdm12 on GitHub. Using docker-compose; have properly formatted config.json via jsonlint, however when I start the container & run docker logs ddns-updater I receive the error 'no settings found in config.json' getting the same result both with a specific volumes line pointing to the config file: './ddns/data:/config.json' & without that volume line. permissions for directory & config.json are set as per configuration instructions. Best I can tell I've got config.json placed incorrectly, or at least placed where ddns-updater isn't seeing it; can you provide some guidance on either properly mapping the volume line in docker-compose.yml or placement of the config file? Thanks for this tool, not only does it serve a much-needed purpose but I'm learning about several things in the process of getting it up & running which I really appreciate.
Author
Owner

@qdm12 commented on GitHub (Apr 3, 2020):

Hey there! Thanks for your comment 😉

It's most likely related to a key missing in the config file, maybe the top level "settings" missing? The file should be readable, and well formatted already (or you'd get another error).

If not, try:

docker run -it --rm -p 8000:8000/tcp -v $(pwd)/data:/updater/data --entrypoint=/bin/sh qmcgaw/ddns-updater
cat /updater/data/config.json
exit

Do you see your file content?

Good luck!

@qdm12 commented on GitHub (Apr 3, 2020): Hey there! Thanks for your comment :wink: It's most likely related to a key missing in the config file, maybe the top level `"settings"` missing? The file should be readable, and well formatted already (or you'd get another error). If not, try: ```sh docker run -it --rm -p 8000:8000/tcp -v $(pwd)/data:/updater/data --entrypoint=/bin/sh qmcgaw/ddns-updater cat /updater/data/config.json exit ``` Do you see your file content? Good luck!
Author
Owner

@mollusko commented on GitHub (Apr 3, 2020):

top level "settings" is present; cat /updater/data/config.json returns 'no such file or directory

@mollusko commented on GitHub (Apr 3, 2020): top level "settings" is present; cat /updater/data/config.json returns 'no such file or directory
Author
Owner

@qdm12 commented on GitHub (Apr 3, 2020):

So that means the file isn't present (I need to add an error message for this).

  • What host OS are you using? Linux/osx/windows?
  • Is the data directory in the same directory as the docker-compose file?

Can you also try:

docker run -it --rm -v "$(pwd)/data":/updater/data --entrypoint=/bin/sh qmcgaw/ddns-updater
ls -al /updater
ls -al /updater/data
exit

and post back the result? Thanks!

@qdm12 commented on GitHub (Apr 3, 2020): So that means the file isn't present (I need to add an error message for this). - What host OS are you using? Linux/osx/windows? - Is the data directory in the same directory as the docker-compose file? Can you also try: ```sh docker run -it --rm -v "$(pwd)/data":/updater/data --entrypoint=/bin/sh qmcgaw/ddns-updater ls -al /updater ls -al /updater/data exit ``` and post back the result? Thanks!
Author
Owner

@mollusko commented on GitHub (Apr 3, 2020):

Host OS is Ubuntu Server 18.04;
docker-compose.yml lives in '/srv/docker', data directory is '/srv/docker/ddns/data'
however moving config.json to '/srv/docker/data' returns similar error: 'open /updater/data/config.json: no such file or directory'

testing suggested commands now, will report back.

@mollusko commented on GitHub (Apr 3, 2020): Host OS is Ubuntu Server 18.04; docker-compose.yml lives in '/srv/docker', data directory is '/srv/docker/ddns/data' however moving config.json to '/srv/docker/data' returns similar error: 'open /updater/data/config.json: no such file or directory' testing suggested commands now, will report back.
Author
Owner

@mollusko commented on GitHub (Apr 3, 2020):

with config.json in '/srv/docker/data' returns:

/ $ ls -al updater
total 12088
drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 .
drwxr-xr-x 1 root root 4096 Apr 3 19:43 ..
-rwxr-xr-x 1 1000 1000 12360584 Mar 27 02:56 app
drwxr-xr-x 2 root root 4096 Apr 3 19:28 data
drwxr-xr-x 2 1000 1000 4096 Mar 27 02:56 ui
/ $ ls -al updater/data
total 12
drwxr-xr-x 2 root root 4096 Apr 3 19:28 .
drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 ..
-r-------- 1 1000 root 311 Apr 3 16:36 config.json

@mollusko commented on GitHub (Apr 3, 2020): with config.json in '/srv/docker/data' returns: > / $ ls -al updater > total 12088 > drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 . > drwxr-xr-x 1 root root 4096 Apr 3 19:43 .. > -rwxr-xr-x 1 1000 1000 12360584 Mar 27 02:56 app > drwxr-xr-x 2 root root 4096 Apr 3 19:28 data > drwxr-xr-x 2 1000 1000 4096 Mar 27 02:56 ui > / $ ls -al updater/data > total 12 > drwxr-xr-x 2 root root 4096 Apr 3 19:28 . > drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 .. > -r-------- 1 1000 root 311 Apr 3 16:36 config.json
Author
Owner

@mollusko commented on GitHub (Apr 3, 2020):

returning config.json to '/srv/docker/ddns/data', which is where the docker-compose.yml lists the volume [./ddns/data:/updater/data] & running the suggested commands above yields:

/ $ ls -al /updater
total 12088
drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 .
drwxr-xr-x 1 root root 4096 Apr 3 20:16 ..
-rwxr-xr-x 1 1000 1000 12360584 Mar 27 02:56 app
drwxr-xr-x 2 root root 4096 Apr 3 20:16 data
drwxr-xr-x 2 1000 1000 4096 Mar 27 02:56 ui
/ $ ls -al /updater/data
total 8
drwxr-xr-x 2 root root 4096 Apr 3 20:16 .
drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 ..

@mollusko commented on GitHub (Apr 3, 2020): returning config.json to '/srv/docker/ddns/data', which is where the docker-compose.yml lists the volume [./ddns/data:/updater/data] & running the suggested commands above yields: > / $ ls -al /updater > total 12088 > drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 . > drwxr-xr-x 1 root root 4096 Apr 3 20:16 .. > -rwxr-xr-x 1 1000 1000 12360584 Mar 27 02:56 app > drwxr-xr-x 2 root root 4096 Apr 3 20:16 data > drwxr-xr-x 2 1000 1000 4096 Mar 27 02:56 ui > / $ ls -al /updater/data > total 8 > drwxr-xr-x 2 root root 4096 Apr 3 20:16 . > drwxr-xr-x 1 1000 root 4096 Mar 27 02:56 .. >
Author
Owner

@qdm12 commented on GitHub (Apr 3, 2020):

Can you post your docker-compose file please? Try with an absolute path in docker compose as well, just to make debugging easier as I'm not 100% certain of your file hierarchy 😄 Thanks!

But the initial error you had seems to be different than the 'no such file' error so I guess the file is there in the end.

Could you also put your config.json (redact out credentials and domain names)?

@qdm12 commented on GitHub (Apr 3, 2020): Can you post your docker-compose file please? Try with an absolute path in docker compose as well, just to make debugging easier as I'm not 100% certain of your file hierarchy :smile: Thanks! But the initial error you had seems to be different than the 'no such file' error so I guess the file is there in the end. Could you also put your config.json (redact out credentials and domain names)?
Author
Owner

@mollusko commented on GitHub (Apr 4, 2020):

Sure; docker-compose.yml & config.json are below.
Tried with a full path to config.json (as shown in docker-compose); still returns error 'no settings found in config.json' though.

  • config.json

    {
        "settings": [
            {
                "provider": "godaddy",
                "domain": "domain.com",
                "host": "sub.domain.com",
                "ip_method": "opendns",
                "key": "key",
                "secret": "secret"
            }
        ]
    }
    
  • docker-compose.yml

    It's part of a larger compose file, with two other containers which start & run fine

    ddns-updater:
      image: qmcgaw/ddns-updater
      container_name: ddns-updater
      network_mode: bridge
      ports:
        - 8000:8000/tcp
      volumes:
        - /srv/docker/ddns/data:/updater/data
      environment:
        - DELAY=300s
        - ROOT_URL=/ddns
        - LISTENING_PORT=8000
        - LOG_ENCODING=console
        - LOG_LEVEL=info
        - NODE_ID=0
        - HTTP_TIMEOUT=10s
        - GOTIFY_URL=
        - GOTIFY_TOKEN=
      restart: always
    

Weird thing I can't seem to replicate or explain:

Oddly, and possibly irrelevant (& I'm uncertain exactly how), the first time I ran docker-compose up -d
with the full path it recreated the container with an alphanumeric string at the start: [string]_ddns-updater,
& still returning error: no settings found in config.json;

Commenting the full path out & back in then rerunning docker-compose up -d has it back to normal: container name is normal,
still with the 'no settings found' error

EDIT: Formatting of code

@mollusko commented on GitHub (Apr 4, 2020): Sure; docker-compose.yml & config.json are below. Tried with a full path to config.json (as shown in docker-compose); still returns error 'no settings found in config.json' though. - config.json ```json { "settings": [ { "provider": "godaddy", "domain": "domain.com", "host": "sub.domain.com", "ip_method": "opendns", "key": "key", "secret": "secret" } ] } ``` - docker-compose.yml It's part of a larger compose file, with two other containers which start & run fine ```yml ddns-updater: image: qmcgaw/ddns-updater container_name: ddns-updater network_mode: bridge ports: - 8000:8000/tcp volumes: - /srv/docker/ddns/data:/updater/data environment: - DELAY=300s - ROOT_URL=/ddns - LISTENING_PORT=8000 - LOG_ENCODING=console - LOG_LEVEL=info - NODE_ID=0 - HTTP_TIMEOUT=10s - GOTIFY_URL= - GOTIFY_TOKEN= restart: always ``` **Weird thing I can't seem to replicate or explain:** Oddly, and possibly irrelevant (& I'm uncertain exactly how), the first time I ran `docker-compose up -d` with the full path it recreated the container with an alphanumeric string at the start: [string]_ddns-updater, & still returning `error: no settings found in config.json`; Commenting the full path out & back in then rerunning `docker-compose up -d` has it back to normal: container name is normal, still with the 'no settings found' error EDIT: Formatting of code
Author
Owner

@qdm12 commented on GitHub (Apr 4, 2020):

The random alphanumeric string is when docker encounters a container with that name already (usually stopped but still there), so it adds that prefix to avoid conflicts. I don't think it's related to the volume path. You can try again with docker-compose down && docker-compose up to be sure.

Anyway, there are some issues in that config.json I think:

  1. I noticed some trailing spaces (I fixed them in your config.json above) at the end of some values, in example "ip_method": "opendns ", careful to remove them if you have them in your actual config.
  2. "host": "sub.domain.com" should be only "sub" or "@" or "*", not the entire FQDN (fully qualified domain name).

Although the program should complain about them, so maybe there are other issues in your config or my program. If this solves it, I'll add safety checks in the program.

@qdm12 commented on GitHub (Apr 4, 2020): The random alphanumeric string is when docker encounters a container with that name already (usually stopped but still there), so it adds that prefix to avoid conflicts. I don't think it's related to the volume path. You can try again with `docker-compose down && docker-compose up` to be sure. Anyway, there are some issues in that config.json I think: 1. I noticed some trailing spaces (I fixed them in your config.json above) at the end of some values, in example `"ip_method": "opendns "`, careful to remove them if you have them in your actual config. 1. `"host": "sub.domain.com"` should be only `"sub"` or `"@"` or `"*"`, not the entire FQDN (fully qualified domain name). Although the program should complain about them, so maybe there are other issues in your config or my program. If this solves it, I'll add safety checks in the program.
Author
Owner

@mollusko commented on GitHub (Apr 4, 2020):

Got it, thanks for teaching me - and for all your help on this, I really appreciate it.

Makes sense, though sort of odd - jsonlint (online) actually put those trailing spaces in, prior to which I was getting 'invalid string' errors. However removing those trailing spaces & changing "host": to "sub" results in the container returning no errors for docker logs ddns-updater!

Perhaps this ought to be migrated to a new issue, but now that the settings appear to be properly implemented I'm getting a container health check result of 'unhealthy' & I don't yet see the A record in my DNS management settings on GoDaddy, despite a 5m environmental variable for 'delay' & 10m uptime for the container. Can you guide me on why this might be?

And let me say again, thank you so much for your help and guidance on this; it means a lot to me that you are taking the time to help me get this sorted.

@mollusko commented on GitHub (Apr 4, 2020): Got it, thanks for teaching me - and for all your help on this, I really appreciate it. Makes sense, though sort of odd - jsonlint (online) actually put those trailing spaces in, prior to which I was getting 'invalid string' errors. However removing those trailing spaces & changing "host": to "sub" results in the container returning no errors for `docker logs ddns-updater`! Perhaps this ought to be migrated to a new issue, but now that the settings appear to be properly implemented I'm getting a container health check result of 'unhealthy' & I don't yet see the A record in my DNS management settings on GoDaddy, despite a 5m environmental variable for 'delay' & 10m uptime for the container. Can you guide me on why this might be? And let me say again, thank you so much for your help and guidance on this; it means a lot to me that you are taking the time to help me get this sorted.
Author
Owner

@qdm12 commented on GitHub (Apr 4, 2020):

Hi again, no problem, I'm glad it's starting to work 😄 It's not super easy to use either, I agree, I need to do a web frontend to manage the settings etc. instead of using a json file... Anyway!!....

The container might stay unhealthy because of the latency for updating the A records across the network. The healthcheck uses a DNS lookup for your subdomain.domain.com and if it's not matching your current IP, it marks the container as unhealthy.

Maybe check your IP at ipinfo.io/ip, then try with

docker run -it --rm alpine:3.11 nslookup sub.domain.com

To check if the IP addresses match. If they don't, they may match in a few minutes.

@qdm12 commented on GitHub (Apr 4, 2020): Hi again, no problem, I'm glad it's starting to work 😄 It's not super easy to use either, I agree, I need to do a web frontend to manage the settings etc. instead of using a json file... Anyway!!.... The container might stay unhealthy because of the latency for updating the A records across the network. The healthcheck uses a DNS lookup for your subdomain.domain.com and if it's not matching your current IP, it marks the container as unhealthy. Maybe check your IP at [ipinfo.io/ip](https://ipinfo.io/ip), then try with ```sh docker run -it --rm alpine:3.11 nslookup sub.domain.com ``` To check if the IP addresses match. If they don't, they may match in a few minutes.
Author
Owner

@qdm12 commented on GitHub (Apr 5, 2020):

Hello, did it work in the end? Thanks!

@qdm12 commented on GitHub (Apr 5, 2020): Hello, did it work in the end? Thanks!
Author
Owner

@mollusko commented on GitHub (Apr 6, 2020):

Need to check on it once I'm back in front of my machine, though I did finally realize that the subdomain A record needs to already exist in order to be updated! So should be good, will update/close once I can check. Thanks!

-------- Original Message --------
On Apr 5, 2020, 9:06 PM, Quentin McGaw wrote:

Hello, did it work in the end? Thanks!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@mollusko commented on GitHub (Apr 6, 2020): Need to check on it once I'm back in front of my machine, though I did finally realize that the subdomain A record needs to already exist in order to be updated! So should be good, will update/close once I can check. Thanks! -------- Original Message -------- On Apr 5, 2020, 9:06 PM, Quentin McGaw wrote: > Hello, did it work in the end? Thanks! > > — > You are receiving this because you authored the thread. > Reply to this email directly, [view it on GitHub](https://github.com/qdm12/ddns-updater/issues/45#issuecomment-609517754), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABYOTFHZAQICN2BHYUAMVWDRLETI3ANCNFSM4L4I5WHA).
Author
Owner

@mollusko commented on GitHub (Apr 17, 2020):

I'm back! I set up my subdomain and have the ddns-updater container running, however the container continues to report as unhealthy. Trying to run docker run -it --rm alpine:3.11 nslookup sub.domain.com results in an error pulling the alpine image or a connection timeout.

docker logs ddns-updater returns:
ERROR cannot get public ipv4 address from https://diagnostic.opendns.com/myip: cannot GET content of URL https://diagnostic.opendns.com/myip: Get https://diagnostic.opendns.com/myip: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) {"node_id": 0}

Thanks again for your help!

@mollusko commented on GitHub (Apr 17, 2020): I'm back! I set up my subdomain and have the ddns-updater container running, however the container continues to report as unhealthy. Trying to run `docker run -it --rm alpine:3.11 nslookup sub.domain.com` results in an error pulling the alpine image or a connection timeout. `docker logs ddns-updater` returns: `ERROR cannot get public ipv4 address from https://diagnostic.opendns.com/myip: cannot GET content of URL https://diagnostic.opendns.com/myip: Get https://diagnostic.opendns.com/myip: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) {"node_id": 0}` Thanks again for your help!
Author
Owner

@qdm12 commented on GitHub (Apr 17, 2020):

Glad you're back 😄

Very strange that nslookup docker command gives a timeout. Does it give a timeout as well if you nslookup github.com for example?

The error (repeating the same URL like 3 times haha!) regarding the timeout for https://diagnostic.opendns.com/myip might be related. Can you access that url with your browser quickly? Maybe you have a bad internet connectivity?

@qdm12 commented on GitHub (Apr 17, 2020): Glad you're back :smile: Very strange that `nslookup` docker command gives a timeout. Does it give a timeout as well if you `nslookup github.com` for example? The error (repeating the same URL like 3 times haha!) regarding the timeout for https://diagnostic.opendns.com/myip might be related. Can you access that url with your browser quickly? Maybe you have a bad internet connectivity?
Author
Owner

@mollusko commented on GitHub (Apr 18, 2020):

nslookup github.com also returns a timeout; direct traffic to https://diagnostic.opendns.com/myip via browser works fine & returns my public IP. I am able to ping github.com from my docker host, & internet connectivity is good/fast from host & other devices.

On Fri, 2020-04-17 at 20:03 -0700, Quentin McGaw wrote:

Glad you're back 😄

Very strange that nslookup docker command gives a timeout. Does it give a timeout as well if you nslookup github.com for example?

The error (repeating the same URL like 3 times haha!) regarding the timeout for https://diagnostic.opendns.com/myip might be related. Can you access that url with your browser quickly? Maybe you have a bad internet connectivity?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@mollusko commented on GitHub (Apr 18, 2020): `nslookup github.com` also returns a timeout; direct traffic to https://diagnostic.opendns.com/myip via browser works fine & returns my public IP. I am able to ping github.com from my docker host, & internet connectivity is good/fast from host & other devices. On Fri, 2020-04-17 at 20:03 -0700, Quentin McGaw wrote: > Glad you're back 😄 > > Very strange that nslookup docker command gives a timeout. Does it give a timeout as well if you nslookup github.com for example? > > The error (repeating the same URL like 3 times haha!) regarding the timeout for https://diagnostic.opendns.com/myip might be related. Can you access that url with your browser quickly? Maybe you have a bad internet connectivity? > > — > You are receiving this because you authored the thread. > Reply to this email directly, [view it on GitHub](https://github.com/qdm12/ddns-updater/issues/45#issuecomment-615545198), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABYOTFD2EMM2GTIXISXQ4S3RNEKAFANCNFSM4L4I5WHA).
Author
Owner

@qdm12 commented on GitHub (Apr 19, 2020):

Can you try

docker run -it --rm alpine:3.11 ping github.com

for a few seconds to see if it times out?

There is definitely something fishy going on with your docker container connectivity from these errors, especially the timeout when pulling alpine that shouldn't happen.

@qdm12 commented on GitHub (Apr 19, 2020): Can you try ``` docker run -it --rm alpine:3.11 ping github.com ``` for a few seconds to see if it times out? There is definitely something fishy going on with your docker container connectivity from these errors, especially the timeout when pulling alpine that shouldn't happen.
Author
Owner

@qdm12 commented on GitHub (May 8, 2020):

Hello, I'll close the issue for now, feel free to re open or comment on it if you managed to fix your problem. Thanks!

@qdm12 commented on GitHub (May 8, 2020): Hello, I'll close the issue for now, feel free to re open or comment on it if you managed to fix your problem. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#22