LocalServer won't start geoprocessing services

1455
11
02-20-2019 06:30 AM
EricaPfister
New Contributor III

I have a .NET application with Local Server, and it starts and displays a map service from a map package. However, it cannot start the geoprocessing service I'm also trying to include. I've tried with the gpk that I actually need, a gpk with a simple Buffer operation (just for testing purposes), and a gpkx with a simple Buffer operation. All are giving the same error:

Failed to create service examplemodel GPServer. Worker process 'examplemodel_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={asynchronous=, filePath=c:\temp\examplemodel.gpk, jobDir=C:\Users\[.....]\AppData\Local\Temp\1\arcgisruntime_19956\examplemodel\jobs, maxRecords=1000, name=examplemodel, outputDir=C:\Users\[.....]\AppData\Local\Temp\1\arcgisruntime_19956\examplemodel, type=GPServer, virtualDir=http://127.0.0.1:50000/5rc2jC/outputdir/examplemodel} res='create' post=0 Crash dump path=C:\Users\[.....]\AppData\Local\Temp\1\ArcGISRuntimeErrorReports\arcgisruntime_100.3.0.2102_service_20190219_194809.dmp

I did check the ArcGISLocalServer_100.3.AGSDeployment file, and changed the Geoprocessing lines:

      <Package id="ProGeoProcessing" name="Geoprocessing" enabled="true">

      <Package id="ArcMapGeoprocessing" name="Geoprocessing" enabled="true">

Unfortunately, I'm still getting the same error. What else do I need to fix?

0 Kudos
11 Replies
ChristopherKoenig
Esri Contributor

Hi Erica,

I don't know if you have already tried this but if you are using Visual Studio you can try rebuilding the solution as a possible remedy.  To do this have your project open in Visual Studio and go to the Build menu in the toolbar and select Rebuild Solution.  This has solved a Local Server issue for me in the past so I'm thinking it might be worth a try.  

Thank you,

Christopher Koenig

EricaPfister
New Contributor III

Thanks for the suggestion! I did try this -- I even tried creating a new solution from scratch, pasting in the code and changing the settings. Unfortunately, it's still giving me the same error. I suspect it's a simple true/false somewhere, but really not sure where

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

Your error message indicates you are using a geoprocessing package created in ArcMap (`c:\temp\examplemodel.gpk`). If that's the case, then note you only need to enable the `ArcMapGeoprocessing` package deployment option (rather than ArcMap and Pro).

The first step I always recommend is to disable the deployment of the Local Server components completely which will force your app to use the full Local Server SDK installation (typically in `C:\Program Files (x86)\ArcGIS SDKs\LocalServer100.X`). To do this:

1. Open the deployment file and ensure both the top level Pro and ArcMap options are set to false e.g.

```

...

<Package id="Pro" name="ArcGIS Pro Compatible Server" enabled="false">

...

<Package id="ArcMap" name="ArcMap Compatible Server" enabled="false">

...

```

2. Run a clean and build on your solution and ensure the `LocalServer100.X` folder has been deleted from your project output location (e.g. `bin\debug`).

3. Now run your application (at least until you see the developer license message box).

4. If you want to double-check where LocalServer is running from: start Task Manager, switch to the Details tab, sort alphabetically by Name, find the `RuntimeLocalServer.exe` process, right-click, and choose `Open file location`. This should now be e.g. `C:\Program Files (x86)\ArcGIS SDKs\LocalServer100.5\64\bin`.

The steps above will confirm if this is a simple deployment issue (i.e. you have not selected all options required) or if there is a potential problem with your geoprocessing package.

Cheers

Mike

Sharan_saiGudibanda_Nagesh
New Contributor

Hi,

I have done the mentioned above steps.

At step 4 the file location its opening is not in `C:\Program Files (x86)\ArcGIS SDKs\LocalServer100.5\64\bin`. but it is opening in 'projectfile\bin\debug\localserver100.5\64\bin'.

Is there any problem with this, pls do suggest

I was also facing the same issues 

Thankyou in Advance

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

As well as disabling the deployment via the config file you should ensure that a Rebuild or Clean/Build of you project has removed the following folder (if not, then you should delete): `'projectfile\bin\debug\localserver100.5`.

For more information please see Create a Local Server deployment—ArcGIS Runtime SDK for .NET | ArcGIS for Developers 

Regards

Mike

0 Kudos
Sharan_saiGudibanda_Nagesh
New Contributor

Hi Mike,

I have tried every way possible but unable to work it out.

I would like to know "How to disable deployment via config file".

Is there any successful setup that has been implemented, So that we can take it as the reference

Regards

G N Sharan Sai

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

The first step in diagnosing why your service is failing to start is to disable the default deployment which will make the API then use the developer installation of the ArcGIS Runtime Local Server SDK (typically in Program Files x86).

To do this:

- Ensure the top-level Pro and ArcMap deployment package options are set to false. e.g. arcgis-runtime-samples-dotnet/ArcGISLocalServer_100.6.AGSDeployment at master · Esri/arcgis-runtime-... 

- Delete any "LocalServer100.X" folder in your application output location (e.g. bin\Debug).

If the service still does not start then it's possibly an issue with the way the script or model was authored when it was being packaged for use with ArcGIS Runtime, or perhaps one of the dependencies is not installed (see Local Server—ArcGIS Runtime SDK for .NET | ArcGIS for Developers).

You may get some additional information from the log files. To enable logging run the Local Server Utility app in the SDK installation folder (e.g. `C:\Program Files (x86)\ArcGIS SDKs\LocalServer100.5\64\bin\LocalServerUtility.exe`). Re-run the workflow that tries to start the service. The Local Server Utility app will display any log files generates (note you may need to click the Refresh button).

Regards

Mike

0 Kudos
Sharan_saiGudibanda_Nagesh
New Contributor

Hi,

I made it false, I have deleted the mentioned folder and rebuild complete solution, coming to package I was taken from a GeoNet discussion where he has successfully initiated the process.

Pls provide me solution, I might be missing any small pt.

Regards

G N Sharan Sai

Get Outlook for Android<https://aka.ms/ghei36>

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

Have you tried enabling logging? 

Regards

Mike 

0 Kudos