Author Topic: give error bind  (Read 9678 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
give error bind
« on: October 05, 2017, 09:21:24 PM »
hi i give error bind in my panel it was say to me

Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.

when i systemctl status named.service in my ssh i give this error


Code: [Select]

[root@server ~]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-10-06 00:47:47 +0330; 1min 16s ago
  Process: 7811 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Oct 06 00:47:47 server.prwdl.ir systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:68: zone 'ns1.prwdl.ir': already exists previous definition: /etc/named.conf:63
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:74: zone 'ns2.prwdl.ir': already exists previous definition: /etc/named.conf:64
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service: control process exited, code=exited status=1
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Unit named.service entered failed state.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service failed.
[root@server ~]#



and when i try journalctl -xe

Code: [Select]

> Oct 06 00:47:47 server.prwdl.ir systemd[1]: Starting Berkeley Internet Name ....
> Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:68: zone 'ns1.pr...3
> Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:74: zone 'ns2.pr...4
> Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service: control process e...1
> Oct 06 00:47:47 server.prwdl.ir systemd[1]: Failed to start Berkeley Interne....
> Oct 06 00:47:47 server.prwdl.ir systemd[1]: Unit named.service entered faile....
> Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service failed.
> Hint: Some lines were ellipsized, use -l to show in full.
>
> es" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Oct 06 00:47:47 server.prwdl.ir systemd[1]: Starting Berkeley Internet Name ....
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:68: zone 'ns1.pr...3
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:74: zone 'ns2.pr...4
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service: control process e...1
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Failed to start Berkeley Interne....
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Unit named.service entered faile....
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
^C
[root@server ~]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-10-06 00:47:47 +0330; 1min 16s ago
  Process: 7811 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Oct 06 00:47:47 server.prwdl.ir systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:68: zone 'ns1.prwdl.ir': already exists previous definition: /etc/named.conf:63
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:74: zone 'ns2.prwdl.ir': already exists previous definition: /etc/named.conf:64
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service: control process exited, code=exited status=1
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Unit named.service entered failed state.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service failed.
[root@server ~]# journalctl -xe
-- Unit named-setup-rndc.service has finished starting up.
--
-- The start-up result is done.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
-- Subject: Unit named.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has begun starting up.
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:68: zone 'ns1.prwdl.ir': already exists previous definition: /etc/named.conf:63
Oct 06 00:47:47 server.prwdl.ir bash[7811]: /etc/named.conf:74: zone 'ns2.prwdl.ir': already exists previous definition: /etc/named.conf:64
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service: control process exited, code=exited status=1
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Unit named.service entered failed state.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service failed.
Oct 06 00:47:47 server.prwdl.ir sshd[7790]: Received disconnect from 121.18.238.123 port 52099:11:  [preauth]
Oct 06 00:47:47 server.prwdl.ir sshd[7790]: Disconnected from 121.18.238.123 port 52099 [preauth]
Oct 06 00:47:57 server.prwdl.ir postfix/smtpd[7953]: warning: hostname static.vnpt.vn does not resolve to address 14.161.30.136
Oct 06 00:47:57 server.prwdl.ir postfix/smtpd[7953]: connect from unknown[14.161.30.136]
Oct 06 00:48:01 server.prwdl.ir postfix/smtpd[7953]: warning: unknown[14.161.30.136]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 06 00:48:01 server.prwdl.ir postfix/smtpd[7953]: disconnect from unknown[14.161.30.136]
Oct 06 00:48:43 server.prwdl.ir sshd[8029]: Accepted password for root from 217.24.153.42 port 29147 ssh2
Oct 06 00:48:43 server.prwdl.ir systemd-logind[859]: New session 858 of user root.
-- Subject: A new session 858 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 858 has been created for the user root.
--
-- The leading process of the session is 8029.
Oct 06 00:48:43 server.prwdl.ir systemd[1]: Started Session 858 of user root.
-- Subject: Unit session-858.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-858.scope has finished starting up.
--
-- The start-up result is done.
Oct 06 00:48:43 server.prwdl.ir systemd[1]: Starting Session 858 of user root.
-- Subject: Unit session-858.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-858.scope has begun starting up.
Oct 06 00:48:43 server.prwdl.ir sshd[8029]: pam_unix(sshd:session): session opened for user root by (uid=0)
Oct 06 00:48:44 server.prwdl.ir dbus-daemon[863]: dbus[863]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
Oct 06 00:48:44 server.prwdl.ir dbus[863]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
Oct 06 00:48:44 server.prwdl.ir dbus[863]: [system] Successfully activated service 'org.freedesktop.problems'
Oct 06 00:48:44 server.prwdl.ir dbus-daemon[863]: dbus[863]: [system] Successfully activated service 'org.freedesktop.problems'
Oct 06 00:48:58 server.prwdl.ir postfix/smtpd[7953]: warning: hostname walkerj235.example.com does not resolve to address 91.200.12.199: Name or service not known
Oct 06 00:48:58 server.prwdl.ir postfix/smtpd[7953]: connect from unknown[91.200.12.199]
Oct 06 00:49:00 server.prwdl.ir postfix/smtpd[7953]: warning: unknown[91.200.12.199]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 06 00:49:00 server.prwdl.ir postfix/smtpd[7953]: lost connection after AUTH from unknown[91.200.12.199]
Oct 06 00:49:00 server.prwdl.ir postfix/smtpd[7953]: disconnect from unknown[91.200.12.199]

[root@server ~]# screen
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: Unit named.service entered failed state.
Oct 06 00:47:47 server.prwdl.ir systemd[1]: named.service failed.
Oct 06 00:47:47 server.prwdl.ir sshd[7790]: Received disconnect from 121.18.238.123 port 52099:11:  [preauth]
Oct 06 00:47:47 server.prwdl.ir sshd[7790]: Disconnected from 121.18.238.123 port 52099 [preauth]
Oct 06 00:47:57 server.prwdl.ir postfix/smtpd[7953]: warning: hostname static.vnpt.vn does not resolve to address 14.161.30.136
Oct 06 00:47:57 server.prwdl.ir postfix/smtpd[7953]: connect from unknown[14.161.30.136]
Oct 06 00:48:01 server.prwdl.ir postfix/smtpd[7953]: warning: unknown[14.161.30.136]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 06 00:48:01 server.prwdl.ir postfix/smtpd[7953]: disconnect from unknown[14.161.30.136]
Oct 06 00:48:43 server.prwdl.ir sshd[8029]: Accepted password for root from 217.24.153.42 port 29147 ssh2
Oct 06 00:48:43 server.prwdl.ir systemd-logind[859]: New session 858 of user root.
-- Subject: A new session 858 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 858 has been created for the user root.
--
-- The leading process of the session is 8029.
Oct 06 00:48:43 server.prwdl.ir systemd[1]: Started Session 858 of user root.
-- Subject: Unit session-858.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-858.scope has finished starting up.
--
-- The start-up result is done.
Oct 06 00:48:43 server.prwdl.ir systemd[1]: Starting Session 858 of user root.
-- Subject: Unit session-858.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-858.scope has begun starting up.
Oct 06 00:48:43 server.prwdl.ir sshd[8029]: pam_unix(sshd:session): session opened for user root by (uid=0)
Oct 06 00:48:44 server.prwdl.ir dbus-daemon[863]: dbus[863]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
Oct 06 00:48:44 server.prwdl.ir dbus[863]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
Oct 06 00:48:44 server.prwdl.ir dbus[863]: [system] Successfully activated service 'org.freedesktop.problems'
Oct 06 00:48:44 server.prwdl.ir dbus-daemon[863]: dbus[863]: [system] Successfully activated service 'org.freedesktop.problems'
Oct 06 00:48:58 server.prwdl.ir postfix/smtpd[7953]: warning: hostname walkerj235.example.com does not resolve to address 91.200.12.199: Name or service not known
Oct 06 00:48:58 server.prwdl.ir postfix/smtpd[7953]: connect from unknown[91.200.12.199]
Oct 06 00:49:00 server.prwdl.ir postfix/smtpd[7953]: warning: unknown[91.200.12.199]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 06 00:49:00 server.prwdl.ir postfix/smtpd[7953]: lost connection after AUTH from unknown[91.200.12.199]
Oct 06 00:49:00 server.prwdl.ir postfix/smtpd[7953]: disconnect from unknown[91.200.12.199]
Oct 06 00:50:01 server.prwdl.ir systemd[1]: Started Session 859 of user root.
-- Subject: Unit session-859.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-859.scope has finished starting up.
--
-- The start-up result is done.
Oct 06 00:50:01 server.prwdl.ir systemd[1]: Starting Session 859 of user root.
-- Subject: Unit session-859.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-859.scope has begun starting up.
Oct 06 00:50:01 server.prwdl.ir CROND[8345]: (root) CMD (/usr/lib64/sa/sa1 1 1)
lines 1894-1955/1955 (END)




please help meeee thanks

Offline
***
Re: give error bind
« Reply #1 on: October 06, 2017, 08:27:22 PM »
Can you paste please your named.conf because from what I see you declare ns1 and ns2 two times.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: give error bind
« Reply #2 on: October 07, 2017, 01:55:05 PM »
Code: [Select]



//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a any DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html

options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };

        /*
         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
         - If you are building a RECURSIVE (caching) DNS server, you need to enable
           recursion.
         - If your recursive DNS server has a public IP address, you MUST enable access
           control to limit queries to your legitimate users. Failing to do so will
           cause your server to become part of large scale DNS amplification
           attacks. Implementing BCP38 within your network would greatly
           reduce such attack surface
        */
        recursion no;

        dnssec-enable yes;
        dnssec-validation yes;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";



include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";




zone "ns1.prwdl.ir" {type master;file "/var/named/ns1.prwdl.ir.db";};
zone "ns2.prwdl.ir" {type master;file "/var/named/ns2.prwdl.ir.db";};


// zone ns1.prwdl.ir
zone "ns1.prwdl.ir" {
                                   type master;
                                        file "/var/named/ns1.prwdl.ir.db";};
// zone_end ns1.prwdl.ir

// zone ns2.prwdl.ir
zone "ns2.prwdl.ir" {
                                   type master;
                                        file "/var/named/ns2.prwdl.ir.db";};
// zone_end ns2.prwdl.ir







// zone prwdl.ir
zone "prwdl.ir" {
                                   type master;
                                        file "/var/named/prwdl.ir.db";};
// zone_end prwdl.ir





Offline
*
Re: give error bind
« Reply #3 on: October 07, 2017, 01:55:59 PM »
Can you paste please your named.conf because from what I see you declare ns1 and ns2 two times.

yes i can please see

Offline
*
Re: give error bind
« Reply #4 on: October 08, 2017, 04:14:19 PM »
please help me

Offline
***
Re: give error bind
« Reply #5 on: October 09, 2017, 06:12:02 AM »
As I see in your named.conf you have:
Code: [Select]
zone "ns1.prwdl.ir" {type master;file "/var/named/ns1.prwdl.ir.db";};
zone "ns2.prwdl.ir" {type master;file "/var/named/ns2.prwdl.ir.db";};


// zone ns1.prwdl.ir
zone "ns1.prwdl.ir" {
                                   type master;
                                        file "/var/named/ns1.prwdl.ir.db";};
// zone_end ns1.prwdl.ir

// zone ns2.prwdl.ir
zone "ns2.prwdl.ir" {
                                   type master;
                                        file "/var/named/ns2.prwdl.ir.db";};
// zone_end ns2.prwdl.ir

Remove from named.conf:
Code: [Select]
zone "ns1.prwdl.ir" {type master;file "/var/named/ns1.prwdl.ir.db";};
zone "ns2.prwdl.ir" {type master;file "/var/named/ns2.prwdl.ir.db";};
Or:
Code: [Select]
// zone ns1.prwdl.ir
zone "ns1.prwdl.ir" {
                                   type master;
                                        file "/var/named/ns1.prwdl.ir.db";};
// zone_end ns1.prwdl.ir

// zone ns2.prwdl.ir
zone "ns2.prwdl.ir" {
                                   type master;
                                        file "/var/named/ns2.prwdl.ir.db";};
// zone_end ns2.prwdl.ir
The one you choose. Save it and:
Code: [Select]
service named restart
Have fun and sorry for my late reply.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...