MantisBT - opensim |
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 |
|
Reporter | nebadon | |
Assigned To | | |
Priority | normal | Severity | block | Reproducibility | always |
Status | new | Resolution | open | |
Platform | | Operating System | | Operating System Version | |
Product Version | master (dev code) | |
Target Version | master (dev code) | Fixed in Version | | |
Git Revision or version number | |
Run Mode | Standalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim) |
Physics Engine | BasicPhysics |
Script Engine | |
Environment | Mono / Linux32, Mono / Linux64 |
Mono Version | 4.0 |
Viewer | |
|
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 :
http://opensim-dev.2196679.n2.nabble.com/DNS-lookup-and-caching-td7579882.html [^] |
Steps To Reproduce | |
Additional Information | http://stackoverflow.com/questions/21073103/resetting-dns-cache-in-c-sharp-mono [^]
http://stackoverflow.com/questions/7277582/how-do-i-clear-system-net-client-dns-cache [^]
|
Tags | No tags attached. |
Relationships | |
Attached Files | TestDNS.cs (1,556) 2015-07-23 04:28 http://opensimulator.org/mantis/file_download.php?file_id=4323&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2015-05-13 11:12 | nebadon | New Issue | |
2015-05-13 11:13 | nebadon | Description Updated | bug_revision_view_page.php?rev_id=4157#r4157 |
2015-05-13 11:16 | nebadon | Description Updated | bug_revision_view_page.php?rev_id=4158#r4158 |
2015-05-13 11:18 | nebadon | Additional Information Updated | bug_revision_view_page.php?rev_id=4160#r4160 |
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 | bug_revision_view_page.php?bugnote_id=28955#r4529 |
2015-08-03 10:37 | FreakyTech | Note Added: 0029084 | |
2016-05-13 18:29 | smxy | Note Added: 0030312 | |
Notes |
|
|
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. |
|
|
(0028955)
|
orenh
|
2015-07-23 04:27
(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).
Tested with:
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. |
|
|
(0030312)
|
smxy
|
2016-05-13 18:29
|
|
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. |
|