[Pdns-users] [recursor] configure could be more user-friendly

2010-05-26 Thread Stephane Bortzmeyer
[Sent here because I cannot find a way to create a new ticket at
http://wiki.powerdns.com/trac/]

./configure is not very helpful when it cannot find a library. For
instance, if Boost is not found (because it is in /usr/pkg):

% ./configure
Testing dependencies and compiler.
Using gmake to build
g++  -Wall -O3  -pthread -MM -MG *.cc *.c *.hh  dep
g++  -Wall -O3  -pthread  pdns_hw.cc -o pdns_hw 
pdns_hw.cc:1:34: error: boost/lexical_cast.hpp: No such file or directory
pdns_hw.cc:2:43: error: boost/multi_index_container.hpp: No such file or 
directory
pdns_hw.cc:3:47: error: boost/multi_index/ordered_index.hpp: No such file or 
directory
pdns_hw.cc:4:44: error: boost/tuple/tuple_comparison.hpp: No such file or 
directory
pdns_hw.cc:5:48: error: boost/multi_index/key_extractors.hpp: No such file or 
directory
pdns_hw.cc:6:49: error: boost/multi_index/sequenced_index.hpp: No such file or 
directory
pdns_hw.cc: In function 'int main()':
pdns_hw.cc:17: error: 'boost' has not been declared
pdns_hw.cc:17: error: expected primary-expression before '' token
pdns_hw.cc:17: error: invalid operands of types 'const char [1]' and 'const 
char [2]' to binary 'operator'
gmake: [basic_checks] Error 1 (ignored)

Instead of something like, more common among free Unix programs:

Cannot find the Boost library http://boost.org/. If it is installed, use 
--with-boost

I cannot even use --help to find documentation, it yields the same
error message.



PowerDNS recursor, version 3.2
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] [recursor] Segmentation fault at startup

2010-05-26 Thread Stephane Bortzmeyer
%  pdns_recursor 
May 26 09:12:12 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
2010, 08:46:38, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting up
May 26 09:12:12 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are welcome to redistribute it according to the terms of the 
GPL version 2.
May 26 09:12:12 Operating in 32 bits mode
May 26 09:12:12 Reading random entropy from '/dev/urandom'
zsh: segmentation fault  pdns_recursor

Same thing without a /etc/powerdns/recursor.conf. Same thing is run as
root.

% g++ --version
g++ (GCC) 4.1.3 20080704 prerelease (NetBSD nb2 20081120)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% uname -a
NetBSD golgoth 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Oct  1 15:46:16 CEST 2009  
steph...@golgoth:/usr/obj/sys/arch/i386/compile/GENERIC i386

Boost is 1.38.0nb1

With the debugger (I have zero experience in debugging C++ programs):

(gdb) run
Starting program: /usr/sbin/pdns_recursor 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
May 26 09:13:01 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
2010, 08:46:38, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting up
May 26 09:13:01 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are welcome to redistribute it according to the terms of the 
GPL version 2.
May 26 09:13:01 Operating in 32 bits mode
May 26 09:13:01 Reading random entropy from '/dev/urandom'

Program received signal SIGSEGV, Segmentation fault.
0x08095a97 in std::string::_S_constructchar const* ()
(gdb) bt
#0  0x08095a97 in std::string::_S_constructchar const* ()
#1  0x0809e390 in std::string::_S_constructchar const* ()
#2  0x080a5215 in std::string::_S_constructchar const* ()
#3  0x0804ccd4 in ?? ()
#4  0x0001 in ?? ()
#5  0xbfbfea78 in ?? ()
#6  0xbfbfea80 in ?? ()
#7  0x0804cc46 in ?? ()
#8  0xbfbfeb88 in ?? ()
#9  0xbfbfea80 in ?? ()
#10 0xbbbf2000 in ?? ()
#11 0xbfb0 in ?? ()
#12 0x in ?? ()

Very little difference when compiling with -O0 -g:

(gdb) run
Starting program: /usr/sbin/pdns_recursor 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
May 26 09:29:04 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
2010, 09:23:52, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting up
May 26 09:29:04 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are welcome to redistribute it according to the terms of the 
GPL version 2.
May 26 09:29:04 Operating in 32 bits mode
May 26 09:29:04 Reading random entropy from '/dev/urandom'

Program received signal SIGSEGV, Segmentation fault.
0x080a1fac in std::basic_stringchar, std::char_traitschar, 
std::allocatorchar ::basic_stringchar* ()
(gdb) bt
#0  0x080a1fac in std::basic_stringchar, std::char_traitschar, 
std::allocatorchar ::basic_stringchar* ()
#1  0x080a84b0 in std::basic_stringchar, std::char_traitschar, 
std::allocatorchar ::basic_stringchar* ()
#2  0x080b2e04 in std::basic_stringchar, std::char_traitschar, 
std::allocatorchar ::basic_stringchar* ()
#3  0x0804e044 in ?? ()
#4  0x0001 in ?? ()
#5  0xbfbfea30 in ?? ()
#6  0xbfbfea38 in ?? ()
#7  0x0804dfb6 in ?? ()
#8  0xbfbfeb40 in ?? ()
#9  0xbfbfea38 in ?? ()
#10 0xbbbf2000 in ?? ()
#11 0xbfb0 in ?? ()
#12 0x in ?? ()
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] Segmentation fault at startup

2010-05-26 Thread bert hubert
On Wed, May 26, 2010 at 09:29:57AM +0200, Stephane Bortzmeyer wrote:
 %  pdns_recursor 
 % uname -a
 NetBSD golgoth 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Oct  1 15:46:16 CEST 2009 
  steph...@golgoth:/usr/obj/sys/arch/i386/compile/GENERIC i386

Hi Stephane,

Thanks for checking out the PowerDNS Recursor! 

I'm afraid you have discovered that not a lot of testing is done on NetBSD,
although I personally like this BSD the best.

Sadly we do not currently have access to a NetBSD installation to test
against.

 Very little difference when compiling with -O0 -g:
 
 (gdb) run
 Starting program: /usr/sbin/pdns_recursor 
 (no debugging symbols found)

In fact, this is so little difference that I wonder if it really was
compiled with -g, can you double check? OPTFLAGS=-g is probably the best way
to go.

 May 26 09:29:04 Operating in 32 bits mode
 May 26 09:29:04 Reading random entropy from '/dev/urandom'

Can you strace during startup? Or the local equivalent? 

Thanks!

Bert
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] Segmentation fault at startup

2010-05-26 Thread Stephane Bortzmeyer
On Wed, May 26, 2010 at 10:08:41AM +0200,
 bert hubert bert.hub...@netherlabs.nl wrote 
 a message of 33 lines which said:

 In fact, this is so little difference that I wonder if it really was
 compiled with -g, can you double check?

It was properly compiled but the Makefile contains a 'strip
$(DESTDIR)/$(SBINDIR)/pdns_recursor' :-( Debugging the non-installed
executable is better:

(gdb) run
Starting program: 
/home/stephane/Programmation/DNS/pdns-recursor-3.2/pdns_recursor 
May 26 10:13:45 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
2010, 09:23:52, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting up
May 26 10:13:45 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are welcome to redistribute it according to the terms of the 
GPL version 2.
May 26 10:13:45 Operating in 32 bits mode
May 26 10:13:45 Reading random entropy from '/dev/urandom'

Program received signal SIGSEGV, Segmentation fault.
parseACLs () at pdns_recursor.cc:1508
1508  NetmaskGroup* oldAllowFrom = t_allowFrom, *allowFrom=new NetmaskGroup;
(gdb) bt
#0  parseACLs () at pdns_recursor.cc:1508
#1  0x080a84b0 in serviceMain (argc=1, argv=0xbfbfe9dc) at pdns_recursor.cc:1595
#2  0x080b2e04 in main (argc=1, argv=0xbfbfe9dc) at pdns_recursor.cc:1987
(gdb) 

OK, the ACL parsing is not robust enough. What is strange is that,
even without a configuration file (and therefore without ACL), it
crashes at the same place):

(gdb) run
Starting program: 
/home/stephane/Programmation/DNS/pdns-recursor-3.2/pdns_recursor 
May 26 10:14:30 Unable to parse configuration file '/etc/powerdns/recursor.conf'
May 26 10:14:30 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
2010, 09:23:52, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting up
May 26 10:14:30 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are welcome to redistribute it according to the terms of the 
GPL version 2.
May 26 10:14:30 Operating in 32 bits mode
May 26 10:14:30 Reading random entropy from '/dev/urandom'

Program received signal SIGSEGV, Segmentation fault.
parseACLs () at pdns_recursor.cc:1508
1508  NetmaskGroup* oldAllowFrom = t_allowFrom, *allowFrom=new NetmaskGroup;
(gdb) bt
#0  parseACLs () at pdns_recursor.cc:1508
#1  0x080a84b0 in serviceMain (argc=1, argv=0xbfbfe9dc)
at pdns_recursor.cc:1595
#2  0x080b2e04 in main (argc=1, argv=0xbfbfe9dc) at pdns_recursor.cc:1987
(gdb) 



___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] Segmentation fault at startup

2010-05-26 Thread bert hubert
On Wed, May 26, 2010 at 10:18:43AM +0200, Stephane Bortzmeyer wrote:
 It was properly compiled but the Makefile contains a 'strip
 $(DESTDIR)/$(SBINDIR)/pdns_recursor' :-( Debugging the non-installed

For installed binaries, this is common.

 OK, the ACL parsing is not robust enough. What is strange is that,
 even without a configuration file (and therefore without ACL), it
 crashes at the same place):

This probably indicates that your version of NetBSD, compiler  linker have
problems with Thread Local Storage, which is used by variables that start
with 't_' in PowerDNS.

 Program received signal SIGSEGV, Segmentation fault.
 parseACLs () at pdns_recursor.cc:1508
 1508  NetmaskGroup* oldAllowFrom = t_allowFrom, *allowFrom=new 
 NetmaskGroup;

Could you split line 1508 as follows:

NetmaskGroup* oldAllowFrom = t_allowFrom;
NetmaskGroup* allowFrom = new NetmaskGroup;

? If it still crashes on 1508 (and not on 1509), this is definitely a __thread 
problem.

Bert

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] Segmentation fault at startup

2010-05-26 Thread Stephane Bortzmeyer
[BTW, it would be better to do so on a ticketing system but I cannot
find a way to create a new ticket in the PowerDNS Trac.]

On Wed, May 26, 2010 at 10:55:47AM +0200,
 bert hubert bert.hub...@netherlabs.nl wrote 
 a message of 26 lines which said:

 Could you split line 1508 as follows:
 
 NetmaskGroup* oldAllowFrom = t_allowFrom;
 NetmaskGroup* allowFrom = new NetmaskGroup;

(gdb) run
Starting program: 
/home/stephane/Programmation/DNS/pdns-recursor-3.2/pdns_recursor 
May 26 10:59:56 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
2010, 10:58:27, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting up
May 26 10:59:56 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are welcome to redistribute it according to the terms of the 
GPL version 2.
May 26 10:59:56 Operating in 32 bits mode
May 26 10:59:56 Reading random entropy from '/dev/urandom'

Program received signal SIGSEGV, Segmentation fault.
parseACLs () at pdns_recursor.cc:1508
1508  NetmaskGroup* oldAllowFrom = t_allowFrom;
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] Segmentation fault at startup

2010-05-26 Thread bert hubert
On Wed, May 26, 2010 at 11:01:38AM +0200, Stephane Bortzmeyer wrote:
 [BTW, it would be better to do so on a ticketing system but I cannot
 find a way to create a new ticket in the PowerDNS Trac.]

There is some anti-spam trickery:
TO FILE BUGS, OR CHANGE THE WIKI, CLICK 'LOGIN' ABOVE, USERNAME anon
PASSWORD No Spam without quotes or the space in between '

So the password is NoSpam 

  Could you split line 1508 as follows:
  
  NetmaskGroup* oldAllowFrom = t_allowFrom;
  NetmaskGroup* allowFrom = new NetmaskGroup;
 
 (gdb) run
 Starting program: 
 /home/stephane/Programmation/DNS/pdns-recursor-3.2/pdns_recursor 
 May 26 10:59:56 PowerDNS recursor 3.2 (C) 2001-2010 PowerDNS.COM BV (May 26 
 2010, 10:58:27, gcc 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) starting 
 up
 May 26 10:59:56 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free 
 software, and you are welcome to redistribute it according to the terms of 
 the GPL version 2.
 May 26 10:59:56 Operating in 32 bits mode
 May 26 10:59:56 Reading random entropy from '/dev/urandom'
 
 Program received signal SIGSEGV, Segmentation fault.
 parseACLs () at pdns_recursor.cc:1508
 1508  NetmaskGroup* oldAllowFrom = t_allowFrom;

We could probably boil this issue down to a tiny testcase that would crash
on NetBSD. This could then lead to a bugreport to NetBSD.

Can you try to compile this (g++ t.cc -o t):
#include stdio.h


class Bogo
{
public:

  explicit Bogo(char a)
  {
d_a = a;
  }

  char d_a;
};

__thread Bogo* t_a;

int main()
{
  t_a = new Bogo('a');
  
  Bogo* b = t_a;
  
  printf(%c\n, b-d_a);
}

It is unlikely that PowerDNS will remove the __thread variables since they
work very well on all other relevant platforms ;-(

Bert
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer

2010-05-26 Thread David J Craigon
Hello,

I'm trying to use zone transfers but they are not working.

With the logging turned up high, I am getting TCP Connection Thread
died because of STL error: Reading data: Connection reset by peer in
/var/log/messages. I only get one record sent.
This is even when doing dig -t AXFR @localhost 49.69.109.in-addr.arpa


I'm using the postgresql backend. Here are what my tables look like:

isp=# select * from dns.domains;
 id |  name  | master | last_check |  type  |
notified_serial | account
+++++-+-
  3 | 49.69.109.in-addr.arpa |    |    | MASTER | |
  4 | 50.69.109.in-addr.arpa |    |    | MASTER | |
  5 | 51.69.109.in-addr.arpa |    |    | MASTER | |
  2 | 48.69.109.in-addr.arpa |    |    | MASTER |   0 |
(4 rows)

isp=# select * from dns.records;
 id | domain_id |   name    | type |
   content  | ttl | prio | change_date
+---+---+--+---+-+--+-
  3 | 2 | 1.48.69.109.in-addr.arpa  | PTR  |
gw-5.core1.littleowlhosting.com   | |
|
  4 | 2 | 2.48.69.109.in-addr.arpa  | PTR  |
gw-5.core2.littleowlhosting.com   | |
|
  5 | 2 | 3.48.69.109.in-addr.arpa  | PTR  |
linux-infrastructure.littleowlhosting.com | |
|
  6 | 2 | 25.48.69.109.in-addr.arpa | PTR  |
gw-4.core1.littleowlhosting.com   | |
|
  7 | 2 | 26.48.69.109.in-addr.arpa | PTR  |
gw-4.core2.littleowlhosting.com   | |
|
  8 | 2 | 33.48.69.109.in-addr.arpa | PTR  |
gw-9.core1.littleowlhosting.com   | |
|
  9 | 2 | 34.48.69.109.in-addr.arpa | PTR  |
gw-9.core2.littleowlhosting.com   | |
|
 10 | 2 | 49.48.69.109.in-addr.arpa | PTR  |
gw-12.core1.littleowlhosting.com  | |
|
 11 | 2 | 50.48.69.109.in-addr.arpa | PTR  |
gw-12.core2.littleowlhosting.com  | |
|
 12 | 2 | 65.48.69.109.in-addr.arpa | PTR  |
gw-13.core1.littleowlhosting.com  | |
|
 13 | 2 | 66.48.69.109.in-addr.arpa | PTR  |
gw-13.core2.littleowlhosting.com  | |
|
 14 | 2 | 48.69.109.in-addr.arpa    | SOA  |
ns1.dns.littleowlhosting.com supp...@littleowlhosting.com | |
|
 15 | 2 | 22.48.69.109.in-addr.arpa | PTR  |
dns1.r-dns.littleowlhosting.com   | |
|
 16 | 2 | 18.48.69.109.in-addr.arpa | PTR  |
dns2.r-dns.littleowlhosting.com   | |
|
 17 | 2 | 48.69.109.in-addr.arpa    | NS   |
ns1.dns.littleowlhosting.com  | |
|
 18 | 2 | 48.69.109.in-addr.arpa    | NS   | ns01.backupdns.com


The only configuration change I have made is to put all of the tables
in the dns schema, so I have modified the queries in
/etc/pdns/pdns.conf.

Any ideas why it doesn't work?

David
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer

2010-05-26 Thread David J Craigon
Adding a TTL doesn't help. Without one, ordinary queries are responded
to with the default TTL.

David

On 26 May 2010 11:07, bert hubert bert.hub...@netherlabs.nl wrote:
 On Wed, May 26, 2010 at 10:43:04AM +0100, David J Craigon wrote:
 isp=# select * from dns.records;
  id | domain_id |   name    | type |
    content  | ttl | prio | change_date
 +---+---+--+---+-+--+-
   3 | 2 | 1.48.69.109.in-addr.arpa  | PTR  |
 gw-5.core1.littleowlhosting.com   | |

 Very quick response, I did not study this too well, but no TTL?
 Tends to matter.

        Bert

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer

2010-05-26 Thread David J Craigon
DB schema is exactly as here:

http://doc.powerdns.com/generic-mypgsql-backends.html

with the only difference that I have put these tables in a schema
dns in the database, since I want to use the database for other
things too.

These are my database queries- they are exactly the same as the
defaults, except for adding dns. to the beginning of every table name.

# database queries

gpgsql-basic-query=select content,ttl,prio,type,domain_id,name from
dns.records where type='%s' and name='%s'

gpgsql-id-query=select content,ttl,prio,type,domain_id,name from
dns.records where type='%s' and name='%s' and domain_id=%d

gpgsql-any-query=select content,ttl,prio,type,domain_id,name from
dns.records where name='%s'

gpgsql-any-id-query=select content,ttl,prio,type,domain_id,name from
dns.records where name='%s' and domain_id=%d

gpgsql-list-query=select content,ttl,prio,type,domain_id,name from
dns.records where domain_id=%d



gpgsql-master-zone-query=select master from dns.domains where
name='%s' and type='SLAVE'

gpgsql-info-zone-query=select
id,name,master,last_check,notified_serial,type from dns.domains where
name='%s'

gpgsql-info-all-slaves-query=select id,name,master,last_check,type
from dns.domains where type='SLAVE'

gpgsql-supermaster-query=select account from dns.supermasters where
ip='%s' and nameserver='%s');

gpgsql-insert-slave-query=insert into dns.domains
(type,name,master,account) values('SLAVE','%s','%s','%s')

gpgsql-insert-record-query=insert into dns.records
(content,ttl,prio,type,domain_id,name) values
('%s',%d,%d,'%s',%d,'%s')

gpgsql-update-serial-query=update dns.domains set notified_serial=%d where id=%d

gpgsql-update-lastcheck-query=update dns.domains set
notified_serial=%d where id=%d

gpgsql-info-all-master-query=select
id,name,master,last_check,notified_serial,type from dns.domains where
type='MASTER'

gpgsql-delete-zone-query=delete from dns.records where domain_id=%d



gpgsql-wildcard-query=select content,ttl,prio,type,domain_id,name from
dns.records where type='%s' and name like '%s'

gpgsql-wildcard-id-query=select content,ttl,prio,type,domain_id,name
from dns.records where type='%s' and name like '%s' and domain_id=%d

gpgsql-wildcard-any-query=select content,ttl,prio,type,domain_id,name
from dns.records where name like '%s'

gpgsql-wildcard-any-id-query=select
content,ttl,prio,type,domain_id,name from dns.records where name='%s'
and domain_id=%d


David

On 26 May 2010 12:00, bert hubert bert.hub...@netherlabs.nl wrote:
 On Wed, May 26, 2010 at 11:59:31AM +0100, David J Craigon wrote:
 Adding a TTL doesn't help. Without one, ordinary queries are responded
 to with the default TTL.

 Ok - can you show all your queries from the configuration? And your db schema?

        Bert

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] Power DNS 2.9.22 compile error while running 'make' command

2010-05-26 Thread Michael
On Slackware 13.0 while running Make:

I have successfully configured, compiled (and happily running) this on 2 other 
Slackware machines - one running 12.0 and the other 13.0, and I really am not 
sure what the difference between them is.

In all instances Boost 1.41 is used and configure is run as follows:
CXXFLAGS=-I/root/boost_1_41_0 \
./configure \
--sysconfdir=/usr/local/etc \
--localstatedir=/var/run \
--with-mysql=/usr/local/mysql \
--with-mysql-lib=/usr/local/lib/mysql \
--with-mysql-includes=/usr/local/include/mysql

On the problematic machine configure runs fine, but when I run Make I get the 
following error:

if 
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../.. -pthread   -D_GNU_SOURCE 
-I/root/boost_1_41_0 -Wall -O2 -MT 
rcpgenerator.o -MD -MP -MF .deps/rcpgenerator.Tpo -c -o rcpgenerator.o 
`test -f '../../rcpgenerator.cc' || echo './'`../../rcpgenerator.cc; \
then mv -f .deps/rcpgenerator.Tpo .deps/rcpgenerator.Po; else 
rm -f .deps/rcpgenerator.Tpo; exit 1; fi
../../rcpgenerator.cc: In member function 'void 
RecordTextReader::xfrTime(uint32_t)':
../../rcpgenerator.cc:75: error: 'sscanf' was not declared in this scope
../../rcpgenerator.cc: In member function 'void 
RecordTextWriter::xfrTime(const uint32_t)':
../../rcpgenerator.cc:363: error: 'snprintf' was not declared in this scope
../../rcpgenerator.cc: In member function 'void 
RecordTextWriter::xfrHexBlob(const std::string)':
../../rcpgenerator.cc:415: error: 'snprintf' was not declared in this scope
make[4]: *** [rcpgenerator.o] Error 1
make[4]: Leaving directory `/root/pdns-2.9.22/pdns/backends/bind'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/pdns-2.9.22/pdns/backends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/pdns-2.9.22/pdns'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/pdns-2.9.22'
make: *** [all] Error 2
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] Power DNS 2.9.22 compile error while running 'make' command

2010-05-26 Thread Imre Gergely

I could be wrong but it seems like you don't have some basic header
files installed. glibc-headers, glibc-devel maybe?

On 05/26/2010 03:41 PM, Michael wrote:
 On Slackware 13.0 while running Make:
 
 I have successfully configured, compiled (and happily running) this on 2 
 other 
 Slackware machines - one running 12.0 and the other 13.0, and I really am not 
 sure what the difference between them is.
 
 In all instances Boost 1.41 is used and configure is run as follows:
 CXXFLAGS=-I/root/boost_1_41_0 \
 ./configure \
 --sysconfdir=/usr/local/etc \
 --localstatedir=/var/run \
 --with-mysql=/usr/local/mysql \
 --with-mysql-lib=/usr/local/lib/mysql \
 --with-mysql-includes=/usr/local/include/mysql
 
 On the problematic machine configure runs fine, but when I run Make I get the 
 following error:
 
 if 
 g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../.. -pthread   -D_GNU_SOURCE 
 -I/root/boost_1_41_0 -Wall -O2 -MT 
 rcpgenerator.o -MD -MP -MF .deps/rcpgenerator.Tpo -c -o rcpgenerator.o 
 `test -f '../../rcpgenerator.cc' || echo './'`../../rcpgenerator.cc; \
 then mv -f .deps/rcpgenerator.Tpo .deps/rcpgenerator.Po; else 
 rm -f .deps/rcpgenerator.Tpo; exit 1; fi
 ../../rcpgenerator.cc: In member function 'void 
 RecordTextReader::xfrTime(uint32_t)':
 ../../rcpgenerator.cc:75: error: 'sscanf' was not declared in this scope
 ../../rcpgenerator.cc: In member function 'void 
 RecordTextWriter::xfrTime(const uint32_t)':
 ../../rcpgenerator.cc:363: error: 'snprintf' was not declared in this scope
 ../../rcpgenerator.cc: In member function 'void 
 RecordTextWriter::xfrHexBlob(const std::string)':
 ../../rcpgenerator.cc:415: error: 'snprintf' was not declared in this scope
 make[4]: *** [rcpgenerator.o] Error 1
 make[4]: Leaving directory `/root/pdns-2.9.22/pdns/backends/bind'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory `/root/pdns-2.9.22/pdns/backends'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/root/pdns-2.9.22/pdns'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/root/pdns-2.9.22'
 make: *** [all] Error 2
 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users
 

-- 
Imre Gergely
Yahoo!: gergelyimre | ICQ#: 101510959
MSN: gergely_imre | GoogleTalk: gergelyimre
gpg --keyserver subkeys.pgp.net --recv-keys 0x34525305
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer

2010-05-26 Thread David J Craigon
I've got to the bottom of it, sort of.

Firstly, only dig seems to cause this problem If I try it with
nslookup on Windows, it seemed to work.

It works if I put in a manual serial number in the SOA records.
Otherwise PowerDNS was putting out 0 a serial number in the SOA, which
dig didn't like.

Any idea how to get automatic serial numbers working?

According to the manual:

If left at 0, the default, PDNS will perform an internal list of the
domain to determine highest change_date field of all records within
the zone, and use that as the zone serial number. 

So what goes in the change_date field? I tried putting  20100526 as a
numerical representation of now, but it was still putting out 0 as a
serial number.


David


On 26 May 2010 12:21, David J Craigon da...@craigon.co.uk wrote:
 DB schema is exactly as here:

 http://doc.powerdns.com/generic-mypgsql-backends.html

 with the only difference that I have put these tables in a schema
 dns in the database, since I want to use the database for other
 things too.

 These are my database queries- they are exactly the same as the
 defaults, except for adding dns. to the beginning of every table name.

 # database queries

 gpgsql-basic-query=select content,ttl,prio,type,domain_id,name from
 dns.records where type='%s' and name='%s'

 gpgsql-id-query=select content,ttl,prio,type,domain_id,name from
 dns.records where type='%s' and name='%s' and domain_id=%d

 gpgsql-any-query=select content,ttl,prio,type,domain_id,name from
 dns.records where name='%s'

 gpgsql-any-id-query=select content,ttl,prio,type,domain_id,name from
 dns.records where name='%s' and domain_id=%d

 gpgsql-list-query=select content,ttl,prio,type,domain_id,name from
 dns.records where domain_id=%d



 gpgsql-master-zone-query=select master from dns.domains where
 name='%s' and type='SLAVE'

 gpgsql-info-zone-query=select
 id,name,master,last_check,notified_serial,type from dns.domains where
 name='%s'

 gpgsql-info-all-slaves-query=select id,name,master,last_check,type
 from dns.domains where type='SLAVE'

 gpgsql-supermaster-query=select account from dns.supermasters where
 ip='%s' and nameserver='%s');

 gpgsql-insert-slave-query=insert into dns.domains
 (type,name,master,account) values('SLAVE','%s','%s','%s')

 gpgsql-insert-record-query=insert into dns.records
 (content,ttl,prio,type,domain_id,name) values
 ('%s',%d,%d,'%s',%d,'%s')

 gpgsql-update-serial-query=update dns.domains set notified_serial=%d where 
 id=%d

 gpgsql-update-lastcheck-query=update dns.domains set
 notified_serial=%d where id=%d

 gpgsql-info-all-master-query=select
 id,name,master,last_check,notified_serial,type from dns.domains where
 type='MASTER'

 gpgsql-delete-zone-query=delete from dns.records where domain_id=%d



 gpgsql-wildcard-query=select content,ttl,prio,type,domain_id,name from
 dns.records where type='%s' and name like '%s'

 gpgsql-wildcard-id-query=select content,ttl,prio,type,domain_id,name
 from dns.records where type='%s' and name like '%s' and domain_id=%d

 gpgsql-wildcard-any-query=select content,ttl,prio,type,domain_id,name
 from dns.records where name like '%s'

 gpgsql-wildcard-any-id-query=select
 content,ttl,prio,type,domain_id,name from dns.records where name='%s'
 and domain_id=%d


 David

 On 26 May 2010 12:00, bert hubert bert.hub...@netherlabs.nl wrote:
 On Wed, May 26, 2010 at 11:59:31AM +0100, David J Craigon wrote:
 Adding a TTL doesn't help. Without one, ordinary queries are responded
 to with the default TTL.

 Ok - can you show all your queries from the configuration? And your db 
 schema?

        Bert


___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] configure could be more user-friendly

2010-05-26 Thread Derrik Pates
On 05/26/2010 12:45 AM, Stephane Bortzmeyer wrote:
 ./configure is not very helpful when it cannot find a library. For
 instance, if Boost is not found (because it is in /usr/pkg):
 
 % ./configure
 Testing dependencies and compiler.
 Using gmake to build
[trimming compiler output]
 Instead of something like, more common among free Unix programs:
 
 Cannot find the Boost library http://boost.org/. If it is installed, use 
 --with-boost
 
 I cannot even use --help to find documentation, it yields the same
 error message.
 
 
 
 PowerDNS recursor, version 3.2

I actually had similar troubles trying to build the v3.2 recursor, but
with Boost installed. However, I made the mistake of using the Boost
packages included with CentOS; it seems that the 1.33.x version of Boost
included in CentOS doesn't have some features that are needed for the
new recursor code, but nowhere did I see this new dependency noted, nor
did the configure script bitch me out about your boost is too old,
please upgrade. I had to grab sources from Fedora 10 (since Fedora 11
and up's RPM format change, backbuilding SRPMs is much more difficult,
grr) for Boost 1.39.0 and use that, but something should really be done
to make people aware of this, and not have to go scour Google to figure
out why the recursor won't build.

-- 
Derrik Pates
de...@devrandom.net
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] Power DNS 2.9.22 compile error while running 'make' command

2010-05-26 Thread David Hawthorne
I ran into this on ubuntu as well, with all the dependencies properly installed 
tyvm.

../../rcpgenerator.cc: In member function ‘void 
RecordTextReader::xfrTime(uint32_t)’:
../../rcpgenerator.cc:75: error: ‘sscanf’ was not declared in this scope
../../rcpgenerator.cc: In member function ‘void RecordTextWriter::xfrTime(const 
uint32_t)’:
../../rcpgenerator.cc:363: error: ‘snprintf’ was not declared in this scope
../../rcpgenerator.cc: In member function ‘void 
RecordTextWriter::xfrHexBlob(const std::string)’:
../../rcpgenerator.cc:415: error: ‘snprintf’ was not declared in this scope

It requires #include cstdio to fix.

Same with:

../../dnsparser.cc: In member function ‘virtual std::string 
UnknownRecordContent::getZoneRepresentation() const’:
../../dnsparser.cc:46: error: ‘snprintf’ was not declared in this scope
../../dnsparser.cc: In member function ‘virtual void 
UnknownRecordContent::toPacket(DNSPacketWriter)’:
../../dnsparser.cc:67: error: ‘sscanf’ was not declared in this scope

Just requires #include cstdio to fix.  I put it in dnsparser.hh.

In case versions matter, here are the libs that might be relevant that I have 
installed on this system:

ii  libstdc++6  4.4.1-4ubuntu9The 
GNU Standard C++ Library v3
ii  libstdc++6-4.4-dev  4.4.1-4ubuntu9The 
GNU Standard C++ Library v3 (development
ii  libglib2.0-02.22.2-0ubuntu1   The 
GLib library of C routines
ii  libglib2.0-data 2.22.2-0ubuntu1   
Common files for GLib library
ii  g++ 4:4.4.1-1ubuntu2  The 
GNU C++ compiler
ii  g++-4.4 4.4.1-4ubuntu9The 
GNU C++ compiler


On May 26, 2010, at 5:48 AM, Imre Gergely wrote:

 
 I could be wrong but it seems like you don't have some basic header
 files installed. glibc-headers, glibc-devel maybe?
 
 On 05/26/2010 03:41 PM, Michael wrote:
 On Slackware 13.0 while running Make:
 
 I have successfully configured, compiled (and happily running) this on 2 
 other 
 Slackware machines - one running 12.0 and the other 13.0, and I really am 
 not 
 sure what the difference between them is.
 
 In all instances Boost 1.41 is used and configure is run as follows:
 CXXFLAGS=-I/root/boost_1_41_0 \
 ./configure \
 --sysconfdir=/usr/local/etc \
 --localstatedir=/var/run \
 --with-mysql=/usr/local/mysql \
 --with-mysql-lib=/usr/local/lib/mysql \
 --with-mysql-includes=/usr/local/include/mysql
 
 On the problematic machine configure runs fine, but when I run Make I get 
 the 
 following error:
 
 if 
 g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../.. -pthread   -D_GNU_SOURCE 
 -I/root/boost_1_41_0 -Wall -O2 -MT 
 rcpgenerator.o -MD -MP -MF .deps/rcpgenerator.Tpo -c -o rcpgenerator.o 
 `test -f '../../rcpgenerator.cc' || echo './'`../../rcpgenerator.cc; \
then mv -f .deps/rcpgenerator.Tpo .deps/rcpgenerator.Po; else 
 rm -f .deps/rcpgenerator.Tpo; exit 1; fi
 ../../rcpgenerator.cc: In member function 'void 
 RecordTextReader::xfrTime(uint32_t)':
 ../../rcpgenerator.cc:75: error: 'sscanf' was not declared in this scope
 ../../rcpgenerator.cc: In member function 'void 
 RecordTextWriter::xfrTime(const uint32_t)':
 ../../rcpgenerator.cc:363: error: 'snprintf' was not declared in this scope
 ../../rcpgenerator.cc: In member function 'void 
 RecordTextWriter::xfrHexBlob(const std::string)':
 ../../rcpgenerator.cc:415: error: 'snprintf' was not declared in this scope
 make[4]: *** [rcpgenerator.o] Error 1
 make[4]: Leaving directory `/root/pdns-2.9.22/pdns/backends/bind'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory `/root/pdns-2.9.22/pdns/backends'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/root/pdns-2.9.22/pdns'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/root/pdns-2.9.22'
 make: *** [all] Error 2
 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users
 
 
 -- 
 Imre Gergely
 Yahoo!: gergelyimre | ICQ#: 101510959
 MSN: gergely_imre | GoogleTalk: gergelyimre
 gpg --keyserver subkeys.pgp.net --recv-keys 0x34525305
 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] configure could be more user-friendly

2010-05-26 Thread bert hubert
Derek, Dave, Stephane,

(a rare top-post!), your points are well understood, and will be addressed.

The immediate reason that the pdns-recursor did not have full auto*, and
is unlikely to get it, was the deep dissatisfaction we felt with this suite
of programs.

It turned out to be difficult to have the kind of fine-grained control over
building the recursor in static and semi-static modes using auto*.

We still have the deep dissatisfaction with auto*, which is exhibited for
example by the 'boost' macros which you reference, that are now part of the
powerdns trunk, not in fact detecting boost on many of our platforms..

David, one of the best ways to motivate us is by opening a ticket on
http://wiki.powerdns.com/ - could you do that?

Thanks!


On Wed, May 26, 2010 at 09:48:30AM -0700, David Hawthorne wrote:
 Just to weigh in on this, I'm compiling it on mac right now to see if I can 
 find a missing header I already fixed in a local branch.  I had to twiddle 
 CPPFLAGS and LDFLAGS on the configure line to get it to know where macports 
 installed boost:
 
 $ CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure
 
 There are established macros for requiring boost, and for specifying the 
 location and specific versions for autoconf:
 
 http://www.nongnu.org/autoconf-archive/ax_boost_base.html
 
 the m4 file goes into the m4 subdirectory and configure.ac gets:
 
 AX_BOOST_BASE([1.34.1])
 
 
 On May 26, 2010, at 9:16 AM, Derrik Pates wrote:
 
  On 05/26/2010 12:45 AM, Stephane Bortzmeyer wrote:
  ./configure is not very helpful when it cannot find a library. For
  instance, if Boost is not found (because it is in /usr/pkg):
  
  % ./configure
  Testing dependencies and compiler.
  Using gmake to build
  [trimming compiler output]
  Instead of something like, more common among free Unix programs:
  
  Cannot find the Boost library http://boost.org/. If it is installed, use 
  --with-boost
  
  I cannot even use --help to find documentation, it yields the same
  error message.
  
  
  
  PowerDNS recursor, version 3.2
  
  I actually had similar troubles trying to build the v3.2 recursor, but
  with Boost installed. However, I made the mistake of using the Boost
  packages included with CentOS; it seems that the 1.33.x version of Boost
  included in CentOS doesn't have some features that are needed for the
  new recursor code, but nowhere did I see this new dependency noted, nor
  did the configure script bitch me out about your boost is too old,
  please upgrade. I had to grab sources from Fedora 10 (since Fedora 11
  and up's RPM format change, backbuilding SRPMs is much more difficult,
  grr) for Boost 1.39.0 and use that, but something should really be done
  to make people aware of this, and not have to go scour Google to figure
  out why the recursor won't build.
  
  -- 
  Derrik Pates
  de...@devrandom.net
  ___
  Pdns-users mailing list
  Pdns-users@mailman.powerdns.com
  http://mailman.powerdns.com/mailman/listinfo/pdns-users
 
 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users
 
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] configure could be more user-friendly

2010-05-26 Thread Stephane Bortzmeyer
On Wed, May 26, 2010 at 07:57:13PM +0200,
 bert hubert bert.hub...@netherlabs.nl wrote 
 a message of 85 lines which said:

 The immediate reason that the pdns-recursor did not have full auto*,
 and is unlikely to get it, was the deep dissatisfaction we felt with
 this suite of programs.

Do note that I was not asking specifically for a autotools system. I
was asking for a more user-friendly configure script, whether built
with autotools or in another way.

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] [recursor] configure could be more user-friendly

2010-05-26 Thread bert hubert
On Wed, May 26, 2010 at 10:15:34PM +0200, Stephane Bortzmeyer wrote:
 On Wed, May 26, 2010 at 07:57:13PM +0200,
  bert hubert bert.hub...@netherlabs.nl wrote 
  a message of 85 lines which said:
 
  The immediate reason that the pdns-recursor did not have full auto*,
  and is unlikely to get it, was the deep dissatisfaction we felt with
  this suite of programs.
 
 Do note that I was not asking specifically for a autotools system. I
 was asking for a more user-friendly configure script, whether built
 with autotools or in another way.

I agree fully - this is the historical explanation, not a reason why we
should not improve! 

Bert
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer

2010-05-26 Thread Seth Mattinen
On 5/26/10 6:29 AM, David J Craigon wrote:
 
 Any idea how to get automatic serial numbers working?
 

Autoserial is not supported in the generic backends:

http://doc.powerdns.com/generic-mypgsql-backends.html

Table A-5. Generic PgSQL and MySQL backend capabilities
Native  Yes - but PostgreSQL does not replicate
Master  Yes
Slave   Yes
Superslave  Yes
Autoserial  NO

~Seth
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users