It's all in the name
(Posted 14:04:34 on 5th December 2022 by Rag)
Not really sure why I'm writing this up as I doubt I'll remember I wrote it up if the same thing ever happens again. Anyway, for those observant among you, you will have noticed that last week's mail message was late going out (~12 hours). It didn't send automatically, so need to investigate.
First thing, did the job run - yes it ran and completed successfully. Hmmm, how can that be? Well, it did run and everything ran right except the actual emails never got sent. OK, try to recreate. I've created a bunch of tools to troubleshoot the background jobs. In this instance I can send a test weekly message with a front end view to each process and it only goes to me. Ran that and it failed to create the message because it couldn't connect to host eastbayrag.com. Hey, what? It can't connect to itself, don't be silly ....
... open web browser and connect to eastbayrag.com .... times out and can't connect. Try on work computer and it works fine, the website is there and up and running fine. Which it has to be, otherwise I couldn't connect to run the tools. Connect to site on ipad - fine. Connect to site on phone - fine. Connect on home laptop - fails. Weird ... ok, what's changed. Well, I've been setting up a linux machine, maybe I've buggered something up. Start linux machine and connect on that - fine. What's the pattern? Well, it's connecting from IOS, Android and Linux, but not from either of the windows machines on my home network. It does connect from the windows machine that is VPN'd through work. OK, try gaming machine which is on windows - yup, failed. OK, definitely a windows thing it would seem.
Technical bit - when you connect to the website, you connect to the IP address of the website. When connecting to my own website, it's sending me back to myself. So, figured windows may have updated some firewall rules or something to prevent the system from accessing itself.
Ping eastbayrag.com and tracert eastbayrag.com both work fine, so I know the machine knows where to route the traffic. It literally just won't load in a browser.
Let's hit Google for the answer. Obviously this scenario is very specific and quite hard to search, but getting lots of hits for machines loosing connection to some sites, so I start flushing the DNS and resetting the ipconfig and trying a whole bunch of stuff - nothing works.
Moved laptop into other room as cleaner was here and suddenly it worked. What the fuck? Plug it back in and it doesn't work again. Wait, what? Now I realize that all the machines that don't work are hard wired into the router and the machines that do work are wirelessly connected to the router. Put one of the other machines on wireless and it works fine.
OK, now we're getting somewhere - it's clearly a router problem and something to do with the hard wired part of the router which makes no sense as the hard wired computers are working fine with the exception of the fact that they can't connect to my own website either by using the domain or the external IP address. Using the internal IP address works (I checked that somewhere along the line).
I spent ages searching for the answer, plugging and unplugging computers, switches, routers etc. Re-mapping IP addresses and going mad as it doesn't make sense. I had the router config open and was looking through things in that and I randomly noticed that the router name had gone back to a default of Linksysxxxxx where xxxxx are some random numbers. I looked at my computer and it said it's connected to RagNet which is what the router was named. I renamed the router back to RagNet and everything works.
I still don't totally understand why it didn't work in that everything worked fine except being able to browse my own site. Best I can come up with is that the computer goes "I want to connect to eastbayrag.com", it sends that to the DNS and the DNS says "that's you mate". Computer then goes "oh right, yeah, let me look at my network, RagNet are you there?" And the router doesn't respond, because it's forgotten its name.