binder icon indicating copy to clipboard operation
binder copied to clipboard

Support must be added before being able to support newly-encountered XML version 2.2.'

Open khowlette opened this issue 8 years ago • 8 comments

Getting error this running binder and click on my server that I created in the admin section. I'm testing under virtualenv and ran the requirements but get error below

Any ideas how I can fix this, thanks

pip list show these versions and I'm running on Ubuntu 14.04.4 LTS beautifulsoup4 (4.5.1) Django (1.8.16) dnspython (1.15.0) lxml (3.6.4) pip (7.1.2) pybindxml (0.6) setuptools (18.2) wheel (0.24.0)

'Support must be added before being able to support newly-encountered XML version 2.2.' Request Method: GET Request URL: http://172.17.200.111:8080/info/airlcdnstest01/ Django Version: 1.8.16 Exception Type: XmlError Exception Value: 'Support must be added before being able to support newly-encountered XML version 2.2.' Exception Location: /opt/dnstool/local/lib/python2.7/site-packages/pybindxml/reader.py in get_stats, line 68 Python Executable: /opt/dnstool/bin/python Python Version: 2.7.6 Python Path: ['/opt/binder/binder', '/opt/dnstool/lib/python2.7', '/opt/dnstool/lib/python2.7/plat-x86_64-linux-gnu', '/opt/dnstool/lib/python2.7/lib-tk', '/opt/dnstool/lib/python2.7/lib-old', '/opt/dnstool/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/opt/dnstool/local/lib/python2.7/site-packages', '/opt/dnstool/lib/python2.7/site-packages']

khowlette avatar Nov 10 '16 09:11 khowlette

What version of BIND are you running? XML version 2.2 strikes me as quite old.

jforman avatar Nov 12 '16 02:11 jforman

Hi its running on CentOS 7 says bind 9.9.4

rpm -qa | grep bind bind-license-9.9.4-29.el7_2.4.noarch rpcbind-0.2.0-33.el7_2.1.x86_64 bind-9.9.4-29.el7_2.4.x86_64 bind-utils-9.9.4-29.el7_2.4.x86_64 bind-libs-9.9.4-29.el7_2.4.x86_64 bind-libs-lite-9.9.4-29.el7_2.4.x86_64

khowlette avatar Nov 15 '16 09:11 khowlette

Any thought on this, would love to get this working

khowlette avatar Nov 25 '16 13:11 khowlette

9.9.4 is from >2 years ago (https://www.isc.org/blogs/bind-9-9-4-released/). Might you consider upgrading BIND to a version more recent?

To answer your question, the commit you're concerned with is from the library I use underneath Binder to process the BIND status XML (https://github.com/jforman/pybindxml/commit/bba5c1a5f04ecfb4f98000384adb4a74e80dc272). I removed support for <3.0 back in May 2016 as I was cleaning up the code. I'm honestly not to keen on adding it back in, given how old it is, and the added maintenance cost of that code.

jforman avatar Nov 25 '16 19:11 jforman

Thanks Jeff Seem like RHEL and CentOS only go up to 9.9.4 I think its to do with maintaining long term compatibility. Fedora does go to 9.10. Did think of installing the Fedora rpm's but it can introduce other dependency problems. I'm only testing at the moment so I may build a Ubuntu server instead to try out.

Keith

khowlette avatar Nov 28 '16 09:11 khowlette

Bind version: 9.12.0b2 Got error too, as below:


Request Method: | GET
-- | --
http://192.168.12.187:8000/info/192.168.12.150/
1.11.7
XmlError
'Support must be added before being able to support newly-encountered XML version 3.11.'
/root/Public/py2/local/lib/python2.7/site-packages/pybindxml/reader.py in get_stats, line 68
/root/Public/py2/bin/python
2.7.13
['/root/PycharmProjects/binder',  '/root/Public/py2/lib/python2.7',  '/root/Public/py2/lib/python2.7/plat-x86_64-linux-gnu',  '/root/Public/py2/lib/python2.7/lib-tk',  '/root/Public/py2/lib/python2.7/lib-old',  '/root/Public/py2/lib/python2.7/lib-dynload',  '/usr/lib/python2.7',  '/usr/lib/python2.7/plat-x86_64-linux-gnu',  '/usr/lib/python2.7/lib-tk',  '/root/Public/py2/local/lib/python2.7/site-packages',  '/root/Public/py2/lib/python2.7/site-packages']
Wed, 22 Nov 2017 01:00:16 -0500

Request Method: | GET
-- | --
http://192.168.12.187:8000/info/192.168.12.150/
1.11.7
XmlError
'Support must be added before being able to support newly-encountered XML version 3.11.'
/root/Public/py2/local/lib/python2.7/site-packages/pybindxml/reader.py in get_stats, line 68
/root/Public/py2/bin/python
2.7.13
['/root/PycharmProjects/binder',  '/root/Public/py2/lib/python2.7',  '/root/Public/py2/lib/python2.7/plat-x86_64-linux-gnu',  '/root/Public/py2/lib/python2.7/lib-tk',  '/root/Public/py2/lib/python2.7/lib-old',  '/root/Public/py2/lib/python2.7/lib-dynload',  '/usr/lib/python2.7',  '/usr/lib/python2.7/plat-x86_64-linux-gnu',  '/usr/lib/python2.7/lib-tk',  '/root/Public/py2/local/lib/python2.7/site-packages',  '/root/Public/py2/lib/python2.7/site-packages']
Wed, 22 Nov 2017 01:00:16 -0500



ghjacky avatar Nov 22 '17 06:11 ghjacky

I just find out the reader.py, and edit as below (added the elif fork for version 3.11 ....):

if self.xml_version == '3.0':
            self.stats = XmlV30(self.bs_xml)
        elif self.xml_version == '3.3':
            self.stats = XmlV33(self.bs_xml)
        elif self.xml_version == '3.5':
            self.stats = XmlV35(self.bs_xml)
        elif self.xml_version == '3.6':
            self.stats = XmlV36(self.bs_xml)
        elif self.xml_version == '3.11':
            self.stats = XmlV36(self.bs_xml)
        else:
            raise XmlError('Support must be added before being able to support newly-encountered XML version %s.' % self.xml_version)

ghjacky avatar Nov 22 '17 06:11 ghjacky

you may install pybindxml from https://github.com/Dunedan/pybindxml it has 2.2 compatibility and all works even on centos 7

grebnebo avatar Feb 09 '18 09:02 grebnebo