DirectSlave - solution to add and remove zones on slave without DirectAdmin

You should check DS side, the bind logs and DS logs aswell.

Maybe bind has not been properly configured?

Regards

Isn't directslave modifying zones by itself and after that sending command to rndc just to reload?
What is connection between bind log, and the error in DirectAdmin errortaskq.log file?
 
I'm trying to run the new 2.x version now on a system.

Now I'm encountering this when I try to transfer the domains to the directslave server:
failed while receiving responses: REFUSED
However, as far as I know it's installed correctly, but surely I've overseen something.

On the DA server it says this in the log:
zone transfer 'mydomain.nl/AXFR/IN' denied
Connection test went OK so something else must be wrong, I just don't know what.

Next to that when trying the debug check it displays this problem:
Couldn't find pid in existing pid_file at /usr/lib/perl5/site_perl/5.8.8/Net/Server/Daemonize.pm line 48.
2014/07/10-22:08:25 Couldn't find pid in existing pid_file at /usr/lib/perl5/site_perl/5.8.8/Net/Server/Daemonize.pm line 48.

at line 144 in file /usr/lib/perl5/site_perl/5.8.8/Net/Server.pm
2014/07/10-22:08:25 Server closing!
However, when I used a init script I made, it runs fine without complaining and it is using a pid file, so maybe I can ignore this error.
I would like to know where the refused is coming from though.
 
Fixed the first issue. Just added an "allow transfer" ip for the directslave server in the named.conf of the DA server.
 
Got another problem.
A domain is created on the directslave server. But when a change is made on the DA server, the db file on the Directslave server is -not- overwritten or adjusted. So it will keep the old information.
There are no clues in the logfiles, reloading zones on DA server were succesfully completed.
The correct db file is mentioned in the DS error log, but db file is not overwritten.
Any clues?
 
@Richard G: You need to add also allow-notify in named.conf with notify option set to yes

@nsc: Well, better check everything dont you think?
 
@Sellerone: Do I need to set this on the Directslave server or the DA server or both?
And does this "allow-notify" takes care that on the directslave server the db files get overwritten with a new one?
 
Last edited:
IN DA Server side :)

Once DS is able to create the first time the database, than named will just send a notify for update just using itself and remote named service, so DS will not act at that point, just the first time a domain is added/deleted

Regards
 
Well... it doesn't work. I just added this line in the DA server (141 is the slave server with directslave):
Code:
       allow-notify {141.xxx.xxx.xxx; };
and restarted named.

This is wat the action log says on the directslave server (217 is the master DA server):
014-07-11 14:51:43: Auth passed for admin from 217.xxx.xxx.xxx
2014-07-11 14:51:43: reloaded mynetwork.nl on primary 217.xxx.xxx.xxx

The change made on the DA server however, was not made as you can also see on the timestamp on the directslave server:
Code:
-rw-r--r-- 1 named named  691 Jul 11 11:34 mynetwork.nl.db
 
Oh my, this is odd.
So I had made a change before I wrote previous message, I made a cname record for test.
As you can see, the DS log said the db file was updated, but in fact it wasn't.

So I removed the cname record again on the DA server and guess what?
The db file -was- updated now, but directslave put the test cname record into it now. Isn't that strange?
 
Fixed it. I had "notify no;" on the master server and slave server. I put that to "notify yes;" on the master server, and now the zones get updated correctly.
 
Oh sorry, LoL, I thought you ment to set the notify option of allow-notify to yes... I'm feeling stupid now... hahaha, you're right.
Sorry, thanks for the help Sellerone!!
 
ouldn't find pid in existing pid_file
Is the file path set correctly in config?

Have you added the DS IP to server /etc/named.conf allow-transfer and allow-notify?

Regards
 
ouldn't find pid in existing pid_file
Is the file path set correctly in config?

Have you added the DS IP to server /etc/named.conf allow-transfer and allow-notify?

Regards
is this question for me?
 
I think it was for you MtK, my problem is already solved.

rndc: 'reload' failed: failure
This is not good because rndc should run fine. If bind is running you should be able to do a "rndc status" via console and get a good result.
Create a rndc.key file if it's not present yet and include it in your named.conf like this:
Code:
include "/etc/rndc.key";
After that restart bind so you can check if it works now.
 
I'm trying to get version 2.1 working but something goes wrong and i cant figure it out.

I run on centos 7 and i got net::server and net::server::Daemonize

Code:
defined(@array) is deprecated at /usr/local/directslave/bin/../lib//DSGI.pm line 528.
        (Maybe you should just omit the defined()?)
Config: $VAR1 = {
          'rndc_path' => '/usr/sbin/rndc',
          'retry_time' => '1200',
          'ssl_cert' => '/usr/local/directslave/ssl/server.crt',
          'named_conf' => '/etc/named/directslave.conf',
          'pid' => '/usr/local/directslave/run/directslave.pid',
          'ssl_key' => '/usr/local/directslave/ssl/server.key',
          'debug' => 1,
          'authfile' => '/usr/local/directslave/etc/passwd',
          'action_log' => '/usr/local/directslave/log/action.log',
          'server_type' => 'HTTP',
          'error_log' => '/usr/local/directslave/log/error.log',
          'uid' => 'named',
          'ssl' => 'off',
          'access_log' => '/usr/local/directslave/log/access.log',
          'background' => 0,
          'port' => '2222',
          'host' => 'hiding ip',
          'sslport' => '2224',
          'named_workdir' => '/etc/named/secondary',
          'allow' => '0.0.0.0/0',
          'gid' => 'named'
        };
Listen ports: $VAR1 = [
          '2222'
        ];
Couldn't find pid in existing pid_file at /usr/local/share/perl5/Net/Server/Daemonize.pm line 48.
2014/09/03-18:14:01 Couldn't find pid in existing pid_file at /usr/local/share/perl5/Net/Server/Daemonize.pm line 48.

  at line 144 in file /usr/local/share/perl5/Net/Server.pm
2014/09/03-18:14:01 Server closing!
 
Found the pid problem. If you do a --check you will get a empty pid. You need to delete it first and then start --run or --debug
 
After latest OS upgrade (CentOS 5.11) DirectSlave is not going to start anymore

Code:
>/etc/init.d/directslave restart
Stopping DirectSlave:                                      [FAILED]
Starting DirectSlave: "rearrange_header" is not exported by the CGI::Util module
Can't continue after import errors at /usr/local/directslave/bin/../lib//DSGI.pm line 28
BEGIN failed--compilation aborted at /usr/local/directslave/bin/../lib//DSGI.pm line 28.
Compilation failed in require at /usr/local/directslave/bin/directslave line 7.
BEGIN failed--compilation aborted at /usr/local/directslave/bin/directslave line 7.
                                                           [FAILED]
>./directslave -check
"rearrange_header" is not exported by the CGI::Util module
Can't continue after import errors at /usr/local/directslave/bin/../lib//DSGI.pm line 28
BEGIN failed--compilation aborted at /usr/local/directslave/bin/../lib//DSGI.pm line 28.
Compilation failed in require at ./directslave line 7.
BEGIN failed--compilation aborted at ./directslave line 7.

I've tryed to re-install perl modules using yum, but it didnt fix.

Any ideas?

Thanks

Best regards
 
I've unfortunately had to delay moving off my original solution to DirectSlave because it seems to have problems from time to time, and now I'm wondering if I should:

a) try to fight through DirectSlave (could be a major problem for me because my DirectAdmin servers are ll hidden masters, and only my slaves are advertised as uthoritative)

b) Continue to use Master2Slave DNS Replicator (still in beta after all these years because the original author disappered, but it does work. Limitation is that newly added zones can take up to a half-hour to replicate)

c) pay one or more developers to rewrite Master2Slave DNS replicator to make it more universally usable and get rid of some of the bugs (perhaps shorten the propagation delay)

d) get involved, perhaps with the original author, to clean up DirectSlave (I'm not a php developer but I am a seasoned analyst and I can lead a small project to get it cleaned up)

Any ideas?

Jeff
 
Back
Top