dns bind - lwresd doen't read local db

Discussion in 'Server Operation' started by nati, May 4, 2010.

  1. nati

    nati New Member

    Hi,

    I'm trying to use dns bind 9.7 as a local dns server which gets requests from my process and looks up values in a local database, built from lwresd.conf and zone files.
    I compiled the lwresd library with my source code and use the api lwres_getaddrsbyname to send a domain lookup request from my proccess to the lwresd daemon. When i start lwresd to work with resolv.conf, it receives my request and resolves the address by sending a dns request to external dns server which was defined in resolv.conf. then, it sends the address to my process and everything works fine. but when i'm activating lwresd with my lwresd.conf by using the command "/sbin/lwresd -c lwresd.conf -g -d 100 &", i can see that the daemon reads lwres.cof and the zone files, it listens to 127.0.0.1/921 as i defined in lwresd.cond, i also see that it gets the message i send by calling lwres_getaddrsbyname, but for some reason it sends me back the error LWRES_R_UNEXPECTEDEND and prints the following:


    root@crescendo:~# 04-May-2010 20:50:47.880 socket 0xb7cec008: dispatch_recv: event 0xb7cd93c8 -> task 0xb7cd4428
    04-May-2010 20:50:47.880 socket 0xb7cec008: internal_recv: task 0xb7cd4428 got event 0xb7cec068
    04-May-2010 20:50:47.880 socket 0xb7cec008 127.0.0.1#32768: packet received correctly
    04-May-2010 20:50:47.880 socket 0xb7cec008: processing cmsg 0xb7cc10b0
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: UDP request
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: error
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: send
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: sendto
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: senddone
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: next
    04-May-2010 20:50:47.880 client 127.0.0.1#32768: endrequest
    04-May-2010 20:50:47.881 client @0xb7ced008: udprecv
    04-May-2010 20:50:47.881 socket 0xb7cec008: socket_recv: event 0xb7cd93c8 -> task 0xb7cd4428

    I have been trying to figure it out for days, have tried everything but got nothing so far.

    does anyone know what could be the problem? maybe a lead?

    Thanks,
    Nati
     

Share This Page