Hi All,
I am trying to run a .gpk package with result map service (raster is an output). When I start my app, the Windows 7 window pops-up, telling me that the LocalServer instance has stopped working, and let me decide to stop or debug application. When I click stop, no service is going to be up and running. When I click debug and continue debugging in Visual Studio, another pop-up shows up informing me that it is unable to get stack info. Next, I check Server REST endpoint and see that the services are started (Geoprocessing service and associated Map Service). Any ideas, what is going wrong?
I use Eclipse LUNA and Java 1.8.0_20 on win7 Professional. Below, you find basic syntax of my geoprocessing task.
gpService= new LocalGeoprocessingService("path to gpk");
gpService
.setServiceType(GPServiceType.SUBMIT_JOB_WITH_MAP_SERVER_RESULT);
gpService.startAsync();
Any suggestions are much appreciated,
Best Regards,
Adam
Solved! Go to Solution.
Resolved in Runtime 100.0.0
One place to start is with the 'Contour lines' sample in the sample viewer (installed with the SDK, or available here for 64-bit windows). It shows a example of running a geoprocessing task using a gpk / Local Server, and displaying the results as a map service. It also shows how to add a listener to the LocalGeoprocessingService instance to get info on the status of the service and to get error messages back through the API. Perhaps make sure you can run that sample successfully and work your way from simple things like just starting the service successfully, to actually running the task successfully, and displaying the map service.
Hope this helps a bit,
~elise
Hi Elise,
I created simple app to test your recommendations. Below is the code:
LocalGeoprocessingService localGP = new LocalGeoprocessingService();
localGP.setPath("C:/_temp/" + "package_name.gpk");
localGP.setServiceType(GPServiceType.SUBMIT_JOB_WITH_MAP_SERVER_RESULT);
localGP.addLocalServiceStartCompleteListener(new LocalServiceStartCompleteListener() {
@Override
public void localServiceStartComplete(LocalServiceStartCompleteEvent arg0) {
if (arg0.getService().getStatus() == LocalServiceStatus.STARTED) {
System.out.println("OK");
} else {
System.out.println("Error Starting GP Service");
System.out.println("error message: "+arg0.getService().getError().toString());
}
}
});
localGP.startAsync();
When working with contour.gpk, everything works perfecly. Services (Map and Geoprocessing Service) are up and running.
When change it to my gpk. I receive the followinng errors:
Then in the console the following error appeared:
Failed to create service Model.gpk GPServer. Worker process 'Model.gpk_mapserver_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={cfgName=Model.gpk, filePath=C:\Users\Adam\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages\\Model_663870BB-F970-4FBF-809F-8664CB4DEB50\v101\Model_Result_0.msd, jobDir=C:\Users\Adam\AppData\Local\Temp\arcgisruntime_9412\Model.gpk\jobs, maxRecords=1000, outputDir=C:\Users\Adam\AppData\Local\Temp\arcgisruntime_9412\Model.gpk, type=GPMapServer, virtualDir=http://127.0.0.1:50000/WBwWCx/outputdir/Model.gpk} res='create' post=0 Crash dump path=
!message:socexit:{"error":"Worker process 'Model.gpk_mapserver_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={cfgName=Model.gpk, filePath=C:\\Users\\Adam\\AppData\\Local\\ArcGISRuntime\\Documents\\ArcGIS\\Packages\\\\Model_663870BB-F970-4FBF-809F-8664CB4DEB50\\v101\\Model_Result_0.msd, jobDir=C:\\Users\\Adam\\AppData\\Local\\Temp\\arcgisruntime_9412\\Model.gpk\\jobs, maxRecords=1000, outputDir=C:\\Users\\Adam\\AppData\\Local\\Temp\\arcgisruntime_9412\\Model.gpk, type=GPMapServer, virtualDir=http://127.0.0.1:50000/WBwWCx/outputdir/Model.gpk} res='create' post=0 Crash dump path=","name":"Model.gpk_mapserver","processId":-1}
When I started to debug application in Visual Studio, the services have been started.
I think there must something wrong with my regional settings or ArcGIS Desktop settings. My gpk is very basic hillshade function. To bypass this issue I have to created another model that returns vector data and run my gpk in Exucete or Submit_Job mode, which do not return any errors.
Any help is much appreciated.
Does anybody encountered the same error as me? I have still this issue and I don't know how to resolve it.
Please help!
Some thoughts about ArcGIS Runtime Server:
1) The local server crashes only when I run GPK in RMS mode with the output of GPRasterDataLayer type. It works ok when I run GPK in RMS mode with the output of GPFeatureRecordSetLayer type. I think my issue only references to raster data as an output.
2) My GPKs and ArcGIS runtime are directory-aware. I have made a test. I created couple of gpks – each of them uses different geoprocessing tools supported by ArcGIS runtime like hillshade and viewshed giving as an output a GPRasterDataLayer. I located them in my ArcGIS Runtime sample directory ie. C:\Program Files (x86)\ArcGIS SDKs\java10.2.4\sdk\samples\data\gpks\Contour. I changed in a loop their names to Contour.gpk to successfully open a Contour sample (which use RMS option) and all of them were started without any crash. I executed them via REST and saw the results in the associated Map Service. I assume that Esri Samples app uses the production license, because I do not see any watermarks and do not receive any warnings in the Console.
So my question is – Do I need a production license to test local RMS service with raster output?
Hi,
No, you do not need a production license to test this. However when running a sample in Developer mode, the Local Server will display a dialog that you'd have to click and close, similar to this screenshot:
Once you click ok, everything you run fine on the developer machine. For example try running the Contour sample from say eclipse, rather than in the sample app. Then you should see this dialog and also a watermark on the map.
~e
Hi Elise,
As I described above, the Contour.gpk works fine (@When working with contour.gpk, everything works perfectly. Services (Map and Geoprocessing Service) are up and running.).No matter from where I call it, it starts, because the output is GPFeatureRecordSetLayer. The problem in my case, is when the output of gpk is GPRasterDataLayer, as I described in the second point of my post.
Is there any reasonable explanation why my gpks starts only when they are located in the sample directory and called from the sample application? I do not see any special privileges granted to ArcGIS SDK home directory to the local user.
Thanks for help,
Adam
Hello Adam,
I got the exact same problem you talking. I have tried every thing just like you said the contour.gpk is working fine, but when I try to working with a gpk with a RasterDataLayer as a output, the the map server process will crash at the starting stage.
and I got this error message:
---------------------------------------------------------------------------------
message:socexit:{"error":"Worker process 'Model2New.gpk_mapserver_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={cfgName=Model2New.gpk, filePath=C:\\Users\\Think\\AppData\\Local\\ArcGISRuntime\\Documents\\ArcGIS\\Packages\\\\Model2New_4E9F388A-E573-4C73-8CF2-61B9192057C9\\v101\\Model222_Result_0.msd, jobDir=C:\\Users\\Think\\AppData\\Local\\Temp\\arcgisruntime_10516\\Model2New.gpk\\jobs, maxRecords=1000, outputDir=C:\\Users\\Think\\AppData\\Local\\Temp\\arcgisruntime_10516\\Model2New.gpk, type=GPMapServer, virtualDir=http://127.0.0.1:50001/TlWWCh/outputdir/Model2New.gpk} res='create' post=0 Crash dump path=","name":"Model2New.gpk_mapserver","processId":-1}"
-----------------------------------------------------------------------------------
so Adam, did you got any clue in this issue? or anyone can give me some clue?
Thanks you very much,
Ryan
Hi Ryan,
I did not resolve this issue. I hope it will have been fixed before 10.2.5 or 10.3 release.
Regards,
Adam
Hi Adam
Thanks for your quick response!
I have turn on the log feature and got this log output below, according to the log, the problem was occurred when Map server handling a request. but it didn't tell what exactly caused the crash. and a suspicious point is, when the process crashed, it try to write a crash dump file, but the crash dump file is not generated, and there is an exception to say "System cannot find the specified file". but I'm sure the parent directory for the crash dump is exist on my hard driver.
Any idea is appreciated!
Thanks
Ryan
------------------------------------------------------------------------------------------------------
Message : Server version : 10.2.4.3858
Message : Server listening on : http://127.0.0.1:50002/VXhSqZ/arcgis/rest
2015-02-02 11:27:18,575: INFO rid=1 'server' AdminWebService - POST admin/createService
2015-02-02 11:27:18,578: INFO rid=1 'server' gpk - Creating.
2015-02-02 11:27:18,578: INFO rid=1 'server' gpk - Create
2015-02-02 11:27:18,578: INFO rid=1 'server' gpk_host - Creating.
2015-02-02 11:27:18,578: INFO rid=1 'server' gpk_host - Launching.
2015-02-02 11:27:18,579: INFO rid=1 'server' gpk_host - Launched process 6656
2015-02-02 11:27:19,570: INFO rid=1 'server' gpk_worker - Creating.
2015-02-02 11:27:19,570: INFO rid=1 'server' gpk_worker - Launching.
2015-02-02 11:27:19,571: INFO rid=1 'server' gpk_worker - Launched process 9696
2015-02-02 11:27:20,544: INFO rid=1 'server' gpk_mapserver - Creating.
2015-02-02 11:27:20,544: INFO rid=1 'server' gpk_mapserver - Create
2015-02-02 11:27:20,544: INFO rid=1 'server' gpk_mapserver_host - Creating.
2015-02-02 11:27:20,544: INFO rid=1 'server' gpk_mapserver_host - Launching.
2015-02-02 11:27:20,545: INFO rid=1 'server' gpk_mapserver_host - Launched process 9344
2015-02-02 11:27:25,017: WARN rid= 'server' gpk_mapserver_host - Couldn't locate dump file (process may not have created one) boost::filesystem::file_size: The System cannot find specified file path=C:/Users/Think/AppData/Local/Temp/arcgisruntime_7680/9344.dumpfilepath
2015-02-02 11:27:25,017: INFO rid= 'server' gpk_mapserver_host - Worker process exited unexpectedly.
2015-02-02 11:27:25,018: WARN rid=1 'server' gpk_mapserver_host - Worker process 'Model2.gpk_mapserver_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={cfgName=Model2.gpk, filePath=C:\Users\Think\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages\Model2_9FFC4FC3-0F2A-4A36-858D-02601988B582\v101\Model2_Result_0.msd, jobDir=C:\Users\Think\AppData\Local\Temp\arcgisruntime_7680\Model2.gpk\jobs, maxRecords=1000, outputDir=C:\Users\Think\AppData\Local\Temp\arcgisruntime_7680\Model2.gpk, type=GPMapServer, virtualDir=http://127.0.0.1:50002/VXhSqZ/outputdir/Model2.gpk} res='create' post=0 Crash dump path=
2015-02-02 11:27:25,018: INFO rid=1 'server' gpk_mapserver - SOC exited handled called.
2015-02-02 11:27:25,018: WARN rid=1 'server' gpk_mapserver - Service going to 'crashed' state.
2015-02-02 11:27:25,018: INFO rid=1 'server' gpk_mapserver - Shutdown while being created
2015-02-02 11:27:25,018: INFO rid=1 'server' gpk_mapserver_host - Terminate
GEO processing Server started !!message:socexit:{"error":"Worker process 'Model2.gpk_mapserver_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={cfgName=Model2.gpk, filePath=C:\\Users\\Think\\AppData\\Local\\ArcGISRuntime\\Documents\\ArcGIS\\Packages\\Model2_9FFC4FC3-0F2A-4A36-858D-02601988B582\\v101\\Model2_Result_0.msd, jobDir=C:\\Users\\Think\\AppData\\Local\\Temp\\arcgisruntime_7680\\Model2.gpk\\jobs, maxRecords=1000, outputDir=C:\\Users\\Think\\AppData\\Local\\Temp\\arcgisruntime_7680\\Model2.gpk, type=GPMapServer, virtualDir=http://127.0.0.1:50002/VXhSqZ/outputdir/Model2.gpk} res='create' post=0 Crash dump path=","name":"Model2.gpk_mapserver","processId":-1}
2015-02-02 11:27:25,018: WARN rid=1 'server' AdminWebService - Service create failed. Worker process 'Model2.gpk_mapserver_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={cfgName=Model2.gpk, filePath=C:\Users\Think\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages\Model2_9FFC4FC3-0F2A-4A36-858D-02601988B582\v101\Model2_Result_0.msd, jobDir=C:\Users\Think\AppData\Local\Temp\arcgisruntime_7680\Model2.gpk\jobs, maxRecords=1000, outputDir=C:\Users\Think\AppData\Local\Temp\arcgisruntime_7680\Model2.gpk, type=GPMapServer, virtualDir=http://127.0.0.1:50002/VXhSqZ/outputdir/Model2.gpk} res='create' post=0 Crash dump path=
2015-02-02 11:27:25,018: INFO rid=1 'server' gpk_mapserver - Shutdown while being created
2015-02-02 11:27:25,018: INFO rid=1 'server' gpk_mapserver_host - Terminate
2015-02-02 11:27:25,019: INFO rid=1 'server' gpk_mapserver_host - Destructor - clearing SOC handle
2015-02-02 11:27:25,019: INFO rid=1 'server' gpk - Shutdown while being created
2015-02-02 11:27:25,019: INFO rid=1 'server' gpk_host - Terminate
2015-02-02 11:27:25,019: INFO rid=1 'server' gpk_worker - Terminate
2015-02-02 11:27:25,019: INFO rid=1 'server' gpk_worker - Destructor - clearing SOC handle
2015-02-02 11:27:25,019: INFO rid=1 'server' gpk_host - Destructor - clearing SOC handle
2015-02-02 11:27:35,021: INFO rid= '' WebServer - Lost connection on port 50002
Stopping server
2015-02-02 11:28:38,037: INFO rid=2 'server' AdminWebService - POST admin/shutdown?f=json
2015-02-02 11:28:38,048: INFO rid= 'server' ServerMain - Shutting down
2015-02-02 11:28:38,049: INFO rid= 'server' ServerMain - Terminating web services
2015-02-02 11:28:38,049: INFO rid= 'server' ServerMain - Deleting data directory C:/Users/Think/AppData/Local/Temp/arcgisruntime_7680
2015-02-02 11:28:38,057: INFO rid= 'server' ServerMain - 11 filesystem object(s) removed.
2015-02-02 11:28:38,057: INFO rid= 'server' ServerMain - Server process exiting.
Local server exited, code: 0