Hi,
I have done the polaris installation and followed all the steps mentioned.
Used dig command to check the desire output and I think I am getting proper result.
But after that there is nothing in the documentation what to do. I have setup a DNS and trying to open with http but it is not giving the expected output.
Please find below the steps I have done:
- Setup the Polaris GSLB. Below is the polaris-lb.yaml configuration:
pools:
www-gslbpoc:
monitor: http
monitor_params:
use_ssl: false
hostname: myservice.gslbpoc.com
url_path: /gslb/health
port: 8080
expected_codes:
- 200
lb_method: wrr
fallback: any
members:
- ip: 10.247.10.1
name: www1-dc1
weight: 1
- ip: 10.247.20.1
name: www2-dc2
weight: 1
globalnames:
myservice.gslbpoc.com:
pool: www-gslbpoc
ttl: 1
Output of "polaris-memcache-control 127.0.0.1 get-ppdns-state":
{
"globalnames": {
"myservice.gslbpoc.com": {
"pool_name": "www-gslbpoc",
"ttl": 1
}
},
"pools": {
"www-gslbpoc": {
"dist_tables": {
"_default": {
"index": 1,
"rotation": [
"10.247.10.1",
"10.247.20.1"
],
"num_unique_addrs": 2
}
},
"fallback": "any",
"status": true,
"max_addrs_returned": 1,
"lb_method": "wrr"
}
},
"timestamp": 1557494215.115039
}
Output of "polaris-memcache-control 127.0.0.1 get-generic-state":
{
"timestamp": 1557494214.7694283,
"globalnames": {
"myservice.gslbpoc.com": {
"name": "myservice.gslbpoc.com",
"pool_name": "www-gslbpoc",
"ttl": 1
}
},
"pools": {
"www-gslbpoc": {
"name": "www-gslbpoc",
"monitor": {
"timeout": 5,
"name": "http",
"hostname": "myservice.gslbpoc.com",
"use_ssl": false,
"interval": 10,
"url_path": "/gslb/health",
"retries": 2,
"expected_codes": [
200
],
"port": 8080
},
"members": [
{
"name": "www1-dc1",
"status_reason": "monitor passed",
"retries_left": 2,
"status": true,
"monitor_ip": "10.247.10.1",
"ip": "10.247.10.1",
"region": "None",
"weight": 1
},
{
"name": "www2-dc2",
"status_reason": "monitor passed",
"retries_left": 2,
"status": true,
"monitor_ip": "10.247.20.1",
"ip": "10.247.20.1",
"region": "None",
"weight": 1
}
],
"fallback": "any",
"max_addrs_returned": 1,
"last_status": true,
"lb_method": "wrr"
}
}
}
Output of "dig @polaric-gslb-ip myservice.gslbpoc.com":
Ran it multiple time and got both the ips in the output.
; <<>> DiG 9.9.4-RedHat-9.9.4-73.el7_6 <<>> @polaric-gslb-ip myservice.gslbpoc.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10857
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;myservice.gslbpoc.com. IN A
;; ANSWER SECTION:
myservice.gslbpoc.com. 1 IN A 10.247.20.1
;; Query time: 0 msec
;; SERVER: polaric-gslb-ip#53(polaric-gslb-ip)
;; WHEN: Mon May 13 09:27:21 IDT 2019
;; MSG SIZE rcvd: 66
; <<>> DiG 9.9.4-RedHat-9.9.4-73.el7_6 <<>> @polaric-gslb-ip myservice.gslbpoc.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3441
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;myservice.gslbpoc.com. IN A
;; ANSWER SECTION:
myservice.gslbpoc.com. 1 IN A 10.247.10.1
;; Query time: 0 msec
;; SERVER: polaric-gslb-ip#53(polaric-gslb-ip)
;; WHEN: Mon May 13 09:27:23 IDT 2019
;; MSG SIZE rcvd: 66
- Tried to ran the below command but not able to get expected output:
[root@rhel7 ~]# curl -v http://polaric-ip:80
About to connect() to polaric-ip port 80 (#0)
Trying polaric-ip...
Connection refused
Failed connect to polaric-ip:80; Connection refused
Closing connection 0
curl: (7) Failed connect to polaric-ip:80; Connection refused
[root@rhel7 ~]# curl -v http://polaric-ip:8080
About to connect() to polaric-ip port 8080 (#0)
Trying polaric-ip...
Connection refused
Failed connect to polaric-ip:8080; Connection refused
Closing connection 0
curl: (7) Failed connect to polaric-ip:8080; Connection refused
[root@rhel7 ~]# curl -v http://myservice.gslbpoc.com:80
Could not resolve host: myservice.gslbpoc.com; Unknown error
Closing connection 0
curl: (6) Could not resolve host: myservice.gslbpoc.com; Unknown error
[root@rhel7 ~]# curl -v http://myservice.gslbpoc.com:8080
Could not resolve host: myservice.gslbpoc.com; Unknown error
Closing connection 0
curl: (6) Could not resolve host: myservice.gslbpoc.com; Unknown error
Please let me know if I missed any step.