dnstest
dnstest copied to clipboard
init terminating in do_boot
My knowledge of Erlang is very limited. I run an authoritative DNS server on port 8053, per dnstest.config
, and:
% ./run.sh
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]
{"init terminating in do_boot",{undef,[{dnstest,start,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{dnstest,start,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
Crash dump is being written to: erl_crash.dump...done
Same thing with a more recent:
% ./run.sh
Erlang/OTP 24 [erts-12.3.2.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
{"init terminating in do_boot",{undef,[{dnstest,start,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{dnstest,start,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
Crash dump is being written to: erl_crash.dump...done
IMHO, the README is a bit short...
The README is indeed a bit lacking, mostly because this is something that we've used internally for testing erldns, but we haven't had much interest in others to run it, either against erldns or against other systems. I'll see if I can get a team member to give you a hand to figure out how to get it running.
@bortzmeyer - I cannot reproduce locally against the latest dnstest repo with erldns latest running as authoritative locally with default config for both, the test harness runs fine:
Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit] [dtrace]
Eshell V12.0.3 (abort with ^G)
1> 10:07:22.133 [info] dnstest_app:start(normal, [])
1> 10:07:22.134 [info] Supervisor is starting procs
1> 10:07:22.136 [info] Starting dnstest_harness process
1> 10:07:22.142 [info] Running all tests (#1)
1> 10:07:22.157 [info] Running test '8_bit_txt'
[...]
Would you be able to provide the erl_crash.dump to have a look?
See the dump in https://drop.infini.fr/r/ypFJQJswnS#RMtqTAN+cvUpTBBFyavvDoOR4lLs1ixqUcIUBDBlijE=
See the dump in https://drop.infini.fr/r/ypFJQJswnS#RMtqTAN+cvUpTBBFyavvDoOR4lLs1ixqUcIUBDBlijE=
@bortzmeyer - sorry, getting "Error: the file existed but was deleted.". May you please re-send?
@bortzmeyer - sorry, getting "Error: the file existed but was deleted.". May you please re-send?
@m0rcq https://drop.infini.fr/r/Dv3jeZDP0Z#W9md0nmuoIrGp4jUqNa0P3A+F1LPbtlV1aGblAbdbLQ=
@bortzmeyer - apologies for the delay, I had a chance to look at the dump and it only indicates that it cannot find the dnstest module and start() function in it, hence unable to load and execute the code.
Not clear what it is the underlying issue as I cannot reproduce locally, but could you please do the following:
cd dnstest
rm -rf _build
rm rebar.lock
make
sometimes _build/* artefacts get stale and it may cause issues.
Also, try:
./rebar3 shell
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling dnstest
Erlang/OTP 24 [erts-12.3.2.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit] [dtrace]
Eshell V12.3.2.5 (abort with ^G)
1> dnstest:start().
10:55:30.997 [info] dnstest_app:start(normal, [])
10:55:30.999 [info] Supervisor is starting procs
10:55:31.002 [info] Starting dnstest_harness process
10:55:31.005 [info] Running targeted tests: ["./rebar3","shell"] (#1)
ok
[...]
i.e. try to load rebar shell and manually execute with 'dnsdist:start()'
Please let me know if this solved the conundrum.
Cheers, Atanas
@m0rcq Thanks, after that, it is better. dnstest runs. It is not clear to me how to use it. I run an authoritative name server on port 8053, it receives just one badly formed query (which makes sense, dnstest tries to see how the server will react to wrong packets) but that's all and dnstest stops with a very long message. Here is the beginning:
% ./run.sh
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Eshell V12.2.1 (abort with ^G)
1> 17:06:19.233 [info] dnstest_app:start(normal, [])
17:06:19.235 [info] Supervisor is starting procs
17:06:19.236 [info] Starting dnstest_harness process
17:06:19.239 [info] Running all tests (#1)
17:06:19.258 [info] Running test '8_bit_txt'
17:06:25.260 [info] terminate({{badmatch,{error,timeout,{server,{{127,0,0,1},8053}}}},[{dnstest_harness,run_test,2,[{file,"/home/stephane/tmp/dnstest/src/dnstest_harness.erl"},{line,98}]},{dnstest_harness,run,3,[{file,"/home/stephane/tmp/dnstest/src/dnstest_harness.erl"},{line,79}]},{dnstest_harness,handle_cast,2,[{file,"/home/stephane/tmp/dnstest/src/dnstest_harness.erl"},{line,42}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]})
=ERROR REPORT==== 26-Sep-2022::17:06:25.262680 ===
** Generic server dnstest_harness terminating
** Last message in was {'$gen_cast',
{run,
[{'8_bit_txt',
{{question,{"aland.test.com",16}},
{header,
{dns_message,45217,true,0,true,false,false,
false,false,false,0,0,0,0,0,[],[],[],[]}},
{records,
{{answers,
[{<<"aland.test.com">>,1,16,3600,
{dns_rrdata_txt,
[<<"ÅLAND ISLANDS"/utf8>>]}}]},
{authority,[]},
{additional,[]}}}}},
{any_nxdomain,
{{question,{"nxdomain.example.com",255}},
{header,
{dns_message,30863,true,0,true,false,false,
false,false,false,3,0,0,0,0,[],[],[],[]}},
{records,
{{answers,[]},
{authority,
[{<<"example.com">>,1,6,86400,
{dns_rrdata_soa,<<"ns1.example.com">>,
<<"ahu.example.com">>,2000081501,28800,7200,
604800,86400}}]},
{additional,[]}}}}},
{any_query,
{{question,{"example.com",255}},
{header,
{dns_message,59255,true,0,true,false,false,
false,false,false,0,0,0,0,0,[],[],[],[]}},
...
```
@bortzmeyer - the test harness is bailing out with {error,timeout,{server,{{127,0,0,1},8053}}} when querying the local authoritative at 127.0.0.1:8053 from what I can see.
Are you running erldns instance locally or it is another nameserver? Also, is dig failing on queries against the same auth instance?
dig has no problem to get an answer. (For a proper query. Of course, unparseable queries are ignored.)
% dig @127.0.0.1 -p 8053 test NS
; <<>> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> @127.0.0.1 -p 8053 test NS
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32507
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1200
; COOKIE: bdd745a34c45fab3d7f8612deb742528 (good)
;; QUESTION SECTION:
;test. IN NS
;; ANSWER SECTION:
test. 30 IN NS ns1.test.
;; Query time: 96 msec
;; SERVER: 127.0.0.1#8053(127.0.0.1) (UDP)
;; WHEN: Mon Sep 26 18:16:46 CEST 2022
;; MSG SIZE rcvd: 71