acudovs / powergslb

PowerGSLB - PowerDNS Remote GSLB Backend
MIT License
104 stars 33 forks source link

DNS Refused #7

Closed portalizer closed 5 years ago

portalizer commented 5 years ago

I had problem with powergslb, i just installed following your tutorial and after installation finish i try to verify my powergslb, if i try use

nslookup example.com i got refused "cant find example.org: refused"

from log i found this

"SELECT names.name AS qname, types.type AS qtype, names_types.ttl, names_types.persistence, records.fallback, records.weight, contents_monitors.id, contents.content, views.rule FROM names JOIN names_types ON names.id = names_types.name_id JOIN types ON names_types.type_value = types.value JOIN records ON names_types.id = records.name_type_id JOIN contents_monitors ON records.content_monitor_id = contents_monitors.id JOIN contents ON contents_monitors.content_id = contents.id JOIN views ON records.view_id = views.id WHERE names.name = %s AND types.type = %s AND records.disabled = 0" % ('example.org.', 'SOA') Jan 29 15:35:03 GSLB-DNS powergslb: DEBUG: MySQLDatabase: 0 rows returned

if i try executre this syntax directly on DB this error appear ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s AND types.type = %s AND records.disabled = 0' at line 1

but if i change %s with text its work, please help me how to fix this

Thank

Herry

acudovs commented 5 years ago

Thank you for reporting. I suppose that this error is caused by the new version of PowerDNS, in which the format of the request to the backend server has changed. I'll check it out.

acudovs commented 5 years ago

Fixed in f449d10e763d34dadccc6d2963a13bdab71b543e. Please try latest version 1.6.6.