Revertron / Alfis

Alternative Free Identity System
https://alfis.name
GNU Affero General Public License v3.0
284 stars 28 forks source link

DNS server doesn't bind to all localhost interfaces. #332

Closed zander closed 1 year ago

zander commented 1 year ago

Using the latest release (0.8.3) I run alfis under systemd.

Calling time drill flowee.ygg @localhost AAAA I notice I get a correct response very quickly, but once every 5 to 10 calls it just hangs for 15 seconds.

real    0m15,021s
user    0m0,003s
sys     0m0,003s

Even after nobody asked the server for half an hour, a call took 15 seconds. So there doesn't seem to be any shortage of workers (unless they don't die at all)

Revertron commented 1 year ago

Can you repeat that test now, when your blockchain is fully synced?

zander commented 1 year ago

My blockchain has been fully synched for all those tests.

I even mined my own domain, which is what the test tried to query. The result was correct 100% of the time, the hanging is just a problem.

Revertron commented 1 year ago

I can't reproduce it here. On Windows and Linux :(

zander commented 1 year ago

I restarted the server with debug level output, which revealed nothing useful.

My observations;

Attached is are 2 strace logs, maybe that helps.

strace-normal.log strace-slow.log

Revertron commented 1 year ago

Both logs show Query time: 0 msec, maybe your terminal is taking 15 seconds to do something?

zander commented 1 year ago

Thats one explanation.

The socket connection and timeouts are a bit weird, though. It seems to connect 3 times to ::1 before trying to connect to 127.0.0.1

Looks like the problem is that your DNS server only binds to one localhost, not to the ipv6 localhost.

Revertron commented 1 year ago

your DNS server

Ha-ha :)

You have listen directive in /etc/alfis.conf that says where to bind.

zander commented 1 year ago

To add the info you explained in private chat;

Alfis is currently unable to bind to more than one interface. So a dual-stack system like my own where the 'localhost' has two interfaces will mean that the user needs to address the server by IP address instead of name (localhost).