|Anonymous | Login | Signup for a new account||2019-01-16 19:50 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007566||opensim||[GRID] Grid Service||public||2015-05-13 11:12||2016-05-13 18:29|
|Product Version||master (dev code)|
|Target Version||master (dev code)||Fixed in Version|
|Summary||0007566: DNS Caching in Mono|
|Description||There seems to be some issues with people who run simulators on DHCP connections who use FQDN. If you teleport to or from one of those regions, the region IP address is cached on the other end (not the DHCP region) and when the DHCP region IP address eventually changes, Robust and other regions keep the old IP address cached in memory eternally and you can not log directly in or teleport from any region you had visited previously using old IP address, only when the robust service and other regions are restarted can this region be reached again. It does appear though that you can teleport from a region that has never been visited from this region and once you do this it does some how update will robust and direct log in becomes available again until the next IP change. There was some discussion previously on this topic noted below :|
|Additional Information||http://stackoverflow.com/questions/21073103/resetting-dns-cache-in-c-sharp-mono [^]|
|Tags||No tags attached.|
|Git Revision or version number|
|Run Mode||Standalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)|
|Environment||Mono / Linux32, Mono / Linux64|
|Attached Files||TestDNS.cs [^] (1,556 bytes) 2015-07-23 04:28|
|I imagine this could have some impact eventually on developing some kind of fail over or load balancing system as well where you are constantly shifting nodes around between different virtual machines or containers.|
I have tracked down a few sim crashes to exactly that problem of caching DNS entries forever within Mono.
The actual caching logic is in ServicePointManager within the System.Web namespace.
Especially with dynamic DNS entries, it tends to cache DNS lookups as long as the OpenSim instance is running. This fails all kinds of inter-sim communication.
It also affects the Grid server since Robust is also caching DNS entries due to that issue when running on Mono.
edited on: 2015-07-23 04:29
I can confirm that Mono *doesn't* cache DNS entries. I wrote a test program that performs a lookup for a certain hostname in an endless loop. This is a hostname under my control, with a low TTL (60 seconds). Then I changed the hostname's IP, and waited to see if the (running) Mono program will pick it up. It always did, usually within a minute (it took 90 seconds once).
Mono 3.10.0 (Amazon Linux)
Mono 3.2.8 (Ubuntu 14)
Mono 4.0.2 (Ubuntu 14)
By the way, I also tested in Windows (with .NET), and it didn't cache the DNS result either.
Both of the Linux computers I tested on were using a default installation (I used the default AMI's that Amazon EC2 provides).
The program is in the attached file "TestDNS.cs", in case anyone wants to replicate these tests.
The Test program does not prove anything. Since the caching is not happening with Dns.GetHostEntry(hostname).
It is in the ServicePointManager which gets used by WebRequest which is used for all HTTP Client requests in OpenSim.
So, you tested actually the wrong part.
|Oren, recently, my grid's IP address changed and no Kitely avatar was able to get to my grid, until Ilan had Kitely's Robust restarted and the problem went away immediately. So it sure seemed like Kitely was caching my old address somehow.|
|2015-05-13 11:12||nebadon||New Issue|
|2015-05-13 11:13||nebadon||Description Updated||View Revisions|
|2015-05-13 11:16||nebadon||Description Updated||View Revisions|
|2015-05-13 11:18||nebadon||Additional Information Updated||View Revisions|
|2015-05-13 14:32||nebadon||Note Added: 0028369|
|2015-05-17 11:51||FreakyTech||Note Added: 0028392|
|2015-07-23 04:27||orenh||Note Added: 0028955|
|2015-07-23 04:28||orenh||File Added: TestDNS.cs|
|2015-07-23 04:29||orenh||Note Edited: 0028955||View Revisions|
|2015-08-03 10:37||FreakyTech||Note Added: 0029084|
|2016-05-13 18:29||smxy||Note Added: 0030312|
|Copyright © 2000 - 2012 MantisBT Group|