database port

classic Classic list List threaded Threaded
9 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

database port

Willem de Groot


Hi,

How do I specify the database port number with the gmysql module? I
couldn't find anything in the docs nor on google.

gmysql-host=database:3307 does not work

Thanks!

Willem
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: database port

Roeland Nieuwenhuis
> Hi,
>
> How do I specify the database port number with the gmysql
> module? I couldn't find anything in the docs nor on google.
>
> gmysql-host=database:3307 does not work
>

You might use the sock file of mysql, I dont know if you can set a
port.. Therefore.. Use the gmysql-host setting for that. See
http://rtfm.powerdns.com/generic-mypgsql-backends.html for more
information!

Regards,

Roeland

> Thanks!
>
> Willem
> _______________________________________________
> Pdns-users mailing list
> [hidden email]
> http://mailman.powerdns.com/mailman/listinfo/p> dns-users
>
>


Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: database port

bert hubert
In reply to this post by Willem de Groot
On Wed, Feb 26, 2003 at 03:54:21PM +0100, Willem de Groot wrote:
>
>
> Hi,
>
> How do I specify the database port number with the gmysql module? I
> couldn't find anything in the docs nor on google.

Right now you don't, I need to code support for this. Nobody wanted this
before. If you are in a hurry, change this in smysql.cc:

  if (!mysql_real_connect(&d_db, host.empty() ? 0 : host.c_str(),
                          user.empty() ? 0 : user.c_str(),
                          password.empty() ? 0 : password.c_str(),
>                          database.c_str(), 0,
                          msocket.empty() ? 0 : msocket.c_str(),
                          0)) {


into

  if (!mysql_real_connect(&d_db, host.empty() ? 0 : host.c_str(),
                          user.empty() ? 0 : user.c_str(),
                          password.empty() ? 0 : password.c_str(),
>                          database.c_str(), 3307,
                          msocket.empty() ? 0 : msocket.c_str(),
                          0)) {


And recompile. This will be in 2.9.7 as gmysql-port.

Regards,

bert


--
http://www.PowerDNS.com      Open source, database driven DNS Software
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Serial number required?

Willem de Groot
In reply to this post by Willem de Groot

Hello,

Is it right to conclude that pdns doesn't require a serial
number in the SOA field if working in a sql replication setup?

I added my zones with only 'nsa.byte.nl' as SOA content. The nameserver
check of the Dutch domain registry [1] seems to accept this, except for
some weird cases. If pdns lacks a serial number in the SOA record, it
seems to make one itself. But it looks like it does that at random (?)
intervals. The serials are increased every minute or so. In my situation
this gives a problem because sometimes the serial of the 2nd nameserver is
higher than the 1st.

Is it fundamentally right to leave out the serial numbers in the SOA
field?

If so, how do I sync the updating of serial numbers between the two
nameservers (that use replicated mysql databases).

Thanks!

Willem

[1] http://www.sidn.nl/sidn/flat/Domeinnamen/Aanvragen/Nameserver_check/index.shtml

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial number required?

bert hubert
On Mon, Mar 03, 2003 at 05:50:13PM +0100, Willem de Groot wrote:

> Is it fundamentally right to leave out the serial numbers in the SOA
> field?

no, please don't do that right now. There is some 'magic' code around that
could help you automate serial number generation. But for now, please fill
out a serial number. You can leave out the rest of the SOA though.

> If so, how do I sync the updating of serial numbers between the two
> nameservers (that use replicated mysql databases).

Just update the master, the slave will follow automatically over MySQL
replication.

Regards,

bert

--
http://www.PowerDNS.com      Open source, database driven DNS Software
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Zone transfer compatibility pdns <-> bind 9.1.2

Willem de Groot
In reply to this post by Willem de Groot


Hi, sorry for spamming this list again, it's just that I'm really excited
about this superslave/master feature which I can't get to work.

I set up a superslave/master config, with:
- pdns 2.9.6 as superslave
- bind 9.1.2 as supermaster

But the following errors occur on the slave:

pdns[18343]: [ID 702911 daemon.notice] No serial for 'testbyte.nl' found -
zone is missing?
pdns[18343]: [ID 702911 daemon.error] Unable to AXFR zone 'testbyte.nl':
Trying to read data from remote TCP client: Connection reset by peer

This first line looks correct -- it just received a notify from the master
and hasn't got a serial yet. But while axfr'ing the zone, the transfer is
broken.

I double checked my firewall setup and I'm really sure that that is not
the problem. My packet log on the slave says:

p SL,40415 -> MA,53    PR tcp len 20 48 -S  OUT
p MA,53    -> SL,40415 PR tcp len 20 48 -AS IN
p SL,40415 -> MA,53    PR tcp len 20 40 -A  OUT
p SL,40415 -> MA,53    PR tcp len 20 71 -AP OUT
p MA,53    -> SL,40415 PR tcp len 20 40 -A  IN
p MA,53    -> SL,40415 PR tcp len 20 40 -AR IN

Where SL is the slave-ip, MA the master-ip.

According to my firewall log, pdns sends out TCP connections from another
ip than set with 'local-address' in pdns.conf. I don't think this is the
cause for my problem, because the master is set up to allow zone transfers
to both ip's. But maybe it influences it in another way?

I can't find anything suspicious in my master-log.

I'm really out of clues. Maybe you have a suggestion?

Thanks again!

Willem


Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zone transfer compatibility pdns <-> bind 9.1.2

Chris Andrews-4


On Mon, 3 Mar 2003, Willem de Groot wrote:

> I set up a superslave/master config, with:
> - pdns 2.9.6 as superslave
> - bind 9.1.2 as supermaster

What platform is pdns running on? I've tried this configuration with both
pdns and bind running on Solaris 8 / Sparcstation 20, and I'm seeing the
same problem.

> I can't find anything suspicious in my master-log.

If you crank the logging right up do you get references to short packets
being received?


Chris.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zone transfer compatibility pdns <-> bind 9.1.2

Willem de Groot
On Mon, 3 Mar 2003, Chris Andrews wrote:

> What platform is pdns running on? I've tried this configuration with both
> pdns and bind running on Solaris 8 / Sparcstation 20, and I'm seeing the
> same problem.

pdns/slave on solaris 8 / sun netra
bind/master on linux 2.4

> > I can't find anything suspicious in my master-log.
>
> If you crank the logging right up do you get references to short packets
> being received?

The bind logging facility is mystery to me, but I'll ask my colleague
tomorrow.

Willem
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zone transfer compatibility pdns <-> bind 9.1.2

Mark Bergsma
In reply to this post by Willem de Groot
Willem de Groot wrote:

> According to my firewall log, pdns sends out TCP connections from another
> ip than set with 'local-address' in pdns.conf. I don't think this is the
> cause for my problem, because the master is set up to allow zone transfers
> to both ip's. But maybe it influences it in another way?

I 'fixed' that last week with a patch that adds a 'query-local-address'
option that allows you to specify a source IP address for outgoing
queries (including AXFRs).

You can wait for the next release or just apply the patch from

http://mailman.powerdns.com/pipermail/pdns-dev/2003-February/000002.html

--
Mark

[hidden email]

Loading...