pfSense Gold Subscription

Author Topic: TinyDNS randomly stops working  (Read 9097 times)

0 Members and 1 Guest are viewing this topic.

Offline dsjp01

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
TinyDNS randomly stops working
« on: July 17, 2009, 09:59:44 am »
I have installed tinydns on pfsense v 1.2.2, it stops working randomly though out the day. The only way to get it working again is to reboot pfsense. If anyone has any ideas please let me know.

Thanks,
Dan

Offline Sostris

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: TinyDNS randomly stops working
« Reply #1 on: August 20, 2009, 11:41:07 am »
I have a little more detail on this problem. The problem doesn't seem to be tinydns itself, but rather dnscache.

This is on nanobsd 1.2.3RC2, the build from August 18. In order to get dnscache to work at all, I had to manually create the file /var/etc/resolver.conf.dnscache. Otherwise I would get PHP error messages when trying to save the configuration, saying that file doesn't exist. It contains the IP addresses of the two public nameservers I use, and also the loopback address, which is where tinydns is listening.

Tinydns is the SOA for my internal domain, lan. There are two A records, one for the router itself, router.lan at 192.168.1.1, and one for another host, server.lan at 192.168.1.3. There are PTR records for these hosts. The SOA is 127.0.0.1, but I've also tried 192.168.1.1.

Tinydns is listening on 127.0.0.1. The "Enable DNS Forwarder" checkbox is selected. The clients have the router's address in their list of DNS servers.

After rebooting the router, this works, at first. I get the right answers to 'host *.lan' and 'host 192.168.1.*' on the clients. But a variable amount of time later, it stops working. The names and addresses are no longer resolvable. But on the router itself, I still get the right answers; for example,

router:~#  host server.lan localhost
Using domain server:
Name: localhost
Address: 127.0.0.1#53
Aliases:

server.lan has address 192.168.1.3

So tinydns is still working.

While this is going on, multiple redundant processes are being spawned. I end up with something like this:

router:~#  ps -ax | grep dns
 3345  ??  I      0:00.83 supervise tinydns
23443  ??  I      0:00.79 supervise tinydns
23445  ??  I      0:00.01 supervise dnscache
24055  ??  I      0:00.13 /usr/local/bin/tinydns
24075  ??  I      0:00.32 /usr/local/bin/dnscache
24137  ??  I      0:00.77 supervise tinydns
24139  ??  I      0:00.52 supervise dnscache
33670  ??  I      0:00.03 /usr/local/bin/dnscache
36884  ??  I      0:00.02 /usr/local/bin/tinydns
37108  ??  I      0:00.02 /usr/local/bin/tinydns
51258  ??  I      0:00.75 supervise tinydns
51263  ??  I      0:00.52 supervise dnscache
60120  ??  I      0:00.03 /usr/local/bin/dnscache
63721  ??  I      0:00.02 /usr/local/bin/tinydns
49849  p1  S+     0:00.01 grep dns

Rebooting always fixes it, but only for a short time.

Offline akula169

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
  • yay for pfSense!
    • View Profile
Re: TinyDNS randomly stops working
« Reply #2 on: October 22, 2009, 03:49:29 pm »
+1 on this problem.

Nobody else?

Offline akula169

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
  • yay for pfSense!
    • View Profile
Re: TinyDNS randomly stops working
« Reply #3 on: October 23, 2009, 05:14:15 pm »
I got it working, a bit better... it's been running for over 20 minutes now!

(UPDATE (10/25/09) - I have had no issues for two days now...)

I uninstalled the dns-server package and combed over the system for anything "dns" (find /  | grep dns)

I did notice that the dnscache executable has permissions set that was not allowing the removal script to delete the file.  I removed it by hand.  (/usr/local/bin/dnscache).  I'm most certain this was an older version and was causing things to be funky.

I also removed the downloaded package directory from /var/db/pkg/djbdns-1.05_12  (your version may differ)

Your results may vary.  Good luck!
« Last Edit: October 25, 2009, 04:01:21 pm by akula169 »

Offline serangku

  • Sr. Member
  • ****
  • Posts: 474
  • Karma: +0/-0
    • View Profile
Re: TinyDNS randomly stops working
« Reply #4 on: October 24, 2009, 07:50:24 pm »
same issue here to ...

tinydns randomly stop ...
no matter i have reinstall, stil randomly stop working
@akula169 ...
is your tinydns working properly again ?
if so, can you give step by step how to fix that ...

last efort maybe installed pf from scratch again ... :(

Offline akula169

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
  • yay for pfSense!
    • View Profile
Re: TinyDNS randomly stops working
« Reply #5 on: October 25, 2009, 04:00:30 pm »
My problem was that dnscache was not running properly.  I had no issues with tinydns failing...

I would uninstall the package and look around the filesystem for evidence of any remaining files ( find / | grep dns )

When I found any related to tinydns or dnscache, I deleted them before reinstalling the dns-server package. 

Now, this is what I did - and I will put a disclaimer to do this at your own risk. 

Make sure you have a full settings backup in case you delete something that you shouldn't have ( and you have to reinstall pfSense entirely).

Offline infratek

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: TinyDNS randomly stops working
« Reply #6 on: February 24, 2010, 09:58:19 am »
Just my 2c, I also had issues with tinydns stopping randomly.
I upgraded to last version, 1.0.6.4, because it was a well-known bug that has been solved.
Since then, no issues anymore.