Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007566opensim[GRID] Grid Servicepublic2015-05-13 11:122016-05-13 18:29
Assigned To 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Version 
Summary0007566: DNS Caching in Mono
DescriptionThere 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 [^] [^]

TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics
Script Engine
EnvironmentMono / Linux32, Mono / Linux64
Mono Version4.0
Attached Files? file icon TestDNS.cs [^] (1,556 bytes) 2015-07-23 04:28

- Relationships

-  Notes
nebadon (administrator)
2015-05-13 14:32

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.
FreakyTech (reporter)
2015-05-17 11:51

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.
orenh (administrator)
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.

FreakyTech (reporter)
2015-08-03 10:37

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.
smxy (reporter)
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.

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker