siennathesane / cloudflare-sync

A nice to have, MIT-licensed tool for using Cloudflare as a dynamic DNS provider.
MIT License
268 stars 19 forks source link

Errors #2

Closed nodefive closed 5 years ago

nodefive commented 5 years ago

I'm getting a bunch of errors. 400 for http and 7003 and 7000.

A bit more info on this would be awesome!

siennathesane commented 5 years ago

Sure, I can help. Some questions:

nodefive commented 5 years ago

Hey Mike, thanks for the light speed reply! First of all, nice kid! Enjoy, cuz they grow like weed, you blink and they are out of the house already.

I was just testing the app actually. No ACTUAL production need for it (yet). I came because of the headline of the news (the hacker one): "use to create and manage dyns" (or something like that). The json I have is the plain one, I've only changed the domain. Here is what happens:

[~/Desktop/cloudflare-sync-master] $ ./cloudflare-sync -api-token <MY_C.FARE_API_KEY_FOR_MLDO> production.json -zone-id MLDO
2019/09/05 17:53:09 hello from boulder.
2019/09/05 17:53:09 starting up workers.
2019/09/05 17:53:09 workers booted.
2019/09/05 17:53:39 refreshing public ip.
2019/09/05 17:53:43 current public ip is <MY_IP>.
2019/09/05 17:53:44 cannot get upstream records: error from makeRequest: HTTP status 400: content "{\"success\":false,\"errors\":[{\"code\":7003,\"message\":\"Could not route to \\/zones\\/dns_records, perhaps your object identifier is invalid?\"},{\"code\":7000,\"message\":\"No route for that URI\"}],\"messages\":[],\"result\":null}"

I actually did not understand how this goes. How can I create a dyn? I've tried with valid TLDs I own and with fake ones. Everything gives me this error.

Json:

  {
    "type": "A",
    "name": "somesubdomain.real-or-fake.com",
    "proxied": true,
    "ttl": 120,
    "priority": 1
  }
]
siennathesane commented 5 years ago

Thanks!

Does the test record exist? I haven't tested it with non-existent records, all of the records I use already exist, so that very well might be the problem.

nodefive commented 5 years ago

Yeah I've tested with fake domains, but also used a real one I own, but it is hosted by godaddy. btw I failed my DNS records class, so I'm really not confided of what I am doing. :(

siennathesane commented 5 years ago

Ah, okay, that would be part of the problem. You need to have a site with Cloudflare, and have a hosted zone with them. If you don't have that, then it won't work.

Sorry!

nodefive commented 5 years ago

Gotcha! So basically what the app does is create a subdomain for a cloudfare's hosted TLD. Thanks man!

siennathesane commented 5 years ago

Yeah np, I clarified the readme for future folks. Happy using. :)