Installing NCDNS

Namecoin, NMControl
barkingdoggy
Posts: 36
Joined: Thu Jul 23, 2015 7:58 pm
os: windows

Installing NCDNS

Post by barkingdoggy »

Rather than mucking up the NCDNS Discussion and Direction thread, I figured I'd continue this as a new thread... Reiterating,
Downloaded ncdns.t-master from github. But the Make command on my Linux Mint machine fails. Here's the terminal session:

john@john-ThinkPad-X300 ~/Downloads/ncdns.t-master $ make
go get github.com/hlandau/ncdns
# gopkg.in/hlandau/service.v2/daemon/caps
src/gopkg.in/hlandau/service.v2/daemon/caps/caps_linux.go:7:28: fatal error: sys/capability.h: No such file or directory
#include <sys/capability.h>
^
compilation terminated.
make: *** [.gotten] Error 2
Suggestions?
Biolizard suggested,
Not certain, but try "apt-get install libcap-dev libcap2" first.
After that the make command completes without error (thanks, biolizard!).

Now there is a new sub-directory called bin in the ~/Downloads/ncdns.t-master directory. It has two files, ncdns and ncdt. However, there is no /etc/ncdns directory nor ncdns.conf files anywhere. Do I have to manually create the directories and the .conf files from the example in docs?

hla
Posts: 46
Joined: Mon Nov 10, 2014 12:01 am
os: linux
Contact:

Re: Installing NCDNS

Post by hla »

Yes. Here's a basic example:

Code: Select all

[ncdns]
bind="127.0.0.1:PORT"
namecoinrpcaddress="127.0.0.1:RPCPORT"
namecoinrpcusername="USERNAME"
namecoinrpcpassword="PASSWORD"

barkingdoggy
Posts: 36
Joined: Thu Jul 23, 2015 7:58 pm
os: windows

Re: Installing NCDNS

Post by barkingdoggy »

Here's my ncdns.conf:

Code: Select all

[ncdns]
bind="127.0.0.1:1099"
namecoinrpcaddress="127.0.0.1:8336"
namecoinrpcusername="john"
namecoinrpcpassword="john"
When I issue the console command "./ncdns" it returns "[INFO] ncdns.server: Listeners started". In a separate console window, the command "namecoind name_show d/nx" is working. However, the command "nslookup -port=1099 nx.bit 127.0.0.1" returns, "** server can't find nx.bit: SERVFAIL."

The console window which I used to launch ncdns is open and ncdns appears to be listening quietly -- no queries reported. it doesn't seem like ncdns is properly configured, is it? My understanding is that the namecoinrpcusername and password in my ncdns.conf file can be anything at all, right? FWIW, my namecoin.conf contains the line, "rpcport=8336".

hla
Posts: 46
Joined: Mon Nov 10, 2014 12:01 am
os: linux
Contact:

Re: Installing NCDNS

Post by hla »

Try running with --xlog.severity=DEBUG

barkingdoggy
Posts: 36
Joined: Thu Jul 23, 2015 7:58 pm
os: windows

Re: Installing NCDNS

Post by barkingdoggy »

Code: Select all

bad flag syntax: ----xlog.severity=DEBUG
Usage of ./ncdns:
  -conf value
    	Configuration file path (default "")
  -ncdns.bind value
    	Address to bind to (e.g. 0.0.0.0:53) (default ":53")
  -ncdns.cachemaxentries value
    	Maximum name cache entries (default 100)
  -ncdns.canonicalnameservers value
    	Comma-separated list of nameservers to use for NS records. If blank, SelfName (or autogenerated psuedo-hostname) is used. (default "")
  -ncdns.canonicalsuffix value
    	Suffix to advertise via HTTP (default "bit")
  -ncdns.hostmaster value
    	Hostmaster e. mail address (default "")
  -ncdns.httplistenaddr value
    	Address for webserver to listen at (default: disabled) (default "")
  -ncdns.namecoinrpcaddress value
    	Namecoin RPC server address (default "localhost:8336")
  -ncdns.namecoinrpcpassword value
    	Namecoin RPC password (default "")
  -ncdns.namecoinrpcusername value
    	Namecoin RPC username (default "")
  -ncdns.privatekey value
    	Path to the KSK's corresponding private key file (default "")
  -ncdns.publickey value
    	Path to the DNSKEY KSK public key file (default "")
  -ncdns.selfip value
    	The canonical IP address for this service (default "127.127.127.127")
  -ncdns.selfname value
    	The FQDN of this nameserver. If empty, a psuedo-hostname is generated. (default "")
  -ncdns.tplpath value
    	The path to the tpl directory (empty: autodetect) (default "")
  -ncdns.tplset value
    	The template set to use (default "std")
  -ncdns.vanityips value
    	Comma separated list of IP addresses to place in A/AAAA records at the zone apex (default: don't add any records) (default "")
  -ncdns.zoneprivatekey value
    	Path to the ZSK's corresponding private key file (default "")
  -ncdns.zonepublickey value
    	Path to the DNSKEY ZSK public key file; if one is not specified, a temporary one is generated on startup and used only for the duration of that process (default "")
  -service.chroot value
    	Chroot to a directory (must set UID, GID) ("/" disables) (default "")
  -service.cpuprofile value
    	Write CPU profile to file (default "")
  -service.daemon value
    	Run as daemon? (doesn't fork)
  -service.debugserveraddr value
    	Address for debug server to listen on (do not specify a public address) (default: disabled) (default "")
  -service.fork value
    	Fork? (implies -daemon)
  -service.gid value
    	GID to run as (default: don't drop privileges) (default "")
  -service.pidfile value
    	Write PID to file with given filename and hold a write lock (default "")
  -service.uid value
    	UID to run as (default: don't drop privileges) (default "")
"nslookup --xlog.severity=DEBUG ..." doesn't run either.

hla
Posts: 46
Joined: Mon Nov 10, 2014 12:01 am
os: linux
Contact:

Re: Installing NCDNS

Post by hla »

Make sure your ncdns repository is up to date.

Code: Select all

ncdns.t$ ./bin/ncdns --xlog.severity=DEBUG
20151128011327 [INFO] ncdns.server: Listeners started

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Installing NCDNS

Post by biolizard89 »

barkingdoggy wrote:Rather than mucking up the NCDNS Discussion and Direction thread, I figured I'd continue this as a new thread... Reiterating,
Downloaded ncdns.t-master from github. But the Make command on my Linux Mint machine fails. Here's the terminal session:

john@john-ThinkPad-X300 ~/Downloads/ncdns.t-master $ make
go get github.com/hlandau/ncdns
# gopkg.in/hlandau/service.v2/daemon/caps
src/gopkg.in/hlandau/service.v2/daemon/caps/caps_linux.go:7:28: fatal error: sys/capability.h: No such file or directory
#include <sys/capability.h>
^
compilation terminated.
make: *** [.gotten] Error 2
Suggestions?
Biolizard suggested,
Not certain, but try "apt-get install libcap-dev libcap2" first.
After that the make command completes without error (thanks, biolizard!).
Ah, excellent, glad that worked. @Hugo, can this step be added to the documentation? I'm guessing it's also the case for other Ubuntu-derived distros (not just Mint), but I haven't tested as such.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

barkingdoggy
Posts: 36
Joined: Thu Jul 23, 2015 7:58 pm
os: windows

Re: Installing NCDNS

Post by barkingdoggy »

I downloaded the zip from https://github.com/hlandau/ncdns.t a couple of days ago. It says the last commit was 23 days ago, so I assume that means I have the latest repository, or is there another stash?

hla
Posts: 46
Joined: Mon Nov 10, 2014 12:01 am
os: linux
Contact:

Re: Installing NCDNS

Post by hla »

biolizard89 wrote:
barkingdoggy wrote:Rather than mucking up the NCDNS Discussion and Direction thread, I figured I'd continue this as a new thread... Reiterating,
Downloaded ncdns.t-master from github. But the Make command on my Linux Mint machine fails. Here's the terminal session:

john@john-ThinkPad-X300 ~/Downloads/ncdns.t-master $ make
go get github.com/hlandau/ncdns
# gopkg.in/hlandau/service.v2/daemon/caps
src/gopkg.in/hlandau/service.v2/daemon/caps/caps_linux.go:7:28: fatal error: sys/capability.h: No such file or directory
#include <sys/capability.h>
^
compilation terminated.
make: *** [.gotten] Error 2
Suggestions?
Biolizard suggested,
Not certain, but try "apt-get install libcap-dev libcap2" first.
After that the make command completes without error (thanks, biolizard!).
Ah, excellent, glad that worked. @Hugo, can this step be added to the documentation? I'm guessing it's also the case for other Ubuntu-derived distros (not just Mint), but I haven't tested as such.
Already done.
I downloaded the zip from https://github.com/hlandau/ncdns.t a couple of days ago. It says the last commit was 23 days ago, so I assume that means I have the latest repository, or is there another stash?
That's just the build environment; the source is fetched separately. Try deleting it and redownloading.

barkingdoggy
Posts: 36
Joined: Thu Jul 23, 2015 7:58 pm
os: windows

Re: Installing NCDNS

Post by barkingdoggy »

Ok. Reinstalling/redownloading source worked as far as getting

Code: Select all

$ ./bin/ncdns --xlog.severity=DEBUG
20151129082045 [INFO] ncdns.server: Listeners started
nslookup fails:

Code: Select all

$ nslookup -port=1099 nx.bit 127.0.0.1 -debug
Server:		127.0.0.1
Address:	127.0.0.1#1099

------------
    QUESTIONS:
	nx.bit, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
** server can't find nx.bit: SERVFAIL
Nothing recorded in syslog. Where else should I be looking for clues as to what the problem is?

Post Reply