GithubHelp home page GithubHelp logo

acudovs / powergslb Goto Github PK

View Code? Open in Web Editor NEW
100.0 100.0 32.0 4.13 MB

PowerGSLB - PowerDNS Remote GSLB Backend

License: MIT License

Python 71.40% HTML 0.63% JavaScript 24.79% Shell 2.93% Dockerfile 0.25%

powergslb's People

Contributors

acudovs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

powergslb's Issues

DNS REFUSED, but not consistent...

Hey - im using the Docker image (slightly modified - without MySQL - to use a remote DB).

Version: 1.7.3

PDNS Logs:

[root@2941be3ee5ef /]# systemctl status pdns.service
● pdns.service - PowerDNS Authoritative Server
   Loaded: loaded (/usr/lib/systemd/system/pdns.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-02-03 00:03:32 CET; 13h ago
     Docs: man:pdns_server(1)
           man:pdns_control(1)
           https://doc.powerdns.com
 Main PID: 27 (pdns_server)
   CGroup: /docker/2941be3ee5ef0cdb13a95ea8a10437d40e3d5c410cd55bff45043fe4d6cc5cb8/system.slice/pdns.service
           └─27 /usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no

Feb 03 09:45:18 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:13:14 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:33:59 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:34:03 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:34:12 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:51:19 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:52:30 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 10:53:35 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 13:21:59 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading
Feb 03 13:22:48 2941be3ee5ef pdns_server[27]: While reading from HTTP endpoint 127.0.0.1:8080: EOF while reading

PowerGLSB Logs:

Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-82: MySQLDatabase: "SELECT `names`.`name` AS `qname`, `types`.`type` AS `qtype`, `names_types`.`ttl`, `names_types`.`p... ON `names`.
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: ERROR: Thread-82: HTTPRequestHandler: OperationalError: MySQL Connection not available.
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: MySQLDatabase: "SELECT `names`.`name` AS `qname`, `types`.`type` AS `qtype`, `names_types`.`ttl`, `names_types`.`p... ON `names`.
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: MySQLDatabase: 0 rows returned
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: 127.0.0.1 - - [03/Feb/2020 13:25:56] "GET /dns/lookup/io%2e/SOA HTTP/1.1" 200 -
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: HTTPRequestHandler: {"result":[]}
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: MySQLDatabase: "SELECT `names`.`name` AS `qname`, `types`.`type` AS `qtype`, `names_types`.`ttl`, `names_types`.`p... ON `names`.
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: MySQLDatabase: 0 rows returned
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: 127.0.0.1 - - [03/Feb/2020 13:25:56] "GET /dns/lookup/%2e/SOA HTTP/1.1" 200 -
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: HTTPRequestHandler: {"result":[]}

My command, sometimes its working (AND the LOG seems to be correct) but sometimes the request to powergslb is not showing the full domain but the TLD..

Like you see, it should be example.io and not .io:

Feb 03 13:25:56 2941be3ee5ef powergslb[18]: 127.0.0.1 - - [03/Feb/2020 13:25:56] "GET /dns/lookup/io%2e/SOA HTTP/1.1" 200 -
Feb 03 13:25:56 2941be3ee5ef powergslb[18]: DEBUG: Thread-93: HTTPRequestHandler: {"result":[]}

If i wait like 3 minutes, the requests seems to be fine (i did not change my dig command)...

// EDIT:

Maybe there is a issue with the MySQL connection manager/pool?

Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-94: MySQLDatabase: "SELECT `names`.`name` AS `qname`, `types`.`type` AS `qtype`, `names_types`.`ttl`, `names_types`.`persistence`, `r
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: ERROR: Thread-94: HTTPRequestHandler: OperationalError: MySQL Connection not available.
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-97: MySQLDatabase: "SELECT `names`.`name` AS `qname`, `types`.`type` AS `qtype`, `names_types`.`ttl`, `names_types`.`persistence`, `r
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-97: MySQLDatabase: 0 rows returned
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: 127.0.0.1 - - [03/Feb/2020 13:52:16] "GET /dns/lookup/io%2e/SOA HTTP/1.1" 200 -
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-97: HTTPRequestHandler: {"result":[]}
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-97: MySQLDatabase: "SELECT `names`.`name` AS `qname`, `types`.`type` AS `qtype`, `names_types`.`ttl`, `names_types`.`persistence`, `r
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-97: MySQLDatabase: 0 rows returned
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: 127.0.0.1 - - [03/Feb/2020 13:52:16] "GET /dns/lookup/%2e/SOA HTTP/1.1" 200 -
Feb 03 13:52:16 2941be3ee5ef powergslb[18]: DEBUG: Thread-97: HTTPRequestHandler: {"result":[]}

(You see the error there? HTTPRequestHandler: OperationalError: MySQL Connection not available.)

I used a personal/service account for this on my remote DB but i also tried with root which is not working too.
My database is a MariaDB Server. 10.4.6-MariaDB-1:10.4.6+maria~bionic :)

Regards
SeaLife

powergslb 1.7.1 is not working with pdns-4.1.10

I installed powergslb 1.7.1 as your guide for 'Installation on CentOS 7', but, it did not work.
I tried to find the problem and eventually found that the pdns version was the problem.

in /var/log/messages/
pdns-4.1.10

Jul 15 17:22:57 **** powergslb: DEBUG: Thread-1: MySQLDatabase: "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%2ecom%2e', 'SOA')

pdns-4.1.6

Jul 15 17:33:10 **** powergslb: DEBUG: Thread-2: MySQLDatabase: "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.com', 'SOA')

I think that 'example%2ecom%2e' is the problem.

How can i solve this problem?

Thanks

Not able to dig new domain

Hi,

I have installed the new version and now the template domains are responding to the DNS queries. I have added a new domain to the server from the panel. After, adding the new domain and a new A record, I was not able to dig the newly added domain. I was getting the following error.

Aug  1 12:51:01 ip-172-31-38-17 powergslb: DEBUG: Thread-2: MySQLDatabase: 0 rows returned
Aug  1 12:51:01 ip-172-31-38-17 powergslb: 127.0.0.1 - - [01/Aug/2019 12:51:01] "GET /dns/lookup/nl%2e/SOA HTTP/1.1" 200 -
Aug  1 12:51:01 ip-172-31-38-17 powergslb: DEBUG: Thread-2: HTTPRequestHandler: {"result":[]}
Aug  1 12:51:01 ip-172-31-38-17 powergslb: DEBUG: Thread-2: MySQLDatabase: "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" % ('', 'SOA')
Aug  1 12:51:01 ip-172-31-38-17 powergslb: DEBUG: Thread-2: MySQLDatabase: 0 rows returned
Aug  1 12:51:01 ip-172-31-38-17 powergslb: 127.0.0.1 - - [01/Aug/2019 12:51:01] "GET /dns/lookup/%2e/SOA HTTP/1.1" 200 -
Aug  1 12:51:01 ip-172-31-38-17 powergslb: DEBUG: Thread-2: HTTPRequestHandler: {"result":[]}

Can you check on this.

not possible to delete a domain

Hi Alexey.
Thanks a lot for your project. I'm just trying to use your program. Currently it's not possible to delete a domain due to constraint in database. there are no records at all.

error message is :

1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (powergslb.names, CONSTRAINT names_domains_id_fk FOREIGN KEY (domain_id) REFERENCES domains (id))

Thanks!

ICMP monitor not working

Hello,
Great GSLB addon for PowerDNS, really like it, good job.

The ICMP monitor is not working correctly, it show status "on" even when the IP address is not reachable.
The other monitor checks like HTTP via ports 80 or 443 works perfectly.

Regards,
Bernd

Paid support of the software

Hello, Alexsey!
We are going to install powergslb in our infrastructure. We need to make some fixes in it and also we are interested in paid support of it. Can we discuss it with you? If so please send me email to iprok at kinetiksoft dot com .

With best regards, Ivan.

can we use remote MYSQL

thanks for your great work.
we are using your project for a long time.
but recently we want to separate the web and db.
we've tried many node, and even larged the connect time, but always get Mysql connect not available notice when refresh the pages.
is there any solution?

thanks

SSL Version 2 and 3 Protocol

Hello,
I want to ask, is it possible to disable SSL Version 2 and 3 on the https powergslb service? If so, can you tell me where to change the config?
Thanks

Cannot build docker image

Hello,

I tried to build your powerslbl to create a docker container, but it failed.

I have a MySQL cluster setup and would like to run your docker-pdns to connect to it as well.

Is there a docker image available on Docker Hub (https://hub.docker.com/)

Maybe I can pull it from there?

Thanks,
Lonnie

Quorum for tests and some other questions

Hello!

The first question is "Why don't you accept pull request #5 (I've just done #12 when merge conflicts are resolved) ?" It seems to be very usefull. May be there are some reasons that I haven't got?

And the main question is "What will be if I get some network problems on the server when powergslb installed?"
For example I have ns1-ns5.server.my . powergslb is installed on ns1.server.my.
I have tests by icmp in powergslb for my records. If something happens with network on ns1.server.my all tests will fail and this can be huge problem. As decision I see to setup several instances of powergslb which use common mysql database (or galera cluster) and record should be removed only after quorum: most of instances "agree" that the test have failed.
I see words "Multi-Master DNS GSLB using native MySQL / MariaDB Galera Cluster" in the feature list. I can suggest that there is something I've just decribed already implemented cause without it there is completely no sense to use powergslb with multi-master cluster.
If so please be so kind and describe it in short words.
If not, how do you think will it be hard to implement? I'm really going to hire somebody to add this feature.

Best regards, Ivan.

DNS Refused

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

Pull requests?

Is this repository still accepting PR's? I'm wondering if we can still contribute to this main repo?

HA setup

is powergslb also Highly available?

what happens if the node hostins powergslb goes down? will other nodes take over the role of DNS servers? and will the zone lists be in sync with the primary?

also, how would the secondary announce the takeover to upstream Recursive DNSs ?

ICMP monitor not working ( ping)

Hello,

The ICMP monitor is not working correctly, it show status "on" even when the IP address is not reachable.
The other monitor checks like TCP , HTTP work

thnaks a lot
centos 7.9

Any View other than 0.0.0.0/0 not working

When I change the view on the example.com SOA to anything other than Public (0.0.0.0/0), I receive refused when I dig for anything in the example.com domain. When I change it back to Public it works.

PowerGSLB version 1.7.4

balance weight record

In Route53 there is balancing, here always return 192.0.2.104.

Is it possible to balance in 192.0.2.104 and 192.0.2.103?
192.0.2.104 size is 2, 192.0.2.103 is 1. Should get out more 192.0.2.104 instead 192.0.2.103

powergslb

use public SSL

Hi Aleksy

How to use public SSL like DigiCert to verify https on powerGSLB.
i have try to replace .pem at /etc/powergslb but after change i cant access web and it will back normal if i change back using old .pem

this crt i have
domain.crt
AddTrust_External_CA_Root.crt
USERTrust_RSA_Certification_Authority.crt

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.