sentora / sentora-installers

Provides a central place to store, version and distribute the Sentora installer and upgrade scripts from.
GNU General Public License v3.0
153 stars 148 forks source link

centos error start named #35

Closed andykimpe closed 9 years ago

andykimpe commented 9 years ago

service named restart Stopping named: . [ OK ] Starting named: Error in named configuration: /etc/named.conf:11: expected IP match list element near ';' [FAILED]

cat /etc/named.conf

key "rndc-key" { algorithm hmac-md5; secret "UDvr061Ihk2iZvN0oY83rQ=="; };

This control was present in Ubuntu and absent in CentOs.

controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; }; acl trusted-servers { ; }; options { listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; allow-query { any; }; 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"; recursion no; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; }; logging { channel bind_log { file "/var/sentora/logs/bind/bind.log" versions 3 size 2m; severity info; print-severity yes; print-time yes; print-category yes; }; channel default_debug { file "/var/sentora/logs/bind/debug.log"; severity dynamic; }; category default { bind_log; }; }; include "/etc/named.rfc1912.zones"; include "/etc/sentora/configs/bind/etc/named.conf";

test regénérate configuration

service named stop Stopping named: [ OK ]

rm -rf /etc/named.conf /etc/rndc.conf /etc/rndc.key

rndc-confgen -a -r /dev/urandom

cat /etc/rndc.key /etc/sentora/configs/bind/named.conf > /etc/named.conf

cat /etc/rndc.key /etc/sentora/configs/bind/rndc.conf > /etc/rndc.conf

rm -f /etc/rndc.key

service named start Starting named: Error in named configuration: /etc/named.conf:11: expected IP match list element near ';' [FAILED]

propose patch

service named stop Stopping named: [ OK ]

mv /etc/named.conf /etc/named.conf.back

echo "$(sed '11d' /etc/named.conf.back)" > /etc/named.conf

rm -f /etc/named.conf.back

service named start Starting named: [ OK ]

MBlagui commented 9 years ago

Thisi was fixed Need to be closed

5050 commented 9 years ago

done