GeoEvent Definition for GUID does not exist

80
1
03-20-2020 02:20 PM
Highlighted
New Contributor II

ArcGIS Server 10.7.1

GeoEvent Server 10.7.1 (also occurs in 10.7)

We are running ArcGIS GeoEvent Server with a custom input (transport and adapter) which we then output to either JSON, CSV or a feature class.  This input has been working in the past but has begun to experience an issue where the GeoEvent Server seems to loses track of the GUID association to the GeoEvent Definition used by that input.  The input will be working successfully but after some time (could be a couple of days to a couple of weeks) begins to produce the following error for each record being processed by the adapter:

Failed to create new GeoEvent: GeoEvent Definition for GUID (838673fe-d5f9-418a-8c68-85943b79896d) does not exist.

We have tried the following to resolve the issue.  We did find a work-around that fixes the issue temporarily until the next time the issue occurs.

Attempts to resolve issue:

1.  Administrative reset of the GeoEvent Server

1. Edit and save the definition for AssetRecord

  • This appears to have altered the GUID for the definition, as seen in the error logs. But did not correct the behavior.
  • Original GUID(d81f989c-a1f0-40da-8169-e90247336072)
  • New GUID(ea3ed2ca-b12b-4e76-94d0-6311acbcd141)
  • Further attempts at this did not alter the GUID, so the GUID change may be related to other behavior.

2. Edit and save the definition for AssetRecord then stop services.

  • For the geoevent definition AssetRecord -> change name to P_AssetRecord, no other changes
  • Stop service ArcGIS GeoEvent Server
  • Stop service ArcGIS GeoEvent Gateway
  • Start service ArcGIS GeoEvent Gateway
  • Start service ArcGIS GeoEvent Server
  • After restart the service was successfully processing record data through the adapter.

We are able to reproduce this issue, but not with any consistency.  We just leave our GeoEvent input running and eventually the error begins to occur.  Some customers/partners that are utilizing this custom input have also experienced this issue.

Reply
0 Kudos
1 Reply
Highlighted
New Contributor II

While researching this further I was able to access the input adapter code.  The lines that generate the error are in red:

public class XInboundAdapter extends InboundAdapterBase
{
public XInboundAdapter(AdapterDefinition definition) throws ComponentException
{
super(definition);
}

private GeoEvent RecordToGeoEvent(Asset asset, GPSData record)
{
GeoEvent geoEvent = null;
Point point = null;
try
{
if (this.geoEventCreator != null)
{
geoEvent = this.geoEventCreator.create(((AdapterDefinition)this.definition)
.getGeoEventDefinition("AssetRecord").getGuid());
}
else
{
log.info("GeoEventCreator is NULL");
return null;
}
}
catch (MessagingException e)
{
log.error(e.getMessage());
return null;
}
...
}
...
}

I think this might shed some light on things, as the GeoEvent Definition is created in the adapter code as well (in its own class).  The adapter definition constructor does the following:

public XInboundAdapterDefinition()
{
super(AdapterType.INBOUND);
try
{
GeoEventDefinition md = new DefaultGeoEventDefinition();
md.setName("AssetRecord");
...
}
...
}

Is it possible that the call in RecordToGeoEvent() to create the record based on the named "AssetRecord" definition is generating a brand new definition/GUID instead of using the definition that is already created when the adapter was installed?

This also makes me question why my earlier work-around of renaming the GeoEvent definition worked.  Perhaps because it removed a definition naming conflict between what the GeoEvent Server already has defined and whatever definition the adapter is generating internally?

If the call to .getFeoEventDefinition("AssetRecord").getGuid() is the source of the problem, is there a better way to get the proper definition GUID for the definition already on the server?

Reply
0 Kudos