[BETA] DNS master2slave

Hi,

yes the main difference betwen dns-replicator and master2slave is that i did use rsync, but, as Richard posted, DirectSlave is a pretty nice project that ive also tested, pretty easy to setup and nice cause juse use the built-in DA function for DNS Replication without need to use a DirectAdmin Server.

The only thing that stop me for use that at this moment is that have no multiple logins for "give away" different password for different customers.

Beside that, when the multi login will be implemented i'll for sure use DirectSlave (less work, no need to edit file/config/scripts).

If you have problem with dns-replicator or master2slave i should help you, but not untille 2 May cause im out of office till that day.

Regards
 
Turns out it was the owner/permission problem and it prevents the sh scripts from copying the dns files to the ip address folder
So that's fixed now since you changed owner/permission?

If you would like help with Directslave, just post it in the Directslave thread I pointed to or write me a pm, I'm in office all days, working from my home.:)
 
too bad I can't install directslave, as everytime when I tried to install the module using CPAN on my slave vps, I've got the cannot allocate memory error.
anyways, I'm trying to install the dns-replicator script. On server (./install.sh server which runs on the slave vps server) I've got no error.

But when I run it on my directadmin server (./install.sh client) I've got the following error message:

Code:
send: spawn id exp6 not open
    while executing
"send -- "myPassword""
    (file "/home/nameserver/scp.sh" line 27)
Server: <main-server-ip>
Include: /etc/named.rfc1912.zones
/home/nameserver/getzone.dns.sh: line 23: [: missing `]'
grep: ]: No such file or directory
grep: /var/named//etc/named.rfc1912.zones: No such file or directory
Include: /etc/named.root.key
/home/nameserver/getzone.dns.sh: line 23: [: missing `]'
grep: ]: No such file or directory
grep: /var/named//etc/named.root.key: No such file or directory

please note that my password doesn't include any double quote, but if you look at "send -- "myPassword"" seems like the double quotes are uneven. I'm not sure if I did something wrong on my side or there is a bug, please advise.
 
@Richard the problem was my slave vps. In order to run directslave I have to have those perl module installed. I have CPAN installed on my centos 6, but everytime when I run:
>CPAN
>install XXX
(where XXX is the modules, like POSIX, or Crypt::passwdMD5)
I've got the cannot allocate memory error. (vps has 128mb ram though) :(

this is how I install CPAN:
yum install perl-CPAN
then I run:
CPAN
 
Is BIND installed on slave server?

For DirectSlave, have you tryed to install those perl modules using yum? Should be easier way ;)

Regards
 
yes bind is installed
slave vps:

Code:
service named status
version: 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4
CPUs found: 1
worker threads: 1
number of zones: 19
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named (pid  1929) is running...
[root@ns2 dns-replicator]#

and I have tried again and run the ./install.sh client on my directadmin server and I got the same error message.

I did tried out the directslave, but the thing is I can't even install those perl modules on my vps. I used CPAN to install the module, and when I type: install POSIX (or any other modules) either I got those weird symbol or got the "cannot allocate memory" error.
 
I have tried to install perl modules using CPAN:

cpan> install POSIX
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Could not pipe[/bin/gzip --decompress --stdout /root/.cpan/sources/authors/01mailrc.txt.gz |]: Cannot allocate memory at /usr/lib/perl5/5.8.8/CPAN.pm line 5726, <FIN> line 3.

I don't know why I'm getting the "cannot allocate memory" as I run free -m I've got:
free -m
total used free shared buffers cached
Mem: 256 19 236 0 0 0
-/+ buffers/cache: 19 236
Swap: 0 0 0
 
vps has 128mb ram though
I think you mean 256 mb ram? Because I just seen your free -m output which says 256.:)

Try running cpan as "perl -MCPAN -e shell", I don't know if that makes any difference.
Next to that, cpan should be updated first before installing the modules, so you have to do:
install Bundle::CPAN

However... I think you need more memory.
What do you have running on the vps? Maybe if you have myslq and httpd running and you stop that, you might just have enough.
 
it's a 128mb burstable to 256mb

since I have full control of this vps I can reload the OS anytime I want. I am installing CPAN on a clean OS (mysqld is not even installed)

this time I tried centos 6 and I ran:
yum install perl-CPAN
perl -MCPAN -e shell

and when type:
install Bundle::CPAN

I got some really weird symbols:

Code:
Could not split line[ÝòØó#*Õc¾Å]
Could not split line[úBS4ÜóùR,´fa.»æ»RÕóB
âMç'¹£ÆYÁ&JÍ{*i]E>"Üi6<µû9jô+(|ÝDQõ0
                                    h(þ-'èKL7ÇÍWQüAz¹ÛBñB¹[¬AeíÉê3[³P[]
Could not split line["LFw½_ø}ÛïÔöDà<P!ÍjÞAÖÜ[
                                             AÖÂ(ÐjÚÛYë[Êh®¼*BÅPA5ï.Ýb)(«+µçºr:y@úrÂawëj<1IR71;oãP9óûb7ÙEoÎß'ºæq^Õ.hÀ)`ÄÜ5ÐlÅ1]
Could not split line[sP-T£çU]
Could not split line[èv:]L³.ôõòç3äïh>öÐii·üIáèµ¥
$]                                              ]                  ~Íócª
Could not split line[êf£HiÝp'ïÜx¡¤ësöXN`¶iÖ!ïa){7ÅÙG<gû³E>¥íXæ!©Òë_±eyÄ=Bn¤Èô¥@M]
Iº´·Âæ%j'uH¢Nó¡r¥¥g][
.Could not split line[HÓ$1×eIùmpO"©!%%KªÒ&%«ið;Í'EJb÷þíp{]0ãÎÖsz¥{ÄcÚ4ºuÆdÍRÐGa]
Could not split line[¿¸(ZËr)^Ò#¦¢UV¡êç2¬kn¨
IU²ö©]ã
Could not split line[âêóUX8$4
                             Xu7_.W¤x
5ð[^æHRT¤êZNPI§*4òsn"éç÷'Z]
Could not split line[}`#qO0yfû2ÔJa ³ÐC2³PC2³"S©à®°<ÌkÃ,PÍQZA~>B7.<3/ü7wâ7
                                                                         %õd_'g¤]
DONE
PuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY^[[?6cPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY^[[2;1;1;112;112;1;0xPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY^[[?6cPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPu

I have tried to install CPAN on two of my vps and still have no luck :(
 
I'm getting one step closer to the dns-replicator (hopefully)

first, in my slave vps I have fixed some typo in my /etc/named.conf so I guess BIND on slave vps is running fine now.

however I'm having the ssh port issues. both my slave vps and directadmin vps use different port, other than 22 for ssh (port 2233). I thought I have already changed the getzone sh accordingly:

Code:
/usr/bin/rsync -a -e "ssh -p 2233 -i /home/nameserver/.ssh/nameserver" -z --delete /home/nameserver/"$HOSTNAME" nameserver@"$nameserve$
        ssh -p 2233 -i /home/nameserver/.ssh/nameserver -o StrictHostKeyChecking=no nameserver@"$nameserver" exec 'touch /home/nameserver/relo$

        if [ "$1" = "remove" ]; then

                echo $HOSTNAME > /home/nameserver/remove
                ssh -p 2233 -i /home/nameserver/.ssh/nameserver -o StrictHostKeyChecking=no nameserver@"$nameserver" 'cat >> /home/nameserver/$
                rm /home/nameserver/remove

        fi

however when I run ./install.sh client I'm still having the issue:

Code:
Overwrite (y/n)? spawn ssh -i /home/nameserver/.ssh/nameserver -o StrictHostKeyChecking=no [email protected] chmod 600 /home/nameserver/.ssh/authorized_keys
ssh: connect to host ns2.mydomain.com port 22: Connection refused
send: spawn id exp3 not open
    while executing
"send -- "mypassword""
    (file "/home/nameserver/scp.sh" line 6)
Server: 76.72.169.102
Include: /etc/named.rfc1912.zones
/home/nameserver/getzone.dns.sh: line 23: [: missing `]'
grep: ]: No such file or directory
grep: /var/named//etc/named.rfc1912.zones: No such file or directory
Include: /etc/named.root.key
/home/nameserver/getzone.dns.sh: line 23: [: missing `]'
grep: ]: No such file or directory
grep: /var/named//etc/named.root.key: No such file or directory
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

is there any other place I forgot to change the port to 2233??
 
We've been running Master2Slave scripts as root to resolve the permissions problem. I won't recommend that for anyone else, but in the years since it's been running, we've all tightened up security quit a bit.

It's still beta after all these years because the programmer I paid to write it years ago disappeared before it was finished; I simply released it as-is.

Feel free to tell me it's okay to discontinue it :) .

Jeff
 
Back
Top