R Script in Geoprocessing Service

568
7
02-17-2014 03:53 PM
by Anonymous User
Not applicable
Has anyone had success in calling an R script in a Geoprocessing service?  I have a Python script in ArcToolbox which calls an R script as part of the process.  This runs fine in ArcGIS Desktop but fails as a web service.  I thought it had something to do with the file path but have tried every combination I could think of and still no luck.

I also went through this tutorial and still have not had success.

Any ideas??

Thanks!
Tags (2)
0 Kudos
7 Replies
KevinHibma
Esri Regular Contributor
To confirm, you have installed R on the Server (with 64bit Python)?
0 Kudos
by Anonymous User
Not applicable
Yes both R (3.0.2) and Python (2.7.6 (64bit)) are installed on the server.  And the server OS is Windows Server 2008 Standard v6 SP2
0 Kudos
KevinHibma
Esri Regular Contributor
Can you post the full error?

If you get on the machine, can you run your script using the 64bit version of Python? And then trying the service, it only fails there?
If thats the scenario, then something has gone wrong in the published service. If you can't run the script in 64bit Python (like at command line), then the issue could be a configuration problem.
0 Kudos
by Anonymous User
Not applicable
I am able to run the Python script on the server without issue.  The output is the expected result.  What could the config issue be with the service?
0 Kudos
KevinHibma
Esri Regular Contributor
Can you make sure the GP Service has INFO level messages (at the service level, not the server logs), and get that error message?
It should provide a clue.
0 Kudos
by Anonymous User
Not applicable
The message level is set to INFO and the only message returned is "Failed to execute".  There is nothing more specific.

I have R installed on the server as well as ArcGIS Desktop.  I tested the tool in ArcGIS desktop (on the server) and it runs successfully.  When I run the geoprocessing service it fails. 

The file paths to the R script are parameters and I have tried every imaginable file path.

Any ideas?
0 Kudos
FengZhang2
Occasional Contributor
Does your ArcGIS server account (e.g., arcgis) has the permission to access R.exe and the R script?
0 Kudos