You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's strange is that I'm not seeing what Pingdom is seeing:
pingdom just told me it went down again, while it's responding for me, and logs show this request:
...
[2015-08-02T20:33:28.610Z] GET undefined / < 127.7.228.1 undefined
[2015-08-02T20:33:30.612Z] GET undefined / < 127.7.228.1 undefined
[2015-08-02T20:33:31.331Z] GET mathdown.net / < 127.7.228.1 Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)
[2015-08-02T20:33:32.617Z] GET undefined / < 127.7.228.1 undefined
[2015-08-02T20:33:34.620Z] GET undefined / < 127.7.228.1 undefined
The smart thing to is direct traffic (ynah right as if I have any) to Heroku until I figlre out the problem.
But I'm too tired to touch DNS now and not break everything. Will resume tomorrow.
There have been RHcloud maintainances - connectivity interruptions & restarting nodes - over the last couple days. But they're all finished. [https://openshift.redhat.com/app/status]
This might explain the earlier 503.
The confusing thing is that uptimerobot reports I'm up for the last 15h, and I can't reproduce a single error/slowness by curl from my machine or via webpagetest.
While Pingdom keeps telling me it's down/up/down — but provides no details :-(
YAY! I found the details in pingdom:
[private dashboard only] Reports => Uptime Reports =>
in Uptime Changes tab, every down line has a wrench & hammer icon which opens "Root Cause Analysis" including error & traceroute from 2 locations!
in Test Result Log tab hover on each line to see status; also offers CSV download.
pingdom causes
Predominantly "Timeout (> 30s)".
These are at TCP level ("Connection timed out HTTP CRITICAL - Unable to open TCP socket")!
Acommpanied by failing traceroutes that look like these:
traceroute to 23.22.44.129 (23.22.44.129), 30 hops max, 60 byte packets
1 184.75.208.209 (184.75.208.209) 0.215 ms 0.804 ms 1.141 ms
2 te0-7-0-9.220.ccr22.yyz02.atlas.cogentco.com (38.122.68.225) 0.868 ms 1.211 ms 1.470 ms
3 be2437.ccr22.alb02.atlas.cogentco.com (66.28.4.197) 9.456 ms 10.165 ms 10.429 ms
4 be2107.ccr42.jfk02.atlas.cogentco.com (154.54.3.93) 12.601 ms 13.482 ms 13.675 ms
5 be2057.ccr21.jfk10.atlas.cogentco.com (154.54.80.178) 12.867 ms 13.226 ms 13.428 ms
6 ntt.jfk10.atlas.cogentco.com (154.54.12.146) 13.196 ms 13.469 ms 13.797 ms
7 ae-10.amazon.nycmny01.us.bb.gin.ntt.net (129.250.201.134) 12.380 ms 12.329 ms 12.472 ms
8 54.240.229.76 (54.240.229.76) 16.170 ms 16.610 ms 16.769 ms
9 * 54.239.41.217 (54.239.41.217) 16.196 ms 18.930 ms
10 54.239.108.156 (54.239.108.156) 33.342 ms 34.090 ms 34.254 ms
11 54.239.108.143 (54.239.108.143) 18.972 ms 18.970 ms 19.290 ms
12 54.239.108.210 (54.239.108.210) 33.746 ms 34.094 ms 33.602 ms
13 54.239.108.235 (54.239.108.235) 19.256 ms 19.245 ms 19.781 ms
14 205.251.245.123 (205.251.245.123) 20.280 ms 20.666 ms 19.914 ms
15 * * *
16 * * *
17 * * *
18 216.182.232.167 (216.182.232.167) 16.881 ms 23.981 ms 24.483 ms
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
The first outage at 07/31/2015 10:48:40PM was described "Network error" but with same "Connection timed out HTTP CRITICAL - Unable to open TCP socket" sentence. traceroute:
traceroute to 23.22.44.129 (23.22.44.129), 30 hops max, 60 byte packets
1 23.106.98.1.rdns.cloudradium.com (23.106.98.1) 0.323 ms 0.649 ms 0.796 ms
2 23.111.249.1.rdns.as15003.net (23.111.249.1) 0.948 ms 1.069 ms 1.160 ms
3 xe-2-3-0.mpr1.ord6.us.zip.zayo.com (128.177.133.181) 1.261 ms 1.360 ms 1.451 ms
4 ae14.cr1.ord2.us.zip.zayo.com (64.125.24.230) 17.770 ms 18.276 ms 18.447 ms
5 ae4.er1.ord7.us.zip.zayo.com (64.125.28.50) 1.570 ms 1.700 ms 1.838 ms
6 equinix01-chi1.amazon.com (206.223.119.98) 3.169 ms 3.267 ms 3.471 ms
7 54.240.229.66 (54.240.229.66) 29.013 ms 28.400 ms 29.136 ms
8 54.240.228.238 (54.240.228.238) 25.349 ms 27.184 ms 27.633 ms
9 54.240.229.187 (54.240.229.187) 25.491 ms 25.998 ms 26.438 ms
10 54.240.228.167 (54.240.228.167) 23.901 ms 27.364 ms 26.830 ms
11 54.239.109.198 (54.239.109.198) 34.731 ms 30.043 ms 30.705 ms
12 54.239.109.185 (54.239.109.185) 25.305 ms 24.800 ms 24.778 ms
13 54.239.110.30 (54.239.110.30) 49.842 ms 49.749 ms 49.441 ms
14 54.239.110.63 (54.239.110.63) 24.031 ms 24.358 ms 25.228 ms
15 205.251.245.41 (205.251.245.41) 25.522 ms 25.205 ms 25.491 ms
16 * * *
17 * * *
18 * * *
19 216.182.224.199 (216.182.224.199) 32.997 ms 41.494 ms 41.784 ms
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
There are occasional HTTP 404s.
These are mostly drowned in the timeouts (pingdom lumps consecutive errors into one outage with one "root cause") but 08/02/2015 03:54:05PM is an example of one:
Request 1
GET / HTTP/1.0
User-Agent: Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)
Host: mathdown.net
Received header
404 Not Found
Date: Sun, 02 Aug 2015 12:54:07 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 278
Connection: close
Content-Type: text/html; charset=iso-8859-1
Received content
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL / was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at mathdown.net Port 443</address>
</body></html>
$ dig mathdown.net
; <<>> DiG 9.9.5-9ubuntu0.2-Ubuntu <<>> mathdown.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37178
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 5
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mathdown.net. IN A
;; ANSWER SECTION:
mathdown.net. 469438 IN A 52.7.66.21
;; AUTHORITY SECTION:
mathdown.net. 37438 IN NS cortney.ns.cloudflare.com.
mathdown.net. 37438 IN NS hugh.ns.cloudflare.com.
;; ADDITIONAL SECTION:
hugh.ns.cloudflare.com. 2929 IN A 173.245.59.117
hugh.ns.cloudflare.com. 26561 IN AAAA 2400:cb00:2049:1::adf5:3b75
cortney.ns.cloudflare.com. 29676 IN A 173.245.58.87
cortney.ns.cloudflare.com. 29676 IN AAAA 2400:cb00:2049:1::adf5:3a57
;; Query time: 16 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Mon Aug 03 10:47:36 IDT 2015
;; MSG SIZE rcvd: 203
(this is from my dnsmasq but it ultimately uses Google's 8.8.8.8 and direct dig mathdown.net 8.8.8.8 returns the same)
Pingdom thinks:
HTTP Error 404
08/03/2015 09:39:05AM
Hostname mathdown.net
Falkenberg, Sweden - Host resolved to 23.22.44.129
Las Vegas 3, NV - 54.175.90.51
I sampled some older Root Cause Analysis - they seem all to use 23.22.44.129.
reverse dns says all 3 are amazon EC2 hosts (ec2-52-7-66-21.compute-1.amazonaws.com. etc.).
Don't know why this happens yet but this is a lead as to why Pingdom sees different results!
Indeed:
$ curl --header 'Host: mathdown.net' 'http://52.7.66.21/?doc=demo' | grep MathJax
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3039 100 3039 0 0 8939 0 --:--:-- --:--:-- --:--:-- 8964
<script src="CodeMirror-MathJax/render-math.js"></script>
MathJax.Hub.Config({
<script src="MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe"></script>
$ curl --header 'Host: mathdown.net' 'http://23.22.44.129/?doc=demo' | grep MathJax
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:35 --:--:-- 0^\fish: Process 11710, “curl” “curl --header 'Host: mathdown.n…” terminated by signal SIGQUIT (Quit request from job control with core dump (^\))
$ curl --header 'Host: mathdown.net' 'http://54.175.90.51/?doc=demo' | grep MathJax
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 296 100 296 0 0 374 0 --:--:-- --:--:-- --:--:-- 374
~/mathdown (unsaved-warning) $ curl --header 'Host: mathdown.net' 'http://54.175.90.51/?doc=demo' -v
* Hostname was NOT found in DNS cache
* Trying 54.175.90.51...
* Connected to 54.175.90.51 (54.175.90.51) port 80 (#0)
> GET /?doc=demo HTTP/1.1
> User-Agent: curl/7.38.0
> Accept: */*
> Host: mathdown.net
>
< HTTP/1.1 302 Found
< Date: Mon, 03 Aug 2015 07:54:29 GMT
* Server Apache/2.2.15 (Red Hat) is not blacklisted
< Server: Apache/2.2.15 (Red Hat)
< Location: https://mathdown.net/app?doc=demo
< Content-Length: 296
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://mathdown.net/app?doc=demo">here</a>.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at mathdown.net Port 80</address>
</body></html>
* Connection #0 to host 54.175.90.51 left intact
Bingo! Got both timeout and 404 explained.
Alas, I can't see what IP pingdom uses when it succeeds.
But filtering Test Result Log to "up" shows only Atlanta, GA and Tampa (FL) recently, and Las Vegas 3 (NV) on August 1; filtering to "down" shows:
1 �Strasbourg (France)
24 St. Louis (MO)
25 Chicago (IL)
49 Las Vegas 3 (NV)
50 Strasbourg (France)
60 Atlanta (GA)
66 Falkenberg (Sweden)
67 Amsterdam 4 (Netherlands)
69 Toronto 3 (Canada)
73 Montreal (Canada)
78 Philadelphia (PA)
which is disjoint, except for Las Vegas 3. ("uncomfimed_down" gives a subset of "down" locations)
In other words, it seems some pingdom locations consistently get wrong DNS.
$ curl --header 'Host: mathdown.net' 'https://54.175.90.51/?doc=demo' -v --insecure
...
> GET /?doc=demo HTTP/1.1
> User-Agent: curl/7.38.0
> Accept: */*
> Host: mathdown.net
>
< HTTP/1.1 404 Not Found
< Date: Mon, 03 Aug 2015 08:12:38 GMT
* Server Apache/2.2.15 (Red Hat) is not blacklisted
< Server: Apache/2.2.15 (Red Hat)
< Content-Length: 278
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL / was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at mathdown.net Port 443</address>
</body></html>
CNAME mathdown.net is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CNAME www is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CNAME mathdown.com is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CNAME www is an alias of mathdown-cben.rhcloud.com TTL: Automatic
I've changed the CF config to explicit 2-5 min on the apex domains but they're still returning the 7-days TTL.
I'm going to contact CF but I'm also going to use the www.mathdown.net as the primary address (for now or for good?)
This outage is actually out of my hands (and was as soon as it happened).
AFAICT, Clouldflare DNS immediately (within minutes?) started returning the new correct IP,
but users that cached the old value within ~5 days before the IP change are still affected and there is nothing I can do to help them.
Time to estimate impact.
(it's returning the new correct IP still with huge TTL which might cause another outage if RHcloud moves me to another IP this week, and I'm leaving this bug open until I fix the TTL — but that's separate)
This is not as really bad outage as Pingdom paints it. But it is a big FAIL.
To be affected you have to have:
opened mathdown.net within a week before the IP change (Jul 31)
have the old IP still cached — or returned by upstream caching server — when opening it again.
It seems many OSes won't respect a TTL of 7 days (e.g. Windows seems by default to cache for at most 1 day), and browsers cache for minutes.
Could this have been avoided?
Yes, of course. Having a huge DNS TTL is stupid. I trusted CF's magic "automatic TTL" to be sane and hadn't checked what the server actually returns...
What took so long to debug
I don't have good monitoring, and I wasn't familiar with the minimal ones I have (haproxy, pingdom & uptimerobot).
Generally, debugging RHcloud is somewhat slow. I'm going to the deployment/README.md cheatsheet every time. Except this time, the server was 100% fine and I going there was a waste of time.
(Ah, and I started 2 days late — the downtime struck on Saturday, I went shopping on Sunday and only then started debugging...)
restarted my dnsmasq. though AFAIK, ubuntu configures it for several already to not cache at all.
it didn't matter — mathdown.{com,net} resolves to 52.7.66.21 :-(
aha! that's how my router (10.0.0.138) resolves them. let's restart it just for fun...
=> nope, same old ip :-(
aha, it's my ISP. the router's primary DNS is 91.205.152.204 = ns-cache1.018.net.il.
$ dig mathdown.com @ns-cache1.018.net.il.
...
;; ANSWER SECTION:
mathdown.com. 483002 IN A 52.7.66.21
;; AUTHORITY SECTION:
mathdown.com. 168572 IN NS ns1.dnsimple.com.
mathdown.com. 168572 IN NS ns3.dnsimple.com.
mathdown.com. 168572 IN NS ns2.dnsimple.com.
mathdown.com. 168572 IN NS ns4.dnsimple.com.
$ $ dig mathdown.net @ns-cache1.018.net.il.
...
;; ANSWER SECTION:
mathdown.net. 274727 IN A 52.7.66.21
;; AUTHORITY SECTION:
mathdown.net. 23911 IN NS hugh.ns.cloudflare.com.
mathdown.net. 23911 IN NS cortney.ns.cloudflare.com.
It's curious that it's legal(?) to return stale answer with current authority.
Anyway, it's "poisoned" for 5.6days more :-((
$ host us-east-1-a.route.herokuapp.com
us-east-1-a.route.herokuapp.com has address 54.243.169.242
OK, not so simple. They're not returning all DNS addresses (because client side dns balancing is meh and dns failover is beh) but returning a single varying IP, probably based on geolocation(?).
Long DNS TTLs are EVIL. They poison everything, contamination symptoms are user-specific and there is little to do but wait.
RHcloud IPs tend to shift, and they don't know how to do zero-downtime migrations (could have started a new instance before rebooting mine). If you're not hitting the Haproxy gear, you can't access the app.
Heroku exposes IPs for its HTTP routers, shared by all(?) apps. I presume those are rather stable, so I imagine that if Heroku rebooted & migrated my app, users would be entirely shielded from that!
Life was much simpler when I used GH Pages :-\ Actually there were some downtime (worse than heroku, better thah RHcloud), but none of this DNS mess. It has to do with shared-IP-for-all-pages approach.
Apex domains are probably OK, and I need them to work anyway, but I've had enough. Let's redirect to www as the canonical.
For now, I'm staying on Heroku. Going to switch to $7/mo hobby plan before my free 18h/day run out...
Whoops. HTTPS://www.mathdown.net/ works. HTTPS://www.mathdown.com/ doesn't, presents cert for *.herokuapp.com.
For the 2 apex domains it's hard to check. => with good IP in /etc/hosts, they also don't have the cert.
summary from #113:
turns out I never had heroku SSL, it costs $20/mo for .net and adding .com would be $20 more and messy hackish config.
=> gave Heroku the .net cert and returned .com to RHcloud.
also lowered all TTLs on DNSimple to 1min.
Challange to myself:
The OpenShift Online Operations Team has scheduled a maintenance window for
13 Aug 2015.
...
Can I avoid/reduce downtime (e.g. by pointing at Heroku for the time)? Requires ability to change DNS with short TTL...
Activity
cben commentedon Aug 2, 2015
What's strange is that I'm not seeing what Pingdom is seeing:
pingdom just told me it went down again, while it's responding for me, and logs show this request:
cben commentedon Aug 2, 2015
The smart thing to is direct traffic (ynah right as if I have any) to Heroku until I figlre out the problem.
But I'm too tired to touch DNS now and not break everything. Will resume tomorrow.
cben commentedon Aug 3, 2015
haproxy reports both gears as
1d8h UP.cben commentedon Aug 3, 2015
however haproxy's count of response codes (hover over the underlined number in Sessions > Total column) is not so good:
Now a legitimate source of 404s is
favicon.icohits but those can't explain so much 404s.I don't think I see those 300 and 404s in logs => do I log non-200 requests? [#78]
I do see favicon hits but less than 60 over these 2 days.
cben commentedon Aug 3, 2015
There have been RHcloud maintainances - connectivity interruptions & restarting nodes - over the last couple days. But they're all finished. [https://openshift.redhat.com/app/status]
This might explain the earlier 503.
The confusing thing is that uptimerobot reports I'm up for the last 15h, and I can't reproduce a single error/slowness by curl from my machine or via webpagetest.
While Pingdom keeps telling me it's down/up/down —
but provides no details :-(YAY! I found the details in pingdom:
[private dashboard only] Reports => Uptime Reports =>
pingdom causes
These are at TCP level ("Connection timed out HTTP CRITICAL - Unable to open TCP socket")!
Acommpanied by failing traceroutes that look like these:
These are mostly drowned in the timeouts (pingdom lumps consecutive errors into one outage with one "root cause") but 08/02/2015 03:54:05PM is an example of one:
Request 1
Received header
Received content
Interesting!
pingdom CSV dump
cben commentedon Aug 3, 2015
Aha!
(this is from my dnsmasq but it ultimately uses Google's 8.8.8.8 and direct
dig mathdown.net 8.8.8.8returns the same)Pingdom thinks:
I sampled some older Root Cause Analysis - they seem all to use 23.22.44.129.
reverse dns says all 3 are amazon EC2 hosts (
ec2-52-7-66-21.compute-1.amazonaws.com.etc.).Don't know why this happens yet but this is a lead as to why Pingdom sees different results!
Indeed:
Bingo! Got both timeout and 404 explained.
Alas, I can't see what IP pingdom uses when it succeeds.
But filtering Test Result Log to "up" shows only Atlanta, GA and Tampa (FL) recently, and Las Vegas 3 (NV) on August 1; filtering to "down" shows:
1 �Strasbourg (France)
24 St. Louis (MO)
25 Chicago (IL)
49 Las Vegas 3 (NV)
50 Strasbourg (France)
60 Atlanta (GA)
66 Falkenberg (Sweden)
67 Amsterdam 4 (Netherlands)
69 Toronto 3 (Canada)
73 Montreal (Canada)
78 Philadelphia (PA)
which is disjoint, except for Las Vegas 3. ("uncomfimed_down" gives a subset of "down" locations)
In other words, it seems some pingdom locations consistently get wrong DNS.
cben commentedon Aug 3, 2015
Sorry, that last curl gave 302 to https://mathdown.net (nice, I didn't think I have redirects? But I think it's simply hitting an entirely unrelated server!)
But doing https to this IP gives the 404:
cben commentedon Aug 3, 2015
https://www.whatsmydns.net/#A/mathdown.net gives the working 52.7.66.21 world-wide.
So does https://cloudmonitor.ca.com/en/ping.php from 90 locations (exception: "China - Shanghai (cnsha02) Unknown host: mathdown.net")
So does https://www.nexcess.net/resources/tools/global-dns-checker/?h=mathdown.net&t=A
=> Theory: currently DNS is correct but Pingdom remembers an old value (too high TTL?) before the RHcloud IP changed (during recent maintainance?).
cben commentedon Aug 3, 2015
relevant DNS config at cloudflare:
CNAME mathdown.net is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CNAME www is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CNAME mathdown.com is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CNAME www is an alias of mathdown-cben.rhcloud.com TTL: Automatic
CF support exlains that "Automatic TTL" means ~5min.
https://support.cloudflare.com/hc/en-us/articles/200168866-What-does-the-Automatic-TTL-value-mean-
Alas, it seems CF's "CNAME flattening" also sets a huge TTL of 7 days :-(
(same with mathdown.COM)
whereas the www. domains are good:
Update DNS zone files reflecting current Cloudflare config.
cben commentedon Aug 3, 2015
I've changed the CF config to explicit 2-5 min on the apex domains but they're still returning the 7-days TTL.
I'm going to contact CF but I'm also going to use the www.mathdown.net as the primary address (for now or for good?)
[-]recurring outage for most of last 2 days[/-][+]long outage: wrong DNS cached for a week[/+]cben commentedon Aug 3, 2015
Post-mortem
This outage is actually out of my hands (and was as soon as it happened).
AFAICT, Clouldflare DNS immediately (within minutes?) started returning the new correct IP,
but users that cached the old value within ~5 days before the IP change are still affected and there is nothing I can do to help them.
Time to estimate impact.
(it's returning the new correct IP still with huge TTL which might cause another outage if RHcloud moves me to another IP this week, and I'm leaving this bug open until I fix the TTL — but that's separate)
This is not as really bad outage as Pingdom paints it. But it is a big FAIL.
To be affected you have to have:
It seems many OSes won't respect a TTL of 7 days (e.g. Windows seems by default to cache for at most 1 day), and browsers cache for minutes.
Could this have been avoided?
Yes, of course. Having a huge DNS TTL is stupid. I trusted CF's magic "automatic TTL" to be sane and hadn't checked what the server actually returns...
What took so long to debug
I don't have good monitoring, and I wasn't familiar with the minimal ones I have (haproxy, pingdom & uptimerobot).
Generally, debugging RHcloud is somewhat slow. I'm going to the deployment/README.md cheatsheet every time. Except this time, the server was 100% fine and I going there was a waste of time.
(Ah, and I started 2 days late — the downtime struck on Saturday, I went shopping on Sunday and only then started debugging...)
14 remaining items
cben commentedon Aug 13, 2015
added all 4 domains to heroku, now www.mathdown.com works too.
cben commentedon Aug 13, 2015
restarted my dnsmasq. though AFAIK, ubuntu configures it for several already to not cache at all.
it didn't matter — mathdown.{com,net} resolves to 52.7.66.21 :-(
aha! that's how my router (10.0.0.138) resolves them. let's restart it just for fun...
=> nope, same old ip :-(
aha, it's my ISP. the router's primary DNS is 91.205.152.204 = ns-cache1.018.net.il.
It's curious that it's legal(?) to return stale answer with current authority.
Anyway, it's "poisoned" for 5.6days more :-((
cben commentedon Aug 13, 2015
https://dnschecker.org/#A/mathdown.net or https://www.whatsmydns.net/#A/mathdown.com
show a mess of very many resolved addresses:
4 184.73.165.155
2 23.21.201.133
1 23.23.255.154
2 23.23.255.221
4 54.197.235.183
1 54.204.1.127
2 54.243.114.196
1 54.243.163.2
1 54.243.169.242
1 54.243.224.121
5 54.243.45.241
But let's see, I think these are all Heroku:
OK, not so simple. They're not returning all DNS addresses (because client side dns balancing is meh and dns failover is beh) but returning a single varying IP, probably based on geolocation(?).
https://dnschecker.org/#A/us-east-1-a.route.herokuapp.com doesn't match up.
But let's test them (fish syntax):
=> All work :-)
Headers are unclear:
but Cowboy is an Erlang server rumored to be used by Heroku...
cben commentedon Aug 13, 2015
Lessons
For now, I'm staying on Heroku. Going to switch to $7/mo hobby plan before my free 18h/day run out...
cben commentedon Aug 13, 2015
Whoops.
HTTPS://www.mathdown.net/ works.
HTTPS://www.mathdown.com/ doesn't, presents cert for *.herokuapp.com.
For the 2 apex domains it's hard to check. => with good IP in /etc/hosts, they also don't have the cert.
cben commentedon Aug 13, 2015
aha: I was wondering why https://www.mathdown.net worked if heroku had no certs provisioned at all?
that's because my computer/ISP still resolve it to RHcloud (new IP)...
cben commentedon Aug 13, 2015
summary from #113:
turns out I never had heroku SSL, it costs $20/mo for .net and adding .com would be $20 more and messy hackish config.
=> gave Heroku the .net cert and returned .com to RHcloud.
also lowered all TTLs on DNSimple to 1min.
cben commentedon Aug 13, 2015
BTW,
Challenge FAILED.
notice about #104
cben commentedon Sep 10, 2015
So closing this.
Remove DNS warning (#104).
CloudFlare say they fixed TTL with CNAME flattening