Unhandled Exception

Is Virtual Radar Server not behaving itself? If so then please report it here.
Post Reply
Posts: 1
Joined: Wed Dec 27, 2017 6:25 pm

Unhandled Exception

Post by dcj » Wed Dec 27, 2017 7:02 pm


I am running VRS 2.4 on an Ubuntu 16.04 VM, using Mono.
I followed the installation directions on the website and it was very straightforward.
I get my data feed from a uAvionix pingStation.


Mostly VRS is working great.
Occasionally it seems to hang.
A couple of times I have seen unhandled exceptions, here is the last one I saw:

Code: Select all

Starting web server
Starting rebroadcast servers
Initialising UPnP manager
Initialising online lookup manager
Starting plugins
Local address:
Network address:
Press Q to quit
_wapi_connect: error looking up socket handle 0xb
Unhandled Exception Caught
VirtualRadar.Interface.WebServer.RequestException: Exception {System.NullReferenceException: Object reference not set to an instance of an object} caught during request for {/VirtualRadar/bundle-4d557563-f232-4173-a0ff-dc96518d5db3.js} - see inner exception for details
No stack trace
System.NullReferenceException: Object reference not set to an instance of an object
 at VirtualRadar.WebServer.WebServer.GetContextHandler (IAsyncResult asyncResult) <0x41525830 + 0x007a2> in <filename unknown>:0
Any ideas about what causes this, and is there any way to recover automatically?

One idea I had was to run VRS under a process monitor (e.g. Monit)
What test could I run against the VRS process to see if it is running or not?
Can it be configured to write a PID file that can be tested, OR, is there a URL I can access that would give me a simple heath check?
If I can configure Monit so it can determine if the VRS process is running or not, then I can get Monit to restart VRS in case of failure....

Posts: 1938
Joined: Fri Feb 17, 2012 3:20 am

Re: Unhandled Exception

Post by agw » Fri Jan 19, 2018 11:56 pm

Sorry for the late reply.

I imagine these errors might be coming up when a client disconnects at some early stage in the handling of the request. That tends to throw exceptions, VRS catches and throws away a whole bunch of them when it's getting the request context but NullReferenceException isn't one that I'd seen come up before. Then again the exceptions that I catch are the ones that you get in Windows.

That's all moot, the web server code has been rewritten for v3. It now uses Microsoft's Katana server and the web site is a set of OWIN middleware. The current preview uses this arrangement but be warned it's very new, I imagine there will be plenty of glitches that will need ironing out before a proper release... however, I have tested it on Ubuntu and it runs alright, the Microsoft bits don't seem to have any problems running under Mono.

Post Reply