Zonestatus question

Hi!

I had to restart nsd4. The local available zone file was rather old.

nsd[11004]: /var/lib/nsd/nsd.db: not cleanly closed 0
nsd[11004]: can not use /var/lib/nsd/nsd.db, will create anew

So, nsd started to create a new db file.

Meanwhile I checked the zonestatus:

        state: refreshing
        served-serial: "2014063012 since 2014-07-10T14:52:55"
        commit-serial: "2014063012 since 2014-07-10T14:52:55"
        notified-serial: "2014071016 since 2014-07-10T14:52:56"
        transfer: "TCP connected to 83.136.34.4"

After finishing the transfer, the status was:

        state: ok
        served-serial: "2014063012 since 2014-07-10T14:52:55"
        commit-serial: "2014071016 since 2014-07-10T14:53:13"

But if I query the SOA nsd responds with serial: 2014063012

Why does nsd still answers with the old zone?

Then I called "nsd-control write" (which gives no errors) but nsd does
not write a new zone file. And the status is:

        state: ok
        served-serial: "2014063012 since 2014-07-10T14:52:55"
        commit-serial: "2014071016 since 2014-07-10T14:53:13"

Any hints what is wrong here?

Thanks
Klaus

Hi Klaus,

Hi!

I had to restart nsd4. The local available zone file was rather
old.

nsd[11004]: /var/lib/nsd/nsd.db: not cleanly closed 0 nsd[11004]:
can not use /var/lib/nsd/nsd.db, will create anew

So, nsd started to create a new db file.

Meanwhile I checked the zonestatus:

state: refreshing served-serial: "2014063012 since
2014-07-10T14:52:55" commit-serial: "2014063012 since
2014-07-10T14:52:55" notified-serial: "2014071016 since
2014-07-10T14:52:56" transfer: "TCP connected to 83.136.34.4"

After finishing the transfer, the status was:

state: ok served-serial: "2014063012 since 2014-07-10T14:52:55"
commit-serial: "2014071016 since 2014-07-10T14:53:13"

But if I query the SOA nsd responds with serial: 2014063012

Why does nsd still answers with the old zone?

The new zone is in the nsd.db, the old zone is being served. Somehow
NSD does not mange to load the zone into service. What does syslog say?

Best regards, Wouter

Hi Wouter!

Hi Klaus,

Hi!

I had to restart nsd4. The local available zone file was rather
old.

nsd[11004]: /var/lib/nsd/nsd.db: not cleanly closed 0 nsd[11004]:
can not use /var/lib/nsd/nsd.db, will create anew

So, nsd started to create a new db file.

Meanwhile I checked the zonestatus:

state: refreshing served-serial: "2014063012 since
2014-07-10T14:52:55" commit-serial: "2014063012 since
2014-07-10T14:52:55" notified-serial: "2014071016 since
2014-07-10T14:52:56" transfer: "TCP connected to 83.136.34.4"

After finishing the transfer, the status was:

state: ok served-serial: "2014063012 since 2014-07-10T14:52:55"
commit-serial: "2014071016 since 2014-07-10T14:53:13"

But if I query the SOA nsd responds with serial: 2014063012

Why does nsd still answers with the old zone?

The new zone is in the nsd.db, the old zone is being served. Somehow
NSD does not mange to load the zone into service. What does syslog say?

Syslog says nothing - see logfile attached.

# dpkg -l|grep nsd
ii nsd 4.0.3-1

# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda2 10190136 3858752 5805700 40% /
none 4 0 4 0% /sys/fs/cgroup
udev 2552512 4 2552508 1% /dev
tmpfs 512368 200 512168 1% /run
none 5120 0 5120 0% /run/lock
none 2561832 0 2561832 0% /run/shm
none 102400 0 102400 0% /run/user

# ll /tmp/*
-rw------- 1 nsd nsd 576 Jul 10 14:53 /tmp/nsd.11002.task.0
-rw------- 1 nsd nsd 4608 Jul 11 07:23 /tmp/nsd.11002.task.1

/tmp/nsd-xfr-11002:
total 568596
drwx------ 2 nsd nsd 4096 Jul 11 07:23 ./
drwxrwxrwt 3 root root 4096 Jul 11 07:17 ../
-rw-r--r-- 1 nsd nsd 521691868 Jul 10 14:53 xfr.0
-rw-r--r-- 1 nsd nsd 3639102 Jul 10 15:28 xfr.1
-rw-r--r-- 1 nsd nsd 3586378 Jul 11 00:27 xfr.10
-rw-r--r-- 1 nsd nsd 3517935 Jul 11 01:26 xfr.11
-rw-r--r-- 1 nsd nsd 3481218 Jul 11 02:27 xfr.12
-rw-r--r-- 1 nsd nsd 3564360 Jul 11 03:26 xfr.13
-rw-r--r-- 1 nsd nsd 3536574 Jul 11 04:26 xfr.14
-rw-r--r-- 1 nsd nsd 3570386 Jul 11 05:24 xfr.15
-rw-r--r-- 1 nsd nsd 3530474 Jul 11 06:23 xfr.16
-rw-r--r-- 1 nsd nsd 3587657 Jul 11 07:23 xfr.17
-rw-r--r-- 1 nsd nsd 3573587 Jul 10 16:23 xfr.2
-rw-r--r-- 1 nsd nsd 3571828 Jul 10 17:26 xfr.3
-rw-r--r-- 1 nsd nsd 3565070 Jul 10 18:23 xfr.4
-rw-r--r-- 1 nsd nsd 3533943 Jul 10 19:24 xfr.5
-rw-r--r-- 1 nsd nsd 3586171 Jul 10 20:26 xfr.6
-rw-r--r-- 1 nsd nsd 3563128 Jul 10 21:24 xfr.7
-rw-r--r-- 1 nsd nsd 3561978 Jul 10 22:25 xfr.8
-rw-r--r-- 1 nsd nsd 3538810 Jul 10 23:23 xfr.9

# ll /var/lib/nsd/
total 2400636
drwxr-xr-x 2 nsd nsd 4096 Jun 30 11:25 ./
drwxr-xr-x 35 root root 4096 Jun 26 15:59 ../
-rw-r--r-- 1 nsd nsd 663055987 Jun 30 11:25 test.zone
-rw------- 1 nsd nsd 1795178496 Jul 11 07:30 nsd.db

It seems the DB file is too small. Last week, it was much bigger:

-rw-r--r-- 1 nsd nsd 664205967 Jun 27 09:18 test.zone
-rw------- 1 nsd nsd 6343018624 Jun 27 09:51 nsd.db
-rw-r--r-- 1 nsd nsd 1318 Jun 27 09:13 xfrd.state

# free
             total used free shared buffers cached
Mem: 5123664 5092068 31596 24992 708 215100
-/+ buffers/cache: 4876260 247404
Swap: 6291452 2318392 3973060

Physical memory is full, but swap is available. The RAM+SWAP was
selected according to the memory test tool:

total
  3.407.329.760 data
    109.018.104 unused space (due to alignment)
          3.112 options
            227 options unused space (due to alignment)
      6.427.204 name table (depends on servercount)
     26.000.000 RRL table (depends on servercount)
  3.627.706.308 data in nsd.db
  2.036.711.804 overhead in nsd.db

summary
  3.548.778.407 ram usage (excl space for buffers)
  5.664.418.112 disk usage (excl 12% space claimed for growth)

Final advice estimate:
(The partial mmap causes reload&AXFR to take longer(disk access))
  9.213.196.519 data and big mmap
  4.492.848.092 data and partial mmap

Thanks
Klaus

(attachments)

nsd4.log (26.3 KB)