Select to view content in your preferred language

"Join Features" Geoanalytics Desktop Tool Traceback Error

909
3
Jump to solution
04-10-2024 05:07 AM
Labels (3)
janine_mapss
Occasional Contributor

Hi there,

I am attempting to run the "Join Features" Geoanalytics tool in ArcGIS Pro to join a shapefile and a table with zonal statistics extracted from a raster. I am running a one to one join and keeping all target features.

Every time I attempt to run this tool I get the following error: 

Traceback (most recent call last):
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_desktop_joinfeatures.py", line 34, in <module>
    keepAllTargetFeatures=get_value(11, dict=d.join_keep_target),
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\gautils\utilities.py", line 112, in run_ga_desktop_tool
    gax = get_client()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\gautils\utilities.py", line 97, in get_client
    return jobclient.JobClient(spark)
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_spark\local\jobclient.py", line 11, in __init__
    self._jgp = spark._sc._gateway.jvm.com.esri.arcgis.gae.desktop.DesktopPythonEnvironment.getJobClient()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_spark\local\_launcher.py", line 50, in __getattr__
    self._lazy_init()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_spark\local\_launcher.py", line 55, in _lazy_init
    self._spark = get_or_create()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_spark\local\_launcher.py", line 66, in get_or_create
    _spark = _initialize_spark()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\ga_spark\local\_launcher.py", line 239, in _initialize_spark
    sc = SparkContext(gateway=gateway)
  File "c:\program files\arcgis\pro\Java\runtime\spark\python\lib\pyspark.zip\pyspark\context.py", line 200, in __init__
  File "c:\program files\arcgis\pro\Java\runtime\spark\python\lib\pyspark.zip\pyspark\context.py", line 287, in _do_init
  File "c:\program files\arcgis\pro\Java\runtime\spark\python\lib\pyspark.zip\pyspark\context.py", line 417, in _initialize_context
  File "c:\program files\arcgis\pro\Java\runtime\spark\python\lib\py4j-0.10.9.7-src.zip\py4j\java_gateway.py", line 1587, in __call__
  File "c:\program files\arcgis\pro\Java\runtime\spark\python\lib\py4j-0.10.9.7-src.zip\py4j\protocol.py", line 326, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling None.org.apache.spark.api.java.JavaSparkContext.
: org.apache.spark.SparkException: Invalid Spark URL: spark://HeartbeatReceiver@Janine_MAPSS.Dlink:64213
at org.apache.spark.rpc.RpcEndpointAddress$.apply(RpcEndpointAddress.scala:66)
at org.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:140)
at org.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:102)
at org.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:110)
at org.apache.spark.util.RpcUtils$.makeDriverRef(RpcUtils.scala:36)
at org.apache.spark.executor.Executor.<init>(Executor.scala:250)
at org.apache.spark.scheduler.local.LocalEndpoint.<init>(LocalSchedulerBackend.scala:64)
at org.apache.spark.scheduler.local.LocalSchedulerBackend.start(LocalSchedulerBackend.scala:132)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:235)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:590)
at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:374)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
at java.base/java.lang.Thread.run(Unknown Source)
 
 
Failed script Join Features...
Failed to execute (JoinFeatures).
 
I have run this same tool with the same files and parameters on several other computers (including one that was the exact same model as mine) with no issues. I  had ArcGIS Pro version 3.0 when I first encountered the error but updating to the latest version (3.2.2) did not fix the issue. I also completey uninstalled and reinstalled Pro which did not help. either. 
 
A solution for a previous post about a similar issue suggested installing Pro under Progam Files rather than Program Files (x86) on Windows but I have always had Pro installed under Program Files so I do not think this is the issue. 
0 Kudos
1 Solution

Accepted Solutions
DerekGourley
Esri Contributor

Hi,

Thanks for the question and for sharing the error message. The error is occurring due to the underscore in the computer name (Janine_MAPSS). The following Microsoft documentation covers the allowed and disallowed characters for a computer name: https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/naming-conventions-fo...

 

The good news is that this error can be fixed without renaming the computer. To run GeoAnalytics Desktop tools on a computer that has an underscore in the computer name, add a new environment variable with the following settings:

  • Variable name: SPARK_LOCAL_HOSTNAME
  • Variable value: localhost

On Windows it will look like this:

DerekGourley_0-1713203485723.png

 

The following documentation covers the process of adding a new environment variable: https://support.esri.com/en-us/knowledge-base/edit-an-environment-variable-1462478594981-000002146


Thanks,
Derek Gourley
GeoAnalytics Product Engineer

View solution in original post

3 Replies
DerekGourley
Esri Contributor

Hi,

Thanks for the question and for sharing the error message. The error is occurring due to the underscore in the computer name (Janine_MAPSS). The following Microsoft documentation covers the allowed and disallowed characters for a computer name: https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/naming-conventions-fo...

 

The good news is that this error can be fixed without renaming the computer. To run GeoAnalytics Desktop tools on a computer that has an underscore in the computer name, add a new environment variable with the following settings:

  • Variable name: SPARK_LOCAL_HOSTNAME
  • Variable value: localhost

On Windows it will look like this:

DerekGourley_0-1713203485723.png

 

The following documentation covers the process of adding a new environment variable: https://support.esri.com/en-us/knowledge-base/edit-an-environment-variable-1462478594981-000002146


Thanks,
Derek Gourley
GeoAnalytics Product Engineer
janine_mapss
Occasional Contributor

This solved the problem, thank you so much! 😄

0 Kudos
Merce_UCR
New Contributor

Hello I have the same issue when we trying to run de Random Forest Based. I solve the issue with this!

0 Kudos