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

Not working 100% yet.
1 problem, and 1 question.

Question:
Is it normal to have 6 threats running of directslave after just starting it?

Problem:
My DA installation is not able to connect (Unable to open a socket)
And a portscan also shows that 2222 is not open.

i did read about someone with the same port issue. But restarting is not working.

Any idea why?
 
I suppose yes, it should be normal.. at least i've the same :)

Regarding the port, check if is listening with: netstat -ant | grep 2222

If it is, check or disable your firewall.

Regards
 
No listing.
But even after adding the port:
Code:
iptables -A INPUT -p tcp --dport 2222 -j ACCEPT
Resulting in:
Code:
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:2222

The port is still not open...
 
If the result of: netstat -ant | grep 2222

is

tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN

it is listening, otherwise, check the DirectSlave logs to know why is not listening.

Regards
 
Well, yeah.
It does return that result.
But still when i try to access it using the DA multiserver, or with a portscan, it cannot get a connection.

For the portscan i'm using portcheckers, and telnet.

Error log from directslave does not list enything.
Though, maby i should also note that
 
If it is listening, than the port is blocked somewhere.

Have you tryed to stop iptables? And to save your nearly added rule?

Regards
 
Code:
telnet localhost 2222
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

So, i gues i can?
 
Well, this is strange...
After yum install telnet, and testing telnet localhost 2222, my telnet from my pc is connecting to {ip} 2222?

And i now get an error on DA:
Code:
unable to get api result. Check your configuration options.

However when i run portcheckers.com it still lists the post as unavailable.

So, i gues somehow it needs the telnet client to exist?
 
Ok, so DA is now connecting to DS.
But, DS does add the domain in my slaves folder.

DS get's the following message in the error log:
Code:
This doesn't look like start-end
 at /usr/local/share/perl5/Net/Server.pm line 601.
 
Just solved that problem using the forum search.

To let you know:

Changing the allow config option from all to 0.0.0.0/0, directadmin now gives a ok message.
Also, DS now adds the zone when it's not already there.

Gonna test all other use-cases. But i think it works now.



So, as a recap:

I disabled all firewalls.
I changed allow to 0.0.0.0/0 (from all, to bad this doesn't throw a error or warning)
uid = root
gid = named
changed named_workdir to /var/named/slaves
changed named_conf tp /etc/named/directslave.conf
SSL is off (will use a private network. Else i would recommend enabling this).
Also installed telnet client and netstat-tools.
I also disabled selinux.

Just to help out anyone that also tries directslave on centos7

Thanks SeLLeRoNe for your help (and do you ever sleep?).
And Thanks Roman for this great piece of software.

Thanks,
Erik
 
That's why i asked for you config, cause in the debug you had "all" but i have 0.0.0.0/0

Nice to hear you've figured it out!

Regards
 
Is it possible to reload / manual sync all domains? I'm running directslave 1.3 and I am not seeing all domains in /etc/named/secondary.
 
Yes, on DirectAdmin Server, using SSH run:

Code:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d200

Regard
 
Back
Top