Select to view content in your preferred language

Watch Folder for XML

540
1
02-07-2022 06:33 AM
AndrewMilanes
Occasional Contributor II

I have configured an input to watch a folder for an XML file.  A 911 Computer Aided Dispatch system writes an xml file for each dispatch call.  The files are copied from the CAD server to the Geoevent server every minute.  Sometimes the files are not parsed and I get the following error:

"An unexpected error has occurred while reading the file "xxxxxx".  The process cannot access the file because it is being used by another process."

Any suggestions?

Tags (3)
1 Reply
JeffSilberberg
Occasional Contributor III

Andrew, I have seen similar errors with Asterisk and "call Files" where if you write or copy the file to the target directory the watcher starts before the write  copy closes the file. In that case it is recommended that you move the file not copy the file to the target direct.  

This is what we had to do with the Mobiletec CAD as well for a "paging" interface.  

Hope it helps --

 

As Jeff suggests, the GeoEvent Server system file watcher does not check if a file is currently being written or if a file copy is complete. The recommendation would be to copy the XML file from the CAD system to a local folder on the server used to run GeoEvent Server (to mitigate any latency in the file copy operation) then move rather than copy the file from a local folder such as C:\GeoEvent\stage to the folder your input has been configured to watch (e.g. C:\GeoEvent\input). -- RJ