error code 400 message "Unable to complete operation, Unable to perform query operation

21905
5
09-23-2015 01:37 AM
Caroline_Akoth
New Contributor II

Part of the error message received.

Error Posting to URL: http://localhost:6080/arcgis/rest/services/Caroline/Schema1/FeatureServer/0/query with parameters: where=animal_sighted IN ('Wildebeest','Zebra','Thompson_Gazelle','Giraffe','Lion')&outfields=animal_sighted,objectid&f=json. java.io.IOException: {"error":{"code":400,"message":"Unable to complete operation.","details":["Unable to perform query operation."]}} at com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.validateResponse(FeatureServiceOutboundTransport.java:745)

What could be the source of this error?

Mark MindlinHafizi SaidinWes Goldstein​ Could you please help me with this?

0 Kudos
5 Replies
RJSunderman
Esri Regular Contributor

Hello Caroline -

Here's how you parse this error message:

Error Posting to URL:
http://localhost:6080/arcgis/rest/services/Caroline/Schema1/FeatureServer/0/query
with parameters:
where=animal_sighted IN ('Wildebeest','Zebra','Thompson_Gazelle','Giraffe','Lion')
&outfields=animal_sighted,objectid&f=json.
java.io.IOException: {"error":{"code":400,"message":"Unable to complete operation.",
"details":["Unable to perform query operation."]}} at
com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.validateResponse(FeatureServiceOutboundTransport.java:745)

Line 2:  You are making a query on the locally hosted Schema1 feature service (found in the Caroline services folder)

Line 4:  GeoEvnet is looking for an OBJECTID (feature row identifier) for the listed TRACKID values ('Wildebeest', 'Zebra', etc.)

Line 5:  The query should return only the fields:  animal_sighted and objectid in a JSON structure

Line 6:  ArcGIS Server couldn't complete the query ... this is a generic error return code and message from Server

Line 8:  Identifies the component, method, and line of code in the GeoEvent implementation which generated the exception

Since you cannot attach a debugger and look into the GeoEvent source code, your only option is to set DEBUG logging on the reported component and see if you can get some additional information.

In GeoEvent Manager, click Logs > Settings and enter com.esri.ges.transport.featureService.FeatureServiceOutboundTransport as the component for which you want the Logger to produce DEBUG messages:

Save the logging settings and send / simulate another event so that your GeoEvent Service will try again to add / update features. (I'm assuming that is what you are trying to do, based on the error message you posted.)

Check the karaf.log to see if you were able to capture any additional information. I find that opening the logfile using a text editor can be more useful than looking at log messages in the GeoEvent Manager's Logs viewer. You can find the karaf.log file here:  C:\Program Files\ArcGIS\Server\GeoEvent\data\log

Check your ArcGIS Server logs. There may be some additional detail on why Server was not able to honor the request GeoEvent was making on the feature service's ...\query endpoint.

Try rebuilding the query yourself in the ArcGIS REST Services Directory:

You may need to play with your query some, like changing the WHERE clause to 1=1 to query for all records and/or changing the Out Fields to a * (so that all fields are retrieved).

Pay particular attention to the URL generated based on the query you construct using the HTML page. You can copy / paste the URL from the ArcGIS REST Services Directory page into a text editor and look through the parameters. I know, for example, that there was a rather obscure defect in the 10.3.1 release which would only manifest when configuring an ArcGIS Server site with Portal and using the ArcGIS Data Store (a specific configuration of PostGRE database). The outFields parameter was being constructed as outfields (little 'f') ... which was not compliant with the ArcGIS REST specification and queries GeoEvent was making to try and obtain OBJECTID values were failing. (This issue should be fixed in the upcoming 10.4 release...)

Hope this information helps -

RJ

Caroline_Akoth
New Contributor II

Thank you RJ.

I'll let you know how this goes.

0 Kudos
Caroline_Akoth
New Contributor II

Hello RJ Sunderman

I tried your suggestion and i can now view counts  but output cannot display on the operations dashboard.

I'm also getting the following error. I have counter-checked my Schema and CSV.

Error Posting to URL: http://services6.arcgis.com/UN0h3uOZyPiORHVm/arcgis/rest/services/Schema/FeatureServer/0/query
with parameters: where=animal_sighted IN ('Cheetah','Leopard','Elephant','Buffalo','Wildebeest')&outfields=animal_sighted,objectid&f=json
&token=EdRUeCApvDpYYJiXnMsxgmPTu6Dh53qVlDT7BbgbW1C5bfk3JPQGiKcpl_idsh2CwpaHGGQuvJo-QxC0vtSvlaGI-Cr_hUh79nY3gaDM-w4OBjRH00GDAKjh0ucL20kxXaxsri167B1inOuvBtwjHBQX7Ksc8cQBh0op-gOXCTkNFKJvmIzqCVPatNscq1SYKxzfXwyELZYGKLCbZJmTBm5UDMhMnm8hro0Wk0g5tYWTsQimDDPiYzQq8W7sGP5-OVhtmoLBUEeq2_f5kmt2GA...
java.io.IOException: {"error":{"code":400,"message":"","details":["Unable to perform query. Please check your parameters."]}}
at com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.validateResponse(FeatureServiceOutboundTransport.java:745)[266:com.esri.ges.framework.transport.featureservice-transport:10.3.0]
at com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.performMissingOIDQuery(FeatureServiceOutboundTransport.java:452)[266:com.esri.ges.framework.transport.featureservice-transport:10.3.0]
at com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.queryForMissingOIDs(FeatureServiceOutboundTransport.java:433)[266:com.esri.ges.framework.transport.featureservice-transport:10.3.0]
at com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.writeToFeatureService(FeatureServiceOutboundTransport.java:153)[266:com.esri.ges.framework.transport.featureservice-transport:10.3.0]
at com.esri.ges.transport.featureService.FeatureServiceOutboundTransport.receive(FeatureServiceOutboundTransport.java:84)[266:com.esri.ges.framework.transport.featureservice-transport:10.3.0]
at com.esri.ges.manager.stream.internal.OutboundTransportProxy.receive(OutboundTransportProxy.java:42)[325:com.esri.ges.manager.internal-streammanager:10.3.0]
at com.esri.ges.manager.stream.internal.OutboundStreamImpl.receive(OutboundStreamImpl.java:184)[325:com.esri.ges.manager.internal-streammanager:10.3.0]
at com.esri.ges.adapter.OutboundAdapterBase.receive(OutboundAdapterBase.java:44)[253:com.esri.ges.framework.adapter.adapter-api:10.3.0]
at com.esri.ges.adapter.json.FeatureJsonOutboundAdapter.flushQueue(FeatureJsonOutboundAdapter.java:116)[258:com.esri.ges.framework.adapter.feature-json-adapter:10.3.0]
at com.esri.ges.adapter.json.FeatureJsonOutboundAdapter.run(FeatureJsonOutboundAdapter.java:91)[258:com.esri.ges.framework.adapter.feature-json-adapter:10.3.0]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_65]
0 Kudos
RJSunderman
Esri Regular Contributor

Hello Caroline -

Looking closely at the error you posted, you are still being told "Unable to perform query".

Your underlying issue has not been resolved. GeoEvent is still looking for an OBJECTID for the specified TRACKID values:

where=animal_sighted IN ('Cheetah','Leopard','Elephant','Buffalo','Wildebeest')

  • Notice the REST endpoint on which the request is being made:  .../FeatureServer/0/query
  • Also, notice the fields being requested:  outfields=animal_sighted,objectid

Verifying event attributes in your input CSV and using a Field Mapper processor to make sure GeoEvents sent to an 'Update a Feature' output have the correct schema are good workflow debugging steps. Using the GeoEvent Monitor page to observe event counts for your input, GeoEvent Service, and output is also good. However, jumping from this to Operations Dashboard to see if features are being updated in an operational view is premature.

As part of your debugging, have you stepped through the narrative on pages 34 - 42 ("Reconfigure the Flights GeoEvent Service") and ("Examine an updated feature service’s REST endpoint") in Module 2 of the product introduction tutorial? I would recommend using a TCP/Text output (and possibly a File/JSON output as well) to see what your GeoEvent Service is producing. You also need to be using the ArcGIS REST Services Directory to examine your feature service's content before expecting Operations Dashboard to show you features being updated.

Have you had a chance to try some of the debugging steps outlined in the Debugging the Add a Feature / Update a Feature Output Connectors​ blog? Understanding the queries and Server responses illustrated in the FeatureServiceUpdate.png attached to that blog -- and observing the same in your GeoEvent's karaf.log -- are important when trying to figure out why features are not being added or updated in a feature service's feature class. Unfortunately, seeing an output's count increment on the GeoEvent Monitor page is not sufficient to conclude that requests made to the feature service, or transactions made with the database, were successful.

Until we figure out why GeoEvent is unable to query the feature service to obtain an OBJECTID you will never see requests made to update features (.../FeatureServer/0/updateFeatures). Until you see updateFeatures messages in the GeoEvent log, you can't conclude that GeoEvent has actually requested a feature service update features in its feature class. The web map you have prepared, which the operational view is using, won't be able to tell you anything if features are not being updated in the underlying feature class.

Hope this helps -

RJ

0 Kudos
Caroline_Akoth
New Contributor II

Hello RJ,

Yes I have gone through both the blog and the product Introduction tutorial is actually what i have been using.

I have added an output TCP text output that shows output as shown:

TCP text.jpg

I am now pulling my feature service from My Hosted services on AGOL, from which i imported my Geo-event definitions.Upon making that shift i reset my configuration settings.

Here a screen shot of the Karaf.log indicating that services are being pulled from ArcGIS server which are now empty. Having reset my data store i did not expect this.

Karaf.jpg

0 Kudos