Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:添加新域名后,mkrdns.log日志报错 #23

Open
wss434631143 opened this issue Apr 9, 2019 · 5 comments
Open

bug:添加新域名后,mkrdns.log日志报错 #23

wss434631143 opened this issue Apr 9, 2019 · 5 comments

Comments

@wss434631143
Copy link

问题描述
添加新域名后,mkrdns.log日志报错:
tail -f /var/log/open_dnsdb/mkrdns.log2019-04-09-14:34:37
(fatal) Can't open /usr/local/open_dnsdb/tmp/var/named/dynamic/net58.linux.office.sh.sit.x2era.com:No such file or directory at /sbin/mkrdns line 436.
image

image

手动创建/usr/local/open_dnsdb/tmp/var/named/dynamic/net58.linux.office.sh.sit.x2era.com文件后正常。

@LostSymbol
Copy link
Contributor

确定在你的zone_dir里这个文件是存在的么, /usr/local/open_dnsdb/tmp/var/named里面的内容是从zone_dir中拷贝的

@wss434631143
Copy link
Author

zone_dir指的是/var/named/chroot/var/named/dynamic 这个文件夹吗?这个文件夹下面没有相应的文件,这些文件添加域名解析时候不生成吗?需要手动创建?

@LostSymbol
Copy link
Contributor

etc/beta/supervisor-dnsdb.conf文件中配置的, 添加解析不会自动创建的,系统只有在新建zone的时候会自动添加zone文件;
因为理论上只能添加解析到已经存下的zone(导入或者新建过),这时候zone文件应该都是存在了的

@wss434631143
Copy link
Author

wss434631143 commented Apr 9, 2019

你说的新建zone的时候会自动添加zone文件
zone文件是保存在/var/named/chroot/var/named/下的,这个是有的,
但是/var/named/chroot/var/named/dynamic下没有那些zone文件,
/usr/local/open_dnsdb/tmp/var/named/dynamic/net58.linux.office.sh.sit.x2era.com下这个文件应该是从/var/named/chroot/var/named/dynamic下面拷贝把,不知道为何会要拷贝这个文件?

@303snowing
Copy link

303snowing commented May 11, 2020

@LostSymbol
我新增普通域名后,mkrdns报错:

image

image

查到perl新版本正则表达式写法变了,然后改了报错文件/sbin/mkrnds所在行('{'->'\{'):
image

报错信息又变为了:
image

麻烦问一下,这个是哪里配置的有问题呢?谢谢~

我的配置信息:
common.conf

[etc]
env = beta
secret_key = SecretKeyForFlask

[log]
log-dir = /var/log/supervisor/
debug = True
verbose = True

[DB]
connection=sqlite:////home/dns-u/open_dnsdb/run/dnsdb.db

[mail]
server = mail.server.corp.com
port = 25
from_addr = [email protected]
password = xxxxxx
alert_list = [email protected];[email protected]
info_list = [email protected]

[web]
base_url = /
run-mode = werkzeug
bind = 0.0.0.0
debug = True

[gunicorn]
timeout=600
workers=4
worker_class = eventlet
daemon = False
loglevel = debug
ignore_healthcheck_accesslog=True
accesslog = /home/dns-u/open_dnsdb/log/access.log

[api]
dnsdbapi_url=http://127.0.0.1:8033/api
dnsupdater_port = 8034

dnsdb.conf

[etc]
allow_ip = 0.0.0.0
secret_key = SessionKeyForFalsk
header_template = /home/dns-u/open_dnsdb/etc/template/zone_header

[log]
log-file = dnsdb.log

[web]
port = 8033

[gunicorn]
bind = 0.0.0.0:8033

[view]
acl_groups = ViewSlave
cname_ttl = 300
view_zone = view.com
normal_view = corp.com:corp.view.com
normal_cname = corp.com:view.corp.com

dnsdb-updater.conf

[etc]
tmp_dir=/home/dns-u/open_dnsdb/tmp
log_dir = /home/dns-u/open_dnsdb/log
backup_dir=/home/dns-u/open_dnsdb/backup
pidfile=/home/dns-u/open_dnsdb/tmp/named_updater.pid
zone_update_interval = 5
allow_ip = 127.0.0.1

[log]
log-file = dnsdb_updater.log

[web]
port = 8034

[gunicorn]
bind = 0.0.0.0:8034

[bind_default]
named_dir = /etc/bind/named
zone_dir = /etc/bind/named
acl_dir = /etc/bind/named
named_checkconf = /usr/sbin/named-checkconf
named_zonecheck = /usr/sbin/named-checkzone
mkrdns = /sbin/mkrdns
rndc = /usr/sbin/rndc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants