mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 10:38:41 -04:00
ERROR: no settings found in config.json #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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:
Do you see your file content?
Good luck!
@mollusko commented on GitHub (Apr 3, 2020):
top level "settings" is present; cat /updater/data/config.json returns 'no such file or directory
@qdm12 commented on GitHub (Apr 3, 2020):
So that means the file isn't present (I need to add an error message for this).
Can you also try:
and post back the result? Thanks!
@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):
with config.json in '/srv/docker/data' returns:
@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:
@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)?
@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
docker-compose.yml
It's part of a larger compose file, with two other containers which start & run fine
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 -dwith 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 -dhas it back to normal: container name is normal,still with the 'no settings found' error
EDIT: Formatting of code
@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 upto be sure.Anyway, there are some issues in that config.json I think:
"ip_method": "opendns ", careful to remove them if you have them in your actual config."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.
@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.
@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
To check if the IP addresses match. If they don't, they may match in a few minutes.
@qdm12 commented on GitHub (Apr 5, 2020):
Hello, did it work in the end? Thanks!
@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:
@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.comresults in an error pulling the alpine image or a connection timeout.docker logs ddns-updaterreturns: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!
@qdm12 commented on GitHub (Apr 17, 2020):
Glad you're back 😄
Very strange that
nslookupdocker command gives a timeout. Does it give a timeout as well if younslookup github.comfor 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?
@mollusko commented on GitHub (Apr 18, 2020):
nslookup github.comalso 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:
@qdm12 commented on GitHub (Apr 19, 2020):
Can you try
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 (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!