ERROR

ERROR 000005: Could not open the address locator

Last Published: April 28, 2021

Error Message

Executing a Python script containing a rebuild address locator function returns the following error message:

Error:   
ERROR 000005: Could not open the address locator. 
Failed to execute (RebuildAddressLocator).
Image of the error message

Cause

This issue can occur for the following reasons.

Detached Records

Prior to rebuilding an address locator, if new records are added to the database, the conflicting outdated records that are still associated with the original address locator name are retained in the repository tables used by the ArcGIS Server service. These detached records prevent the system from rebuilding the address locator due to conflicts with the new records.

Note:
Although the address locator can be rebuilt with a different name, to rebuild the address locator with the original name, refer to the Solution section on removing detached records. 

Locks

The error is returned as active locks are in place on the address locator, preventing the address locator from being rebuilt. The active locks are in place as there are other services still accessing the geocoding service. For more information on how locks work, refer to ArcMap: Schema locking.

32-bit vs. 64-bit

Executing the rebuild address locator script in a 64-bit command line returns this error as the script may call upon tools or functions that are not supported by a 64-bit environment. There are instances where some ArcMap tools and programs run in the 64-bit environment despite a 32-bit installation of ArcMap. For more information, refer to ArcMap: Background Geoprocessing (64-bit).

Solution or Workaround

Follow the steps for the solution which corresponds to the cause of the issue to find a solution.

Remove Detached Records

  1. Identify the name of the address locator which must be rebuilt.
  2. Create a backup of the server database.
  3. Run the following queries in the database to remove detached records from the <locator_name>_lox, SDE_locators, SDE_metadata, SDE_table_registry, SDE_column_registry, and GDB_items system tables:
DELETE FROM <locator_name>_lox WHERE name = <address_locator_name>;
DELETE FROM SDE_locators WHERE name = <address_locator_name>;
DELETE FROM SDE_metadata WHERE name = <address_locator_name>;
DELETE FROM SDE_table_registry WHERE name = <address_locator_name>;
DELETE FROM SDE_column_registry WHERE name = <address_locator_name>;
DELETE FROM GDB_ITEMS WHERE name = <address_locator_name>;
Note:
The tables listed above are system tables containing records of an address locator. 
  1. Execute the Python script to rebuild the address locator.

Stop the Service

  1. Stop the ArcGIS Server service.
  2. Execute the script to rebuild the address locator.
  3. Start the service.

For more information on how to start and stop a service, refer to ArcGIS Help: Start and stop services.

Run the script in the 32-bit environment

Execute the script with the 32-bit version Python command line interface instead of the 64-bit version. The 32-bit version can be found in:

C:\Python27\ArcGIS10.x\python.exe

Additionally, if the script is executed using the Python console in ArcMap and it fails, change the Windows file association setting to run Python with in the 32-bit environment. For steps on how to do so, refer to FAQ: Why do Python scripts fail on a machine with both ArcGIS for Server and Desktop installed?

Article ID: 000014439

Software:
  • ArcGIS Server
  • ArcMap 10 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options