R-ArcGIS / r-bridge-install

Install the R ArcGIS Tools
Apache License 2.0
188 stars 59 forks source link

R geoprocessing tool failing on ArcGIS Server #71

Closed notoriusjack closed 6 years ago

notoriusjack commented 6 years ago

I have an R script which I successfully tested on Desktop and published as a geoprocessing tool but when I run the service I get the following error message:

Failed to initialize R interpreter. Please install recent version R for Windows Failed to execute (SearchString). Failed to execute (SearchString).

Do I need to have R installed in the same environment of ArcGIS Server?

scw commented 6 years ago

@notoriusjack Yes, you'll need to install both R and the bridge on the server hosting the Geoprocessing service. You can install a normal R installation on the server, and install the package directly from within R:

install via RGui

The archive containing the package is available here.

If that doesn't work, report back here and we can dig deeper.

notoriusjack commented 6 years ago

Thank you for replying. I have tried that but I got the following error message:

library(arcgisbinding) *** Please call arc.check_product() to define a desktop license. arc.check_product() Error: Could not bind to a valid ArcGIS Pro installation.

notoriusjack commented 6 years ago

Do I really need to also install ArcGIS Pron on the server?

scw commented 6 years ago

@notoriusjack No, you won't need Pro, that message could use reworking. If a 64-bit Server environment is available, that will work fine as well. What type of license is being used by Server?

notoriusjack commented 6 years ago

IT made a mistake and installed R on the server controlling Portal. Apologies for the confusion.

However after installing R on the servers controlling ArcGIS Server I am still encountering a problem with the installation.

If I try to install arcgisbinding on the 64 bit version of R I get the following message: Error: Could not bind to a valid ArcGIS Pro installation. Found ArcGIS Desktop (32-bit) Version 10.5.6491. You'll need to use the 32-bit version of R.

But if I try to install it on the 32 bit version of R it says it cannot find an ArcGIS Desktop installation with the message: Could not bind to a valid ArcGIS Desktop installation.

I'm puzzled

notoriusjack commented 6 years ago

Resolved!

Even if you get that error message that it cannot find the Desktop installation the script will run correctly anyway from a published geoprocessing service.

scw commented 6 years ago

@notoriusjack Great! Glad you were able to get up and running. That's correct, currently the standalone R interpreter from R doesn't work directly from Server, but it works fine in a Geoprocessing Service context. We are working on updated documentation for working with R and Server, and will be sure to include this information.

Cheers, Shaun