okTurtles / dnschain

A blockchain-based DNS + HTTP server that fixes HTTPS security, and more!
https://okturtles.com
Other
1.73k stars 169 forks source link

Unsupported datastore: none #149

Closed tofutim closed 9 years ago

tofutim commented 9 years ago

My last step in a dnschain/powerdns install in Ubuntu, I try curl http://127.0.0.1:8000/d/okturtles but I get

Unsupported datastore: none

Looking up d/okturtles.bit and everything else does work.

Looking up d/okturtles.bit and everything else does work. I see that it comes from

            if not (datastore = @dnschain.chains[datastoreName])
                    return @sendErr req, res, 400, "Unsupported datastore: #{datastoreName}"

And maybe related to the warnings at startup:

[INFO] Loading DNSChain config from: /home/tim/.dnschain.conf
2015-04-03T22:11:42.835Z - warn: [Global] Couldn't find keyid configuration: 
{ '0': '/home/tim/.KeyID/config.json',
  '1': '/home/tim/Library/Application Support/KeyID/config.json' }
2015-04-03T22:11:43.013Z - info: [Global] namecoin configuration path: /home/tim/.namecoin/namecoin.conf
2015-04-03T22:11:43.409Z - info: [NXT] Disabled. Missing params: 
{ '0': 'nxt:port',
  '1': 'nxt:connect' }
2015-04-03T22:11:43.875Z - info: [ICANN] Server started.
2015-04-03T22:11:43.878Z - info: [NMC] rpc to namecoind on: 127.0.0.1:8336
2015-04-03T22:11:43.879Z - info: [NMC] Server started.
2015-04-03T22:11:43.885Z - info: [Redis] cache not enabled
2015-04-03T22:11:43.885Z - info: [Redis] Server started.
2015-04-03T22:11:43.939Z - info: [DNS] started DNS 
taoeffect commented 9 years ago

So, that is the old API.

If you want to use DNSChain like that, you need to pass in a Host header of namecoin.dns along with your request.

We recommend you use the new API instead.

Closing. Can re-open if that didn't address your question.

tofutim commented 9 years ago

That certainly does the trick. Need to update the sample documentation (for Debian). Will send pull request (which will include instructions for Ubuntu).

tofutim commented 9 years ago

Incidentally, the new nomenclature, to be a bit juvenile, introduces a bad interaction between %2F and okturtles in the example. I miss the old one.

taoeffect commented 9 years ago

introduces a bad interaction between %2F and okturtles in the example.

It's necessary to support the API, otherwise there's no way to distinguish keys from actions and properties.

I miss the old one.

The old one is still supported. You can just put nginx in front of DNSChain and have it force the Host header to be namecoin.dns. That's what we do on our server and it works just like it used to:

http://dns.dnschain.net/id/greg

tofutim commented 9 years ago

When you specify the Host does it mean that the api will no longer work?

On Sat, Apr 4, 2015 at 12:18 AM, Greg Slepak notifications@github.com wrote:

introduces a bad interaction between %2F and okturtles in the example.

It's necessary to support the API, otherwise there's no way to distinguish keys from actions and properties.

I miss the old one.

The old one is still supported. You can just put nginx in front of DNSChain and have it force the Host header to be namecoin.dns. That's what we do on our server and it works just like it used to:

http://dns.dnschain.net/id/greg

— Reply to this email directly or view it on GitHub https://github.com/okTurtles/dnschain/issues/149#issuecomment-89515264.

taoeffect commented 9 years ago

When you specify the Host does it mean that the api will no longer work?

Both APIs will work.

tofutim commented 9 years ago

Indeed they do. Thanks!

On Sun, Apr 5, 2015 at 1:18 AM, Greg Slepak notifications@github.com wrote:

When you specify the Host does it mean that the api will no longer work?

Both APIs will work.

— Reply to this email directly or view it on GitHub https://github.com/okTurtles/dnschain/issues/149#issuecomment-89734215.