qunarcorp / open_dnsdb Goto Github PK
View Code? Open in Web Editor NEWOpenDnsdb 是去哪儿网OPS团队开源的基于Python语言的DNS管理系统
License: Apache License 2.0
OpenDnsdb 是去哪儿网OPS团队开源的基于Python语言的DNS管理系统
License: Apache License 2.0
问题描述
(.venv) root@bind:/home/gin/open_dnsdb# supervisorctl -c /etc/supervisord.conf
open-dnsdb FATAL Exited too quickly (process log may have details)
open-dnsdb-conf-updater FATAL Exited too quickly (process log may have details)
open-dnsdb-zone-updater FATAL Exited too quickly (process log may have details)
环境配置
Ubuntu18.04
python3.6
复现步骤
1.
2.
3.
实际输出结果
supervisor> supervisorctl -c /etc/supervisord.conf
*** Unknown syntax: supervisorctl -c /etc/supervisord.conf
supervisor> tail -f open-dnsdb
==> Press Ctrl-C to exit <==
/usr/local/open_dnsdb/tools/with_venv.sh: line 13: /usr/local/open_dnsdb/tools//../.venv/bin/activate: No such file or directory
/usr/local/open_dnsdb/tools/with_venv.sh: line 13: /usr/local/open_dnsdb/tools//../.venv/bin/activate: No such file or directory
/usr/local/open_dnsdb/tools/with_venv.sh: line 13: /usr/local/open_dnsdb/tools//../.venv/bin/activate: No such file or directory
/usr/local/open_dnsdb/tools/with_venv.sh: line 13: /usr/local/open_dnsdb/tools//../.venv/bin/activate: No such file or directory
期望输出结果
问题描述
(fatal) Can't open /usr/local/open_dnsdb/tmp/usr/local/named/data/test.com:No such file or directory at /sbin/mkrdns line 436.
环境配置
复现步骤
1./sbin/mkrdns -rootdir /usr/local/open_dnsdb/tmp /usr/local/named/named.conf -debug
2.
3.
实际输出结果
[root@localhost open_dnsdb]# /sbin/mkrdns -rootdir /usr/local/open_dnsdb/tmp /usr/local/named/named.conf -debug
Debugging turned on.
Version = 3.3
C. Revision =
Help = 0
Quiet Mode = 0
Root Dir = /usr/local/open_dnsdb/tmp
Hash Func = 32-bit checksum
(debug) Include statement (include "/etc/named/rndc.key";) found.
(debug) Path changed from "/etc/named/rndc.key" to "/usr/local/open_dnsdb/tmp/etc/named/rndc.key".
(debug) Including file /usr/local/open_dnsdb/tmp/etc/named/rndc.key.
(debug) Named Directory = /usr/local/named/data
(debug) Read in /usr/local/named/named.conf.
(debug) Path changed from "/usr/local/named/data/test.com" to "/usr/local/open_dnsdb/tmp/usr/local/named/data/test.com".
(debug) Domain "test.com", View "default", File "/usr/local/open_dnsdb/tmp/usr/local/named/data/test.com", Type "master".
(debug) Path changed from "/usr/local/named/data/baidu.com" to "/usr/local/open_dnsdb/tmp/usr/local/named/data/baidu.com".
(debug) Domain "baidu.com", View "default", File "/usr/local/open_dnsdb/tmp/usr/local/named/data/baidu.com", Type "master".
(debug) Reading in entries from /usr/local/open_dnsdb/tmp/usr/local/named/data/test.com for domain test.com, view default.
(fatal) Can't open /usr/local/open_dnsdb/tmp/usr/local/named/data/test.com:No such file or directory at /sbin/mkrdns line 436.
期望输出结果
tmp_dir=/usr/local/open_dnsdb/tmp
named.conf 中directory 配置是/usr/local/named/data
为什么mkrdns会去找这个文件呢?压根没有这个文件。
我看函数_copy_named_files(文件:dns_updater/workers/zone_worker.py)中会将bind director目录中的文件都拷贝到 tmp_dir + var/named 目录中。是我哪里配置的有问题吗?
问题描述
Collecting Flask-Login==0.4.1
Using cached Flask-Login-0.4.1.tar.gz (14 kB)
ERROR: Command errored out with exit status 1:
command: /home/open_dnsdb-master/.venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w0ytt75c/flask-login/setup.py'"'"'; file='"'"'/tmp/pip-install-w0ytt75c/flask-login/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zzfwitol
cwd: /tmp/pip-install-w0ytt75c/flask-login/
Complete output (13 lines):
Traceback (most recent call last):
File "", line 1, in
File "/home/open_dnsdb-master/.venv/lib/python3.8/site-packages/setuptools/init.py", line 21, in
from setuptools.dist import Distribution
File "/home/open_dnsdb-master/.venv/lib/python3.8/site-packages/_virtualenv.py", line 89, in exec_module
old(module)
File "/home/open_dnsdb-master/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 34, in
from setuptools import windows_support
File "/home/open_dnsdb-master/.venv/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in
import ctypes
File "/usr/local/python3/lib/python3.8/ctypes/init.py", line 7, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Command "tools/with_venv.sh pip install --upgrade -r /home/open_dnsdb-master/requirements.txt -r /home/open_dnsdb-master/test-requirements.txt" failed.
None
环境配置
Python 3.8.5
复现步骤
1.
2.
3.
实际输出结果
期望输出结果
普通域名模块,新加域名时,提示“”未找到适配的zone,请检查后重试“
是哪里配置未对造成?
问题描述
tools/with_venv.sh python setup.py install
环境配置
CentOS: 7.5
Python: 3.6
pip: 19.0.3
复现步骤
tools/with_venv.sh python setup.py install
实际输出结果
ERROR:root:Error parsing
Traceback (most recent call last):
File "/usr/local/open_dnsdb-0.2/venv3.6/lib/python3.6/site-packages/pbr/core.py", line 96, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/usr/local/open_dnsdb-0.2/venv3.6/lib/python3.6/site-packages/pbr/util.py", line 256, in cfg_to_args
pbr.hooks.setup_hook(config)
File "/usr/local/open_dnsdb-0.2/venv3.6/lib/python3.6/site-packages/pbr/hooks/init.py", line 25, in setup_hook
metadata_config.run()
File "/usr/local/open_dnsdb-0.2/venv3.6/lib/python3.6/site-packages/pbr/hooks/base.py", line 27, in run
self.hook()
File "/usr/local/open_dnsdb-0.2/venv3.6/lib/python3.6/site-packages/pbr/hooks/metadata.py", line 26, in hook
self.config['name'], self.config.get('version', None))
File "/usr/local/open_dnsdb-0.2/venv3.6/lib/python3.6/site-packages/pbr/packaging.py", line 849, in get_version
name=package_name))
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.
error in setup command: Error parsing /usr/local/open_dnsdb-0.2/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.
你好,能帮忙看下这个错是什么原因吗?
添加解析不生效,求指点······添加域名后/usr/local/open_dnsdb/tmp/var/named/.zone 不能同步 /var/named下的.zone文件,
5pu05paw5paH5Lu25aSx6LSlCuS4u+acujogc3ktNzUKLCDnsbvlnos6IG5hbWVkLmNvbmYsIOWO
n+WboDogcmVsb2FkIG5hbWVkLmNvbmYgZmFpbGVkOiBybmRjOiBjb25uZWN0aW9uIHRvIHJlbW90
ZSBob3N0IGNsb3NlZApUaGlzIG1heSBpbmRpY2F0ZSB0aGF0CiogdGhlIHJlbW90ZSBzZXJ2ZXIg
aXMgdXNpbmcgYW4gb2xkZXIgdmVyc2lvbiBvZiB0aGUgY29tbWFuZCBwcm90b2NvbCwKKiB0aGlz
IGhvc3QgaXMgbm90IGF1dGhvcml6ZWQgdG8gY29ubmVjdCwKKiB0aGUgY2xvY2tzIGFyZSBub3Qg
c3luY2hyb25pemVkLCBvcgoqIHRoZSBrZXkgaXMgaW52YWxpZC4=
, because: [Errno 110] Connection timed out
reload named.conf failed: rndc: connection to remote host closed
This may indicate that
问题描述
调用dns api时候出错,请问dns需要增加配置吗
实际输出结果
/usr/local/open-dnsdb/tools/with_venv.sh dnsdb-conf-updater beta dnsdb-updater
2019-01-23 15:08:28.217 16864 CRITICAL dnsdb_updater_www [-] DnsdbApi调用失败: {"message": "\u8bf7\u5148\u5c06ip 192.168.41.51 \u5199\u5165\u6570\u636e\u5e93", "data": null, "errcode": 400, "msg_en": "No such ip record: 192.168.41.51"}
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www Traceback (most recent call last):
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/.venv/bin/dnsdb-conf-updater", line 6, in
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www from dns_updater.app import app_start
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dns_updater/app.py", line 45, in
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www application = create_app()
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dns_updater/app.py", line 21, in create_app
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www setup_config(sys.argv[1], 'dnsdb-updater', conf_dir=os.path.dirname(os.path.dirname(file)))
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dns_updater/config.py", line 140, in setup_config
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www CONF.host_group = DnsdbApi.get_host_group()['data']
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dns_updater/utils/updater_util.py", line 73, in get_host_group
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www data={"host_ip": get_self_ip()})
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dnsdb_common/library/api.py", line 64, in get_form
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www return self._get(url, *args, **dict(kwargs, **{'ctype': 'form'}))
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dnsdb_common/library/api.py", line 45, in _get
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www return self.resp_wrapper(resp, req)
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www File "/usr/local/open-dnsdb/dns_updater/utils/updater_util.py", line 59, in _dnsdb_resp_wrapper
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www raise UpdaterErr(u'DnsdbApi调用失败: %s' % json.dumps(resp), 400, json.dumps(resp))
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www UpdaterErr: DnsdbApi调用失败: {"message": "\u8bf7\u5148\u5c06ip 192.168.41.51 \u5199\u5165\u6570\u636e\u5e93", "data": null, "errcode": 400, "msg_en": "No such ip record: 192.168.41.51"}
2019-01-23 15:08:28.217 16864 TRACE dnsdb_updater_www
这是 dnsdb-updater.conf 的配置
cat etc/beta/dnsdb-updater.conf
[etc]
tmp_dir=/usr/local/open-dnsdb/tmp
log_dir = /var/log/open-dnsdb
backup_dir=/usr/local/backup
pidfile=/usr/local/open-dnsdb/tmp/named_updater.pid
zone_update_interval = 5
allow_ip = 127.0.0.1
[log]
log-file = dnsdb_updater.log
[web]
port = 9000
[gunicorn]
bind = 0.0.0.0:9000
[bind_default]
named_dir = /etc
zone_dir = /var/named
acl_dir = /var/named
named_checkconf = /usr/sbin/named-checkconf
named_zonecheck = /usr/sbin/named-checkzone
mkrdns = /sbin/mkrdns
rndc = /usr/sbin/rndc
问题描述
[root@YZSJHL82-215 open_dnsdb]# python tools/install_venv.py
venv already exists...
Installing dependencies with pip (this can take a while)...
Requirement already up-to-date: pip>=1.4 in ./.venv/lib/python3.6/site-packages (19.0.1)
Requirement already up-to-date: setuptools in ./.venv/lib/python3.6/site-packages (40.6.3)
Requirement already up-to-date: pbr in ./.venv/lib/python3.6/site-packages (5.1.1)
Collecting ConcurrentLogHandler==0.9.1 (from -r /data/open_dnsdb/requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/fd/e5/0dc4f256bcc6484d454006b02f33263b20f762a433741b29d53875e0d763/ConcurrentLogHandler-0.9.1.tar.gz
▽ollecting Flask-RESTful==0.3.6 (from -r /data/open_dnsdb/requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/47/08/89cf8594735392cd71752f7cf159fa63765eac3e11b0da4324cdfeaea137/Flask_RESTful-0.3.6-py2.py3-none-any.whl
Collecting Flask==1.0.2 (from -r /data/open_dnsdb/requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Collecting Flask-SQLAlchemy==2.3.2 (from -r /data/open_dnsdb/requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/a1/44/294fb7f6bf49cc7224417cd0637018db9fee0729b4fe166e43e2bbb1f1c8/Flask_SQLAlchemy-2.3.2-py2.py3-none-any.whl
Collecting httplib2==0.9.1 (from -r /data/open_dnsdb/requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/38/9c/cd76fde3a74d36a0317422dee019ae5f73ce27e62d817ca003e018d9f9d8/httplib2-0.9.1.tar.gz
Collecting jsonschema==2.6.0 (from -r /data/open_dnsdb/requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting oslo.config==1.4.0 (from -r /data/open_dnsdb/requirements.txt (line 7))
Using cached https://files.pythonhosted.org/packages/4d/89/51a21caa79ccfba7b0c879ff073e35fe0e3783cc120e69fe84943a87bc35/oslo.config-1.4.0-py2.py3-none-any.whl
Collecting ping==0.2 (from -r /data/open_dnsdb/requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/03/ac/9a3f332f8d7d27cd8929922b2e225842c1623760364b37fc79dc0f65e77d/ping-0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-cxlw7p7y/ping/setup.py", line 23, in
from ping import version
File "/tmp/pip-install-cxlw7p7y/ping/ping.py", line 196
except socket.error, (errno, msg):
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-cxlw7p7y/ping/
Command "tools/with_venv.sh pip install --upgrade -r /data/open_dnsdb/requirements.txt -r /data/open_dnsdb/test-requirements.txt" failed.
None
[root@YZSJHL82-215 open_dnsdb]# cd /tmp
环境配置
centos7 py3.6 pip19.01
复现步骤
1.python tools/install_venv.py
2.
3.
实际输出结果
期望输出结果
问题描述
1、按https://github.com/qunarcorp/open_dnsdb/wiki/startUpdater文档进行部署完,supervisord中 reload时候,dns-dnsdb-conf-updater和dns-dns-zone-updater均启动不正常,错误提示如下:
(.venv) [root@localhost named]# /usr/local/open_dnsdb/tools/with_venv.sh dnsdb-conf-updater beta dnsdb-updater
2019-03-07 10:46:25.694 8708 CRITICAL dnsdb_updater_www [-] DnsdbApi调用失败: {"message": "\u8bf7\u5148\u5c06ip 192.168.11.67 \u5199\u5165\u6570\u636e\u5e93", "data": null, "errcode": 400, "msg_en": "No such ip record: 192.168.11.67"}
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www Traceback (most recent call last):
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/.venv/bin/dnsdb-conf-updater", line 6, in
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www from dns_updater.app import app_start
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dns_updater/app.py", line 45, in
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www application = create_app()
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dns_updater/app.py", line 21, in create_app
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www setup_config(sys.argv[1], 'dnsdb-updater', conf_dir=os.path.dirname(os.path.dirname(file)))
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dns_updater/config.py", line 139, in setup_config
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www CONF.host_group = DnsdbApi.get_host_group()['data']
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dns_updater/utils/updater_util.py", line 78, in get_host_group
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www data={"host_ip": get_self_ip()})
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dnsdb_common/library/api.py", line 64, in get_form
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www return self._get(url, *args, **dict(kwargs, **{'ctype': 'form'}))
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dnsdb_common/library/api.py", line 45, in _get
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www return self.resp_wrapper(resp, req)
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/dns_updater/utils/updater_util.py", line 64, in _dnsdb_resp_wrapper
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www raise UpdaterErr(u'DnsdbApi调用失败: %s' % json.dumps(resp), 400, json.dumps(resp))
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www UpdaterErr: DnsdbApi调用失败: {"message": "\u8bf7\u5148\u5c06ip 192.168.11.67 \u5199\u5165\u6570\u636e\u5e93", "data": null, "errcode": 400, "msg_en": "No such ip record: 192.168.11.67"}
2019-03-07 10:46:25.694 8708 TRACE dnsdb_updater_www
2、编辑添加主机时提示:
3、编辑配置文件时提示:
环境配置
环境配置均与文档描述一致
复现步骤
1.
2.
3.
实际输出结果
期望输出结果
问题描述
你好,启动open-dnsdb-zone-updater和open-dnsdb-zone-updater是会打印以下报错:
TRACE dnsdb_updater_www raise ConnectionError(e, request=request)
TRACE dnsdb_updater_www ConnectionError: HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /api/get/host_group (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7faebe63ae50>: Failed to establish a new connection: [Errno 111] Connection refused',))
TRACE dnsdb_updater_www
ERROR dns_updater.app [-] This host belong to host group DNSMaster
TRACE dnsdb_upater_zone ConnectionError: HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /api/get/host_group (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe9d9649fd0>: Failed to establish a new connection: [Errno 111] Connection refused',))
TRACE dnsdb_upater_zone
ERROR dns_updater.updater [-] Host belong to group: DNSMaster
控制台一直显示
open-dnsdb-stdout日志一直有访问接口输出
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /api/get/update_zones
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /api/get/update_zones
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /api/get/update_zones
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
[DEBUG] GET /web/preview/list/operation_log
[DEBUG] Closing connection.
排查过程
1)我通过curl localhost 和 curl 127.0.0.1 都没有问题
2)修改下面配置内容localhost为127.0.0.1 依然不行
[api]
dnsdbapi_url=http://localhost:9001/api
dnsupdater_port = 9000
请问这里的报错跟哪里有关呢
环境配置
cenos7.5
python2.7.13
pip 19.1.1
问题描述
em9uZSBrZWRvdS5jb20g5pu05paw5aSx6LSlCuWOn+WboDogRmFpbGVkIHRvIGNvcHkgem9uZSBm
aWxlcyB0byB0bXBfZGlyLg==
, because:
2019-03-14 09:52:04.560 58783 ERROR dns_updater.utils.updater_util [-] Failed to copy zone files to tmp_dir.
2019-03-14 09:52:14.589 58783 ERROR dnsdb_common.library.email_util [-] Failed to send email:From nobody Thu Mar 14 09:52:14 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Subject: [DNSDB-UPDATER alarm: XYMaster]
From: =?utf-8?q?alert=40sendmail=2Eshunwang=2Ecom?=
To: =?utf-8?q?tx=2Eshi=40shunwang=2Ecom?=
环境配置
复现步骤
1.
2.
3.
实际输出结果
期望输出结果
问题描述
添加新域名后,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.
手动创建/usr/local/open_dnsdb/tmp/var/named/dynamic/net58.linux.office.sh.sit.x2era.com文件后正常。
问题描述
页面添加主机组报错“”
环境配置
7.51810
版本
0.2releases
复现步骤
1.按照手册增加主机组
2.
3.
实际输出结果
[2019-04-27 20:47:10 +0000] [9436] [DEBUG] POST /web/config/add/host_group
2019-04-27 20:47:10.960 9436 ERROR dnsdb_common.library.decorators [-] func: add_host_group, args: (), kwargs: {}
2019-04-27 20:47:10.960 9436 ERROR dnsdb_common.library.decorators [-] None str type:localhost.localdomain.
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators Traceback (most recent call last):
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/decorators.py", line 84, in decorator
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators return resp(data=func(*kargs, **kwargs), is_json=is_json)
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/decorators.py", line 180, in _wrapper
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators ret = func(*args, **kwargs)
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb/view/web/config.py", line 82, in add_host_group
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators group_name, group_type, hosts = _check_and_format_params(params['group_name'], params['hosts'])
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb/view/web/config.py", line 70, in _check_and_format_params
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators HostGroupConfDal.check_host(item['host_name'], item['host_ip'])
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/dal/host_group_conf.py", line 40, in check_host
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators is_valid_domain_name(hostname)
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/utils.py", line 53, in is_valid_domain_name
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators is_valid_domain_name_v2(domain_name)
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/utils.py", line 41, in is_valid_domain_name_v2
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators raise BadParam("None str type:%s." % domain_name, msg_ch=u'域名参数为空')
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators BadParam: None str type:localhost.localdomain.
2019-04-27 20:47:10.960 9436 TRACE dnsdb_common.library.decorators
期望输出结果
问题描述
添加zone失败,
open-dnsdb-conf-updater、open-dnsdb-zone-updater启动失败
环境配置
CentOS Linux release 7.6.1810 (Core)
Linux bind 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
BIND 9.14.0 (Stable Release) id:90df20a
复现步骤
1.Successfully built Flask-Login httplib2 SQLAlchemy fixture alembic pyrsistent PyYAML Mako wrapt
Installing collected packages: concurrent-log-handler, click, itsdangerous, MarkupSafe, Jinja2, Werkzeug, Flask, Flask-Login, SQLAlchemy, Flask-SQLAlchemy, Mako, python-editor, six, python-dateutil, alembic, Flask-Migrate, pytz, aniso8601, Flask-RESTful, httplib2, attrs, pyrsistent, jsonschema, rfc3986, babel, oslo.i18n, netaddr, stevedore, PyYAML, wrapt, debtcollector, chardet, urllib3, certifi, idna, requests, oslo.config, multiping, imagesize, pyparsing, packaging, sphinxcontrib-websupport, docutils, alabaster, snowballstemmer, Pygments, Sphinx, sphinx-rtd-theme, gunicorn, monotonic, dnspython, greenlet, eventlet, python-mimeparse, linecache2, traceback2, argparse, unittest2, fixtures, extras, testtools, WebOb, soupsieve, beautifulsoup4, waitress, WebTest, virtualenv, filelock, pluggy, toml, py, tox, fixture, mock
Successfully installed Flask-1.0.2 Flask-Login-0.4.1 Flask-Migrate-2.4.0 Flask-RESTful-0.3.7 Flask-SQLAlchemy-2.3.2 Jinja2-2.10 Mako-1.0.8 MarkupSafe-1.1.1 PyYAML-5.1 Pygments-2.3.1 SQLAlchemy-1.2.18 Sphinx-1.8.4 WebOb-1.8.5 WebTest-2.0.33 Werkzeug-0.15.2 alabaster-0.7.12 alembic-1.0.8 aniso8601-6.0.0 argparse-1.4.0 attrs-19.1.0 babel-2.6.0 beautifulsoup4-4.7.1 certifi-2019.3.9 chardet-3.0.4 click-7.0 concurrent-log-handler-0.9.12 debtcollector-1.21.0 dnspython-1.16.0 docutils-0.14 eventlet-0.24.1 extras-1.0.0 filelock-3.0.10 fixture-1.5.11 fixtures-3.0.0 greenlet-0.4.15 gunicorn-19.9.0 httplib2-0.12.1 idna-2.8 imagesize-1.1.0 itsdangerous-1.1.0 jsonschema-3.0.1 linecache2-1.0.0 mock-2.0.0 monotonic-1.5 multiping-1.1.2 netaddr-0.7.19 oslo.config-6.8.1 oslo.i18n-3.23.1 packaging-19.0 pluggy-0.9.0 py-1.8.0 pyparsing-2.3.1 pyrsistent-0.14.11 python-dateutil-2.8.0 python-editor-1.0.4 python-mimeparse-1.6.0 pytz-2018.9 requests-2.21.0 rfc3986-1.2.0 six-1.12.0 snowballstemmer-1.2.1 soupsieve-1.9 sphinx-rtd-theme-0.4.3 sphinxcontrib-websupport-1.1.0 stevedore-1.30.1 testtools-2.3.0 toml-0.10.0 tox-3.8.6 traceback2-1.4.0 unittest2-1.1.0 urllib3-1.24.1 virtualenv-16.4.3 waitress-1.2.1 wrapt-1.11.1
2.Installing collected packages: concurrent-log-handler, click, itsdangerous, Werkzeug, MarkupSafe, Jinja2, Flask, Flask-Login, SQLAlchemy, Flask-SQLAlchemy, python-editor, six, python-dateutil, Mako, alembic, Flask-Migrate, pytz, aniso8601, Flask-RESTful, httplib2, pyrsistent, attrs, jsonschema, pbr, babel, oslo.i18n, PyYAML, stevedore, netaddr, urllib3, chardet, certifi, idna, requests, wrapt, debtcollector, rfc3986, oslo.config, multiping, sphinxcontrib-websupport, snowballstemmer, Pygments, docutils, alabaster, pyparsing, packaging, imagesize, Sphinx, sphinx-rtd-theme, gunicorn, dnspython, greenlet, monotonic, eventlet
Successfully installed Flask-1.0.2 Flask-Login-0.4.1 Flask-Migrate-2.4.0 Flask-RESTful-0.3.7 Flask-SQLAlchemy-2.3.2 Jinja2-2.10 Mako-1.0.8 MarkupSafe-1.1.1 PyYAML-5.1 Pygments-2.3.1 SQLAlchemy-1.2.18 Sphinx-1.8.4 Werkzeug-0.15.2 alabaster-0.7.12 alembic-1.0.8 aniso8601-6.0.0 attrs-19.1.0 babel-2.6.0 certifi-2019.3.9 chardet-3.0.4 click-7.0 concurrent-log-handler-0.9.12 debtcollector-1.21.0 dnspython-1.16.0 docutils-0.14 eventlet-0.24.1 greenlet-0.4.15 gunicorn-19.9.0 httplib2-0.12.1 idna-2.8 imagesize-1.1.0 itsdangerous-1.1.0 jsonschema-3.0.1 monotonic-1.5 multiping-1.1.2 netaddr-0.7.19 oslo.config-6.8.1 oslo.i18n-3.23.1 packaging-19.0 pbr-5.1.3 pyparsing-2.3.1 pyrsistent-0.14.11 python-dateutil-2.8.0 python-editor-1.0.4 pytz-2018.9 requests-2.21.0 rfc3986-1.2.0 six-1.12.0 snowballstemmer-1.2.1 sphinx-rtd-theme-0.4.3 sphinxcontrib-websupport-1.1.0 stevedore-1.30.1 urllib3-1.24.1 wrapt-1.11.1
3.Installing dnsdb script to /usr/local/open_dnsdb/.venv/bin
Installing dnsdb-conf-updater script to /usr/local/open_dnsdb/.venv/bin
Installing dnsdb-zone-updater script to /usr/local/open_dnsdb/.venv/bin
实际输出结果
(.venv) [root@bind open_dnsdb]# supervisorctl -c /etc/supervisord.conf
open-dnsdb RUNNING pid 10236, uptime 0:00:12
open-dnsdb-conf-updater FATAL Exited too quickly (process log may have details)
open-dnsdb-zone-updater FATAL Exited too quickly (process log may have details)
supervisor> tail -f open-dnsdb
==> Press Ctrl-C to exit <==
ator
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators return resp(data=func(*kargs, **kwargs), is_json=is_json)
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb/view/api/init.py", line 34, in get_host_group
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators return HostGroupConfDal.get_group_by_ip(host_ip)
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/dal/host_group_conf.py", line 51, in get_group_by_ip
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators raise BadParam('No such ip record: %s' % host_ip, msg_ch=u'请先将ip %s 写入数据库' % host_ip)
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators dnsdb_common.library.exception.BadParam: No such ip record: 172.16.16.214
2019-04-04 16:15:20.361 10261 TRACE dnsdb_common.library.decorators
[2019-04-04 16:15:20 +0800] [10261] [DEBUG] Closing connection.
期望输出结果
新手 小菜,能有更详细的安装教程吗
已经搞定
; 邮件相关配置
[mail]
server = mail.server.corp.com
port = 25
from_addr = [email protected]
alert_list = [email protected];[email protected]
info_list = [email protected];[email protected]
问题描述
open-dnsdb启动成功,主机组已添加,并在数据库中查询到,open-dnsdb-conf-updater启动报错,
环境配置
Centos 7.2
Python 3.6.8
报错日志
HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /api/get/host_group (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f85468b5518>: Failed to establish a new connection: [Errno 111] Connection refused',))
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www Traceback (most recent call last):
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www (self._dns_host, self.port), self.timeout, **extra_kw)
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www raise err
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www sock.connect(sa)
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www ConnectionRefusedError: [Errno 111] Connection refused
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www During handling of the above exception, another exception occurred:
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www Traceback (most recent call last):
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www chunked=chunked)
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www conn.request(method, url, **httplib_request_kw)
2019-04-07 18:29:47.724 2944 TRACE dnsdb_updater_www File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
flake8 testing of https://github.com/qunarcorp/open_dnsdb on Python 3.7.1
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./dnsdb_common/library/utils.py:23:1: F822 undefined name 'is_subnet_public' in __all__
__all__ = (
^
./dnsdb_common/library/utils.py:23:1: F822 undefined name 'load_config_option' in __all__
__all__ = (
^
./dnsdb_common/library/utils.py:23:1: F822 undefined name 'is_valid_ip_bysocketis_string' in __all__
__all__ = (
^
3 F822 undefined name 'is_subnet_public' in __all__
3
E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
name
name
in __all__
问题描述
部署的时候,执行【cp etc/beta/supervisor-dnsdb.conf /etc/supervisor/conf.d/open-dnsdb.conf】
再执行【supervisord -c /etc/supervisord.conf】失败
环境配置
centos 7.5,python2.7
问题原因:
etc/beta/supervisor-dnsdb.conf 文件中将目录【open_dnsdb】改成了【open-dnsdb】
解决:改回到【open_dnsdb】
问题描述
帮忙看看啥问题,下载V0.2的版本,前面步骤都很顺利,就这步过不去
tools/with_venv.sh python setup.py install
环境配置
Centos 7.4
Python 3.6.8
pip 19.2.2
复现步骤
1.
2.
3.
实际输出结果
(.venv) [root@minion02 open_dnsdb]# tools/with_venv.sh python setup.py install
ERROR:root:Error parsing
Traceback (most recent call last):
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/core.py", line 96, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/util.py", line 270, in cfg_to_args
pbr.hooks.setup_hook(config)
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/hooks/init.py", line 25, in setup_hook
metadata_config.run()
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/hooks/base.py", line 27, in run
self.hook()
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/hooks/metadata.py", line 26, in hook
self.config['name'], self.config.get('version', None))
File "/usr/local/open_dnsdb/.venv/lib/python3.6/site-packages/pbr/packaging.py", line 874, in get_version
name=package_name))
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.
error in setup command: Error parsing /usr/local/open_dnsdb/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.
期望输出结果
问题描述
ReadMe写到:“支持RESTful API, 支持Webhook.”
环境配置
复现步骤
"支持RESTful API" API文档在哪里能看?
实际输出结果
期望输出结果
问题描述
zone配置文件推送成功,但是host文件推送不成功。
环境配置
CentOS Linux release 7.4.1708 (Core)
python3.6.8
bind-9.11.4
复现步骤
1.web页面配置域名和host。
2.查看系统推送文件。
[root@localhost open_dnsdb]# find / -name china.com
/var/named/chroot/var/named/china.com
/usr/local/open_dnsdb/tmp/var/named/china.com
[root@localhost open_dnsdb]# cat /var/named/chroot/var/named/china.com
$TTL 7200 ; 2 hours
@ IN SOA localhost. root.localhost. (
3000000000 ; Serial
3600 ; Refresh (1 hour)
900 ; Retry (15 minutes)
3600000 ; Expire (5 weeks 6 days 16 hours)
3600 ; Minimum (1 hour)
)
@ 2D IN NS localhost.
$ORIGIN china.com.
[root@localhost open_dnsdb]# cat /usr/local/open_dnsdb/tmp/var/named/china.com
$TTL 7200 ; 2 hours
@ IN SOA localhost. root.localhost. (
3000000001 ; Serial
3600 ; Refresh (1 hour)
900 ; Retry (15 minutes)
3600000 ; Expire (5 weeks 6 days 16 hours)
3600 ; Minimum (1 hour)
)
@ 2D IN NS localhost.
$ORIGIN china.com.
www IN A 10.0.0.1
3.
实际输出结果
期望输出结果
正常
问题描述
[2019-04-28 05:40:18 +0000] [3339] [DEBUG] POST /web/config/add/host
2019-04-28 05:40:18.888 3339 ERROR dnsdb_common.library.decorators [-] func: add_host, args: (), kwargs: {'host_name': 'a.a', 'host_ip': '10.110.3.211', 'group_name': 'Master'}
2019-04-28 05:40:18.888 3339 ERROR dnsdb_common.library.decorators [-] Invalid ip format: '10.110.3.211' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators Traceback (most recent call last):
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/decorators.py", line 84, in decorator
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators return resp(data=func(*kargs, **kwargs), is_json=is_json)
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/decorators.py", line 180, in _wrapper
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators ret = func(*args, **kwargs)
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb/view/web/config.py", line 102, in add_host
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators HostGroupConfDal.check_host(host_name, host_ip)
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/dal/host_group_conf.py", line 41, in check_host
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators format_ipv4(ip)
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators File "/usr/local/open_dnsdb/dnsdb_common/library/utils.py", line 71, in format_ipv4
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators raise BadParam('Invalid ip format: %s ' % e, msg_ch='ip格式错误')
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators BadParam: Invalid ip format: '10.110.3.211' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?
2019-04-28 05:40:18.888 3339 TRACE dnsdb_common.library.decorators
修复:
vim open_dnsdb/dnsdb_common/library/utils.py
修改
def format_ipv4(ip):
if '.' not in ip:
raise BadParam('Invalid IPv6 format', msg_ch='IPv6格式错误')
try:
ip = ipaddress.ip_address(ip)
except Exception as e:
raise BadParam('Invalid ip format: %s ' % e, msg_ch='ip格式错误')
return str(ip)
为
def format_ipv4(ip):
if '.' not in ip:
raise BadParam('Invalid IPv6 format', msg_ch='IPv6格式错误')
try:
ip = ipaddress.ip_address(ip.decode("utf8"))
except Exception as e:
raise BadParam('Invalid ip format: %s ' % e, msg_ch='ip格式错误')
return str(ip)
问题描述
普通域名-->子网管理--->IP详情,添加子网后一旦点击这个"IP 详情"页面就会假死掉。 这个要避免当大网段的时候点击。
还有一个问题:
安装时是必须安装在/usr/local目录下,指定到其他目录即使改common.conf也只能部分生效。这个问题最好安装时说明下
是否可以提供容器化部署指南,实现最小可运行环境的快速集成化部署,例如封装好的镜像,dockerfile,或者compose等等,以便可以开箱即食。
各位好:
在部署到【flask deploy】出现报错无法打开文件,我试着安装sqlite3,但是也无法解决,希望能得到一些帮助。
环境:centos 7.5 python2.7
报错日志如下:
(.venv) [root@localhost open_dnsdb]# flask deploy
2019-01-23 10:57:49.437 14027 CRITICAL dnsdb [-] (sqlite3.OperationalError) unable to open database file
2019-01-23 10:57:49.437 14027 TRACE dnsdb Traceback (most recent call last):
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/bin/flask", line 10, in
2019-01-23 10:57:49.437 14027 TRACE dnsdb sys.exit(main())
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/flask/cli.py", line 894, in main
2019-01-23 10:57:49.437 14027 TRACE dnsdb cli.main(args=args, prog_name=name)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/flask/cli.py", line 557, in main
2019-01-23 10:57:49.437 14027 TRACE dnsdb return super(FlaskGroup, self).main(*args, **kwargs)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/click/core.py", line 717, in main
2019-01-23 10:57:49.437 14027 TRACE dnsdb rv = self.invoke(ctx)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
2019-01-23 10:57:49.437 14027 TRACE dnsdb return _process_result(sub_ctx.command.invoke(sub_ctx))
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/click/core.py", line 956, in invoke
2019-01-23 10:57:49.437 14027 TRACE dnsdb return ctx.invoke(self.callback, **ctx.params)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/click/core.py", line 555, in invoke
2019-01-23 10:57:49.437 14027 TRACE dnsdb return callback(*args, **kwargs)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
2019-01-23 10:57:49.437 14027 TRACE dnsdb return f(get_current_context(), *args, **kwargs)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/flask/cli.py", line 412, in decorator
2019-01-23 10:57:49.437 14027 TRACE dnsdb return __ctx.invoke(f, *args, **kwargs)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/click/core.py", line 555, in invoke
2019-01-23 10:57:49.437 14027 TRACE dnsdb return callback(*args, **kwargs)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/dnsdb_command.py", line 157, in deploy
2019-01-23 10:57:49.437 14027 TRACE dnsdb db.create_all()
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 963, in create_all
2019-01-23 10:57:49.437 14027 TRACE dnsdb self._execute_for_all_tables(app, bind, 'create_all')
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 955, in _execute_for_all_tables
2019-01-23 10:57:49.437 14027 TRACE dnsdb op(bind=self.get_engine(app, bind), **extra)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 3695, in create_all
2019-01-23 10:57:49.437 14027 TRACE dnsdb tables=tables)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1855, in _run_visitor
2019-01-23 10:57:49.437 14027 TRACE dnsdb with self._optional_conn_ctx_manager(connection) as conn:
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/usr/lib64/python2.7/contextlib.py", line 17, in enter
2019-01-23 10:57:49.437 14027 TRACE dnsdb return self.gen.next()
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1848, in _optional_conn_ctx_manager
2019-01-23 10:57:49.437 14027 TRACE dnsdb with self.contextual_connect() as conn:
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2039, in contextual_connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb self._wrap_pool_connect(self.pool.connect, None),
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2078, in _wrap_pool_connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb e, dialect, self)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception_noconnection
2019-01-23 10:57:49.437 14027 TRACE dnsdb exc_info
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2019-01-23 10:57:49.437 14027 TRACE dnsdb reraise(type(exception), exception, tb=exc_tb, cause=cause)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2074, in _wrap_pool_connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb return fn()
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 376, in connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb return _ConnectionFairy._checkout(self)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 713, in _checkout
2019-01-23 10:57:49.437 14027 TRACE dnsdb fairy = _ConnectionRecord.checkout(pool)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 480, in checkout
2019-01-23 10:57:49.437 14027 TRACE dnsdb rec = pool._do_get()
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1151, in _do_get
2019-01-23 10:57:49.437 14027 TRACE dnsdb return self._create_connection()
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 323, in _create_connection
2019-01-23 10:57:49.437 14027 TRACE dnsdb return _ConnectionRecord(self)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 449, in init
2019-01-23 10:57:49.437 14027 TRACE dnsdb self.connection = self.__connect()
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 607, in __connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb connection = self.__pool._invoke_creator(self)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 97, in connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb return dialect.connect(*cargs, **cparams)
2019-01-23 10:57:49.437 14027 TRACE dnsdb File "/opt/open_dnsdb/.venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 385, in connect
2019-01-23 10:57:49.437 14027 TRACE dnsdb return self.dbapi.connect(*cargs, **cparams)
2019-01-23 10:57:49.437 14027 TRACE dnsdb OperationalError: (sqlite3.OperationalError) unable to open database file
2019-01-23 10:57:49.437 14027 TRACE dnsdb
问题描述
[root@k8s-node1 local]# supervisorctl -c /etc/supervisord.conf
open-dnsdb FATAL Exited too quickly (process log may have details)
supervisor>
环境配置
centos7.5
python2.7
pip 19
复现步骤
1.
2.
3.
实际输出结果
[root@k8s-node1 local]# supervisorctl -c /etc/supervisord.conf
open-dnsdb FATAL Exited too quickly (process log may have details)
supervisor>
期望输出结果
问题描述
import-zone-records 操作,提示 添加zone omitted.zone 管理成功
但此时打开 普通域名 界面,出现报错提示
interval error, 'NoneType' object has no attribute 'group'
日志信息如下:
[2019-01-28 15:29:18 +0000] [26261] [DEBUG] GET /web/subnet/list/region
[2019-01-28 15:29:18 +0000] [26261] [DEBUG] GET /web/subnet/list/region
[2019-01-28 15:29:24 +0000] [26264] [DEBUG] GET /web/config/list/host_group
[2019-01-28 15:29:24 +0000] [26262] [DEBUG] GET /web/config/get/has_named_group
[2019-01-28 15:29:24 +0000] [26261] [DEBUG] GET /web/config/list/named_zone
[2019-01-28 15:29:24 +0000] [26263] [DEBUG] GET /web/config/list/zone_header
[2019-01-28 15:29:28 +0000] [26263] [DEBUG] GET /web/subnet/list/region
[2019-01-28 15:29:28 +0000] [26262] [DEBUG] GET /web/record/list/zone_ttl
2019-01-28 15:29:28.393 26262 ERROR dnsdb_common.library.decorators [-] func: list_zone_ttl, args: (), kwargs: {}
2019-01-28 15:29:28.393 26262 ERROR dnsdb_common.library.decorators [-] 'NoneType' object has no attribute 'group'
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators Traceback (most recent call last):
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators File "/app/open_dnsdb/dnsdb_common/library/decorators.py", line 89, in decorator
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators return resp(data=func(*kargs, **kwargs), is_json=is_json)
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators File "/app/open_dnsdb/dnsdb/view/web/record.py", line 154, in list_zone_ttl
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators return ZoneRecordDal.list_zone_ttl()
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators File "/app/open_dnsdb/dnsdb_common/dal/zone_record.py", line 50, in list_zone_ttl
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators for zone, header in db.session.query(DnsHeader.zone_name, DnsHeader.header_content)}
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators File "/app/open_dnsdb/dnsdb_common/dal/zone_record.py", line 50, in <dictcomp>
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators for zone, header in db.session.query(DnsHeader.zone_name, DnsHeader.header_content)}
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators AttributeError: 'NoneType' object has no attribute 'group'
2019-01-28 15:29:28.393 26262 TRACE dnsdb_common.library.decorators
环境配置
python = 2.7.15
centos 6
其他均按照文档安装
复现步骤
1.
2.
3.
实际输出结果
期望输出结果
问题描述
执行 tools/with_venv.sh python setup.py 报错
error in setup command: Error parsing /opt/open_dnsdb/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name dnsdb was given, but was not able to be found.
环境配置
x86_64 python3.6.8 pip 19.1.1
复现步骤
1.
2.
3.
实际输出结果
期望输出结果
问题描述
Listening at http://localhost:8081
(node:79545) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess.cp.once.code (/usr/local/open_dnsdb/dnsdb_fe/node_modules/opn/index.js:84:13)
at Object.onceWrapper (events.js:272:13)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Socket.stream.socket.on (internal/child_process.js:353:11)
at Socket.emit (events.js:180:13)
at Pipe._handle.close [as _onclose] (net.js:541:12)
(node:79545) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:79545) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
环境配置
npm -v
5.6.0
node -v
v9.11.2
复现步骤
1.
2.
3.
实际输出结果
期望输出结果
问题描述
mkdir -p /var/log/open_dnsdb/
问题描述
zone删除不彻底,页面上删除zone后,配置文件 /usr/local/open_dnsdb/tmp/var/named/chroot/etc/Master 和 Master_used中还存在
问题描述
dnsdb_fe 按教程启动后,首页能打开,但是右侧提示好多请求 404
环境配置
$ npm -v
6.14.10
$ node -v
v10.23.1
复现步骤
Request URL: http://x.x.x.x:8081/web/view/list/isp
Request Method: GET
Status Code: 404 Not Found
实际输出结果
期望输出结果
报错 No such command "deploy".
按照手册安装centos 7.51810
问题描述
在IE浏览器中访问http://localhost:9001,点击“操作日志”报错==》异常 状态码:undefined
在chrome类浏览器中访问正常。
问题描述
supervisor服务启动成功,进入客户端无进程;后单独执行启动脚本的命令报错:
open_dnsdb/tools/with_venv.sh: line 14: dnsdb: command not found
环境配置
python3,Vscode
复现步骤
1.执行supervisorctl -c /etc/supervisord.conf,无进程
2.执行open_dnsdb/tools/with_venv.sh dnsdb beta dnsdb,报错dnsdb: command not found
实际输出结果
如上
期望输出结果
服务启动成功
问题描述
2019-04-09 18:04:12.199 312 TRACE dns_updater.updater dnsdb_common.library.exception.UpdaterErr: No such directory: /usr/local/backup
启动open-dnsdb-zone-updater报错,提示没有/usr/local/backup 这个备份目录
建议在安装手册上加上 创建这个目录的步骤
mkdir -p /usr/local/backup
问题描述
启动open-dnsdb-conf-updater时报错如下:
2019-04-09 16:28:47.571 3988 TRACE dnsdb_updater_www requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /api/get/host_group (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8fa1a0d6a0>: Failed to establish a new connection: [Errno 111] Connection refused',))
主机组这些是添加过的,之前也启动成功过,之前是误打误撞修改了hosts反复测试,结果启动成功了。
这次我把之前修改的hosts(localhost解析到服务器真实IP)这条解析记录去掉,然后重新reload,发现启动失败了
看上面的日志发现是访问不了 localhost:9001这个借口,于是本地用curl测试:
发现locallocalhost是正常可以解析到127.0.0.1的,但是访问9001端口却被拒绝,然后用127.0.0.1测试正常能访问
确定是这个原因导致open-dnsdb-conf-updater失败报错的。
会不会和配置文件中
/usr/local/open_dnsdb/etc/beta/dnsdb-updater.conf
allow_ip = 127.0.0.1 这个配置项有关系
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.