Network Analyst Script Control Error

1447
3
Jump to solution
06-22-2017 03:24 PM
DavidGreene
New Contributor III

I have a complex multi-modal network dataset with some scripted evaluators defined for edges and default turns.  The route generation and evaluators work perfectly on our development ArcGIS Server 10.3.1.  However, when deployed to a hardened production server, the default turn evaluators fail miserably with the following error in the MapServer log:

System.Runtime.InteropServices.COMException (0x80042270): The evaluator failed to return a value. [Attribute: NoBargeToTruck, Default Turns, OID = -1, EID = -1].  Network element evaluator error. [Script Control Error -2147352319].

In the Server/framework/etc/service/logs/service.log, I am seeing this Java stack trace:

:ExecGroup-1488:err:Exception in thread "SOThread" java.lang.RuntimeException: java.lang.NoSuchFieldError: a
:ExecGroup-1488:err: at com.esri.arcgis.discovery.servicelib.impl.SOThread.run(SOThread.java:476)
:ExecGroup-1488:err:Caused by: java.lang.NoSuchFieldError: a
:ExecGroup-1488:err: at com.esri.arcgis.interop.StdObjRef.b(Unknown Source)
:ExecGroup-1488:err: at com.esri.arcgis.interop.Cleaner.releaseAllInCurrentThread(Unknown Source)
:ExecGroup-1488:err: at com.esri.arcgis.discovery.servicelib.impl.SOThread.b(SOThread.java:1178)
:ExecGroup-1488:err: at com.esri.arcgis.discovery.servicelib.impl.SOThread.run(SOThread.java:414)

I've turned off all restrictions except for one and through various trials, I have found that this works:

Body:
 Dim prohibit
 prohibit = false
Value:
 prohibit

But this fails:

Body:
 Dim prohibit
 prohibit = false
 dim test
 test = Turn.EID
Value:
 prohibit

Accessing ANY of the network elements (Turn, fromEdge, toEdge) fails with the COMException but only for default turns.  Scripts on Edges work just fine.  The Server is Windows 2008 R2 64-bit.  The network dataset is served from a file-geodatabase.

Any thoughts?

0 Kudos
1 Solution

Accepted Solutions
DavidGreene
New Contributor III

I spent a couple of weeks with Esri Technical Support to determine what the problem was.

Short answer:

You MUST install the corresponding ArcGIS Desktop (ArcMap) on the same server, but you don't need to license it.  The issue has been resolved in ArcGIS Server/Enterprise 10.5.1.

Long Answer:

We couldn't duplicate it until I created a test VM and ran through many iterations of installing, uninstalling, upgrading, and VM snapshotting.  I eventually found that everything works if ArcMap is installed and fails if ArcMap is uninstalled.  Apparently the ArcMap installation includes some DLLs and/or registry settings that are needed for some script/custom evaluators that the ArcGIS Server install does not include.  I tried doing some filesystem and registry comparisons before and after installs to find the differences and create a small "patch", but that was taking too much time.  For now, a full 3GB install of unnecessary 32-bit DLLs and other stuff is still needed.  They said they would respond to this thread, but I guess it fell off their radar.

Answer from Esri after I identified the problem (July 20, 2017):

1.) The defect that we identified, BUG-000101482 - A network analysis service fails to solve routes when the cost attribute uses a script evaluator with AttributeValueByName, if the server machine only has ArcGIS for Server installed, is the root cause of the issue according to my investigation. Though the synopsis seems differently titled and the attribute used is a cost attribute, the problem that occurs because of this defect happens when you use your script evaluator for ZDefaultNoTurns.

The resolution to this defect, which is the problem, is in 2 parts:
1.) Install ArcMap on the same machine as the ArcGIS Server machine, OR,
2.) Upgrade ArcGIS Server on the production machine to version 10.5.1.

View solution in original post

3 Replies
MichaelThompson
New Contributor III

Did you ever figure this out? I am getting the same error.

Thanks!

0 Kudos
DavidGreene
New Contributor III

I spent a couple of weeks with Esri Technical Support to determine what the problem was.

Short answer:

You MUST install the corresponding ArcGIS Desktop (ArcMap) on the same server, but you don't need to license it.  The issue has been resolved in ArcGIS Server/Enterprise 10.5.1.

Long Answer:

We couldn't duplicate it until I created a test VM and ran through many iterations of installing, uninstalling, upgrading, and VM snapshotting.  I eventually found that everything works if ArcMap is installed and fails if ArcMap is uninstalled.  Apparently the ArcMap installation includes some DLLs and/or registry settings that are needed for some script/custom evaluators that the ArcGIS Server install does not include.  I tried doing some filesystem and registry comparisons before and after installs to find the differences and create a small "patch", but that was taking too much time.  For now, a full 3GB install of unnecessary 32-bit DLLs and other stuff is still needed.  They said they would respond to this thread, but I guess it fell off their radar.

Answer from Esri after I identified the problem (July 20, 2017):

1.) The defect that we identified, BUG-000101482 - A network analysis service fails to solve routes when the cost attribute uses a script evaluator with AttributeValueByName, if the server machine only has ArcGIS for Server installed, is the root cause of the issue according to my investigation. Though the synopsis seems differently titled and the attribute used is a cost attribute, the problem that occurs because of this defect happens when you use your script evaluator for ZDefaultNoTurns.

The resolution to this defect, which is the problem, is in 2 parts:
1.) Install ArcMap on the same machine as the ArcGIS Server machine, OR,
2.) Upgrade ArcGIS Server on the production machine to version 10.5.1.

MichaelThompson
New Contributor III

David,

Thank you so much for the update!

Michael

0 Kudos