Various errors on start

Bug reports and questions about running Virtual Radar Server on Linux
Post Reply
dashie
Posts: 1
Joined: Fri May 20, 2016 2:22 pm

Various errors on start

Post by dashie » Fri May 20, 2016 2:41 pm

Hello,

Setup : I use VRS on a local server using Mono to generate a config file, then I upload the config to a remote linux server where I use the -nogui switch to run headless.
A windows VRS is broadcasting to the remote to web display.

The problem is with the remote linux VRS, running mono : Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10).

I got some errors on start and logos / silhouettes are just blank images and I think I have the right directory structure...
(VRS doesn't seems to success to make an external web call, but I have no restrictions and I can do them manually and it works !)

Config file .local/share/VirtualRadar/Configuration.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DataVersion>6</DataVersion>
  <BaseStationSettings>
    <DataSource>Port30003</DataSource>
    <ConnectionType>TCP</ConnectionType>
    <AutoReconnectAtStartup>false</AutoReconnectAtStartup>
    <Address>127.0.0.1</Address>
    <Port>30003</Port>
    <BaudRate>115200</BaudRate>
    <DataBits>8</DataBits>
    <StopBits>One</StopBits>
    <Parity>None</Parity>
    <Handshake>None</Handshake>
    <StartupText>#43-02\r</StartupText>
    <ShutdownText>#43-00\r</ShutdownText>
    <DatabaseFileName></DatabaseFileName>
    <OperatorFlagsFolder>/home/radar/imgs/OperatorLogos1</OperatorFlagsFolder>
    <SilhouettesFolder>/home/radar/imgs/SilhouettesLogos</SilhouettesFolder>
    <PicturesFolder></PicturesFolder>
    <SearchPictureSubFolders>false</SearchPictureSubFolders>
    <DisplayTimeoutSeconds>30</DisplayTimeoutSeconds>
    <TrackingTimeoutSeconds>600</TrackingTimeoutSeconds>
    <IgnoreBadMessages>true</IgnoreBadMessages>
    <MinimiseToSystemTray>false</MinimiseToSystemTray>
    <AutoSavePolarPlotsMinutes>60</AutoSavePolarPlotsMinutes>
    <LookupAircraftDetailsOnline>true</LookupAircraftDetailsOnline>
  </BaseStationSettings>
  <FlightRouteSettings>
    <AutoUpdateEnabled>true</AutoUpdateEnabled>
  </FlightRouteSettings>
  <WebServerSettings>
    <AuthenticationScheme>Anonymous</AuthenticationScheme>
    <ConvertedUser>false</ConvertedUser>
    <BasicAuthenticationUserIds />
    <AdministratorUserIds />
    <EnableUPnp>false</EnableUPnp>
    <UPnpPort>80</UPnpPort>
    <IsOnlyInternetServerOnLan>true</IsOnlyInternetServerOnLan>
    <AutoStartUPnP>false</AutoStartUPnP>
  </WebServerSettings>
  <GoogleMapSettings>
    <InitialSettings></InitialSettings>
    <InitialMapLatitude>48.98</InitialMapLatitude>
    <InitialMapLongitude>2.17</InitialMapLongitude>
    <InitialMapType>ROADMAP</InitialMapType>
    <InitialMapZoom>10</InitialMapZoom>
    <InitialRefreshSeconds>1</InitialRefreshSeconds>
    <MinimumRefreshSeconds>1</MinimumRefreshSeconds>
    <ShortTrailLengthSeconds>30</ShortTrailLengthSeconds>
    <InitialDistanceUnit>NauticalMiles</InitialDistanceUnit>
    <InitialHeightUnit>Feet</InitialHeightUnit>
    <InitialSpeedUnit>Knots</InitialSpeedUnit>
    <PreferIataAirportCodes>false</PreferIataAirportCodes>
    <EnableBundling>true</EnableBundling>
    <EnableMinifying>true</EnableMinifying>
    <EnableCompression>true</EnableCompression>
    <WebSiteReceiverId>1</WebSiteReceiverId>
    <ClosestAircraftReceiverId>1</ClosestAircraftReceiverId>
    <FlightSimulatorXReceiverId>1</FlightSimulatorXReceiverId>
    <ProxyType>Forward</ProxyType>
  </GoogleMapSettings>
  <VersionCheckSettings>
    <CheckAutomatically>true</CheckAutomatically>
    <CheckPeriodDays>1</CheckPeriodDays>
  </VersionCheckSettings>
  <InternetClientSettings>
    <CanRunReports>false</CanRunReports>
    <CanShowPinText>false</CanShowPinText>
    <CanPlayAudio>false</CanPlayAudio>
    <CanShowPictures>false</CanShowPictures>
    <TimeoutMinutes>20</TimeoutMinutes>
    <AllowInternetProximityGadgets>false</AllowInternetProximityGadgets>
    <CanSubmitRoutes>false</CanSubmitRoutes>
    <CanShowPolarPlots>false</CanShowPolarPlots>
  </InternetClientSettings>
  <AudioSettings>
    <Enabled>false</Enabled>
    <VoiceRate>0</VoiceRate>
  </AudioSettings>
  <RawDecodingSettings>
    <ReceiverLocationId>0</ReceiverLocationId>
    <ReceiverRange>650</ReceiverRange>
    <IgnoreMilitaryExtendedSquitter>false</IgnoreMilitaryExtendedSquitter>
    <SuppressReceiverRangeCheck>true</SuppressReceiverRangeCheck>
    <UseLocalDecodeForInitialPosition>false</UseLocalDecodeForInitialPosition>
    <AirborneGlobalPositionLimit>10</AirborneGlobalPositionLimit>
    <FastSurfaceGlobalPositionLimit>25</FastSurfaceGlobalPositionLimit>
    <SlowSurfaceGlobalPositionLimit>50</SlowSurfaceGlobalPositionLimit>
    <AcceptableAirborneSpeed>15</AcceptableAirborneSpeed>
    <AcceptableAirSurfaceTransitionSpeed>5</AcceptableAirSurfaceTransitionSpeed>
    <AcceptableSurfaceSpeed>3</AcceptableSurfaceSpeed>
    <IgnoreCallsignsInBds20>false</IgnoreCallsignsInBds20>
    <AcceptIcaoInPI0Count>1</AcceptIcaoInPI0Count>
    <AcceptIcaoInPI0Seconds>1</AcceptIcaoInPI0Seconds>
    <AcceptIcaoInNonPICount>0</AcceptIcaoInNonPICount>
    <AcceptIcaoInNonPISeconds>5</AcceptIcaoInNonPISeconds>
    <SuppressIcao0>true</SuppressIcao0>
    <IgnoreInvalidCodeBlockInParityMessages>false</IgnoreInvalidCodeBlockInParityMessages>
    <IgnoreInvalidCodeBlockInOtherMessages>true</IgnoreInvalidCodeBlockInOtherMessages>
    <SuppressTisbDecoding>false</SuppressTisbDecoding>
  </RawDecodingSettings>
  <MonoSettings>
    <UseMarkerLabels>true</UseMarkerLabels>
  </MonoSettings>
  <Receivers>
    <Receiver>
      <Enabled>true</Enabled>
      <UniqueId>1</UniqueId>
      <Name>Receiver network</Name>
      <DataSource>Port30003</DataSource>
      <ConnectionType>TCP</ConnectionType>
      <AutoReconnectAtStartup>true</AutoReconnectAtStartup>
      <IsPassive>true</IsPassive>
      <Access>
        <DefaultAccess>Unrestricted</DefaultAccess>
        <Addresses />
      </Access>
      <Address>127.0.0.1</Address>
      <Port>31004</Port>
      <UseKeepAlive>true</UseKeepAlive>
      <IdleTimeoutMilliseconds>60000</IdleTimeoutMilliseconds>
      <BaudRate>115200</BaudRate>
      <DataBits>8</DataBits>
      <StopBits>One</StopBits>
      <Parity>None</Parity>
      <Handshake>None</Handshake>
      <StartupText>#43-02\r</StartupText>
      <ShutdownText>#43-00\r</ShutdownText>
      <ReceiverLocationId>1</ReceiverLocationId>
      <ReceiverUsage>Normal</ReceiverUsage>
    </Receiver>
  </Receivers>
  <MergedFeeds />
  <ReceiverLocations>
    <ReceiverLocation>
      <UniqueId>1</UniqueId>
      <Name>FR</Name>
      <Latitude>48.9667</Latitude>
      <Longitude>2.1833</Longitude>
      <IsBaseStationLocation>false</IsBaseStationLocation>
    </ReceiverLocation>
  </ReceiverLocations>
  <RebroadcastSettings />
</Configuration>
The Logos and Silhouettes dirs:

Code: Select all

radar@rainbowdash:~$ ls /home/radar/imgs/OperatorLogos1/|tail -n 3
ZM-M.bmp
ZW-M.bmp
nologo.bmp
radar@rainbowdash:~$ ls /home/radar/imgs/SilhouettesLogos/|tail -n3
ZERO.bmp
ZZZZ.bmp
su95.bmp
And now the errors from the log file ~/.local/share/VirtualRadar/VirtualRadarLog.txt:

Cannot open database, but which database ?

Code: Select all

[2016-05-20 13:25:04.696 UTC] [t1] Exception caught during load of standing data: Mono.Data.Sqlite.SqliteException: Unable to open the database file
  at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00000] in <filename unknown>:0
  at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in <filename unknown>:0
Cannot download a file:

Code: Select all

[2016-05-20 13:25:05.015 UTC] [t5] Exception caught during data download: System.InvalidOperationException: Could not download http://www.virtualradarserver.co.uk/Files/FlightNumberCoverage.c
sv: An exception was thrown by the type initializer for System.Net.WebRequest ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebReques
t ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Xml.XmlException: Document element did not appear.  Line 1, position 1.
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlReader.MoveToContent () [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.Load () [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
  at System.Net.WebRequest..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at VirtualRadar.Database.StandingData.StandingDataUpdater+DefaultProvider.DownloadToStream (System.String url, System.IO.Stream stream, Boolean urlIsGzipFile) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at VirtualRadar.Database.StandingData.StandingDataUpdater+DefaultProvider.DownloadToStream (System.String url, System.IO.Stream stream, Boolean urlIsGzipFile) [0x00000] in <filename unknown>:0
  at VirtualRadar.Database.StandingData.StandingDataUpdater+DefaultProvider.DownloadLines (System.String url) [0x00000] in <filename unknown>:0
  at VirtualRadar.Database.StandingData.StandingDataUpdater.Update () [0x00000] in <filename unknown>:0
  at VirtualRadar.Database.StandingData.BackgroundDataDownloader.Heartbeat_SlowTick (System.Object sender, System.EventArgs args) [0x00000] in <filename unknown>:0
Tryied to download the file manually, it works:

Code: Select all

radar@rainbowdash:~$ curl -sI http://www.virtualradarserver.co.uk/Files/FlightNumberCoverage.csv|egrep '(HTTP|Last-Mod)'
HTTP/1.1 200 OK
Last-Modified: Thu, 19 May 2016 23:35:38 GMT
Error related to external IP ? (My server only have an internal IP and have some ports NAT-ed, but no restrictions to outside)

Code: Select all

[2016-05-20 13:25:05.050 UTC] [t5] Exception caught during fetch of external IP address: System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> S
ystem.Xml.XmlException: Document element did not appear.  Line 1, position 1.
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlReader.MoveToContent () [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.Load () [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
  at System.Web.Services.Configuration.WebServicesSection.get_Current () [0x00000] in <filename unknown>:0
  at System.Web.Services.Protocols.SoapExtension.InitializeGlobalExtensions () [0x00000] in <filename unknown>:0
  at System.Web.Services.Protocols.SoapExtension.GetTypeExtensions (System.Type serviceType) [0x00000] in <filename unknown>:0
  at System.Web.Services.Protocols.SoapTypeStubInfo..ctor (System.Web.Services.Protocols.LogicalTypeInfo logicalTypeInfo) [0x00000] in <filename unknown>:0
  at System.Web.Services.Protocols.LogicalTypeInfo.GetTypeStub (System.String protocolName) [0x00000] in <filename unknown>:0
  at System.Web.Services.Protocols.TypeStubManager.GetTypeStub (System.Type t, System.String protocolName) [0x00000] in <filename unknown>:0
  at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor () [0x00000] in <filename unknown>:0
  at VirtualRadar.Library.webservice.virtualradarserver.co.uk.ClientSupport..ctor () [0x00000] in <filename unknown>:0
    at VirtualRadar.Library.webservice.virtualradarserver.co.uk.ClientSupport..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) VirtualRadar.Library.webservice.virtualradarserver.co.uk.ClientSupport:.ctor ()
  at VirtualRadar.Library.ExternalIPAddressService+DefaultProvider.ExternalIpAddress () [0x00000] in <filename unknown>:0
  at VirtualRadar.Library.ExternalIPAddressService.GetExternalIPAddress () [0x00000] in <filename unknown>:0
  at VirtualRadar.WebServer.AutoConfigWebServer.Heartbeat_SlowTick (System.Object sender, System.EventArgs args) [0x00000] in <filename unknown>:0
Also so errors trying to do web queries (omitted full trace here):

Code: Select all

[2016-05-20 13:25:14.641 UTC] [t5] Caught exception while checking for new version: System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebRequest ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Xml.XmlException: Document element did not appear.  Line 1, position 1.
And also an error about AircraftOnlineLookup, in the web interface no lookup is visible, and I think Logos and Silhouettes are related to the Lookup ?
Many of this one, for each query...

Code: Select all

[2016-05-20 13:25:25.780 UTC] [t12] AircraftOnlineLookup caught exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebRequest ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Xml.XmlException: Document element did not appear.  Line 1, position 1.
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlReader.MoveToContent () [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.Load () [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000] in <filename unknown>:0
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
  at System.Net.WebRequest..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at VirtualRadar.Database.StandingData.StandingDataUpdater+DefaultProvider.DownloadToStream (System.String url, System.IO.Stream stream, Boolean urlIsGzipFile) [0x00000] in <filename unknown>:0
Any help is appreciated and I can do tests to help debugging theses issues.

Thanks !

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Various errors on start

Post by agw » Sun May 22, 2016 11:09 pm

The failure to open StandingData.sqb is to be expected, when you first start a new installation you won't have one of those, it'll need to download it.

The download problem isn't a VRS issue, something is up with Mono. It looks to me like it's saying that when VRS tries to create a WebRequest object the WebRequest constructor is going off and trying to read a configuration file which fails because the file is not valid XML. I'm guessing that you've created a VirtualRadar.exe.config as per the instructions on the Mono page on the VRS web site and it's complaining about that. I would double-check that you have saved the file correctly and don't have any garbage accidentally saved in there. If you've got it saved with a Unicode encoding then try re-saving it with a plain ASCII encoding.

Post Reply