Select to view content in your preferred language

CreateEnterpriseGeodatabase Tool Fails: Serve machine not found.

466
2
08-10-2023 11:44 AM
mikeytes
New Contributor II

Greetings,

I'm trying to create an enterprise geodatabase using ESRI's built in tools. I tried using the GUI in ArcGIS Pro, but received a "Bad User" error message. So I tried recreating the tool using the script below. I removed all the sensitive information FYI.

Our DevOps team created a PostgreSQL db is located on an AWS instance.

Additionally, we didn't want to install a Desktop instance on the servers that serve our Portal. So I'm running this script on my local machine. For the authorization file parameter, we retrieved the 'keycodes' file from the machine serving our enterprise.

Given the code and traceback below, does anyone have any ideas where we are going wrong in our attempt to create an enterprise gdb?

 

import arcpy
arcpy.management.CreateEnterpriseGeodatabase(
    database_platform="PostgreSQL",
    instance_name="*",
    database_name="*",
    account_authentication="DATABASE_AUTH",
    database_admin="postgres",
    database_admin_password="**",
    sde_schema="SDE_SCHEMA",
    gdb_admin_name="sde",
    gdb_admin_password="**",
    tablespace_name='',
    authorization_file=r"C:/SDE_Connection/keycodes"
)

 

 

 

Traceback (most recent call last):
  File "C:/SDE_Connection/create_sde.py", line 13, in <module>
    authorization_file=r"C:\SDE_Connection\keycodes"
  File "C:\Program Files (x86)\ArcGIS\Desktop10.8\ArcPy\arcpy\management.py", line 5151, in CreateEnterpriseGeodatabase
    raise e
ExecuteError: Server machine not found
Failed to execute (CreateEnterpriseGeodatabase).

 

 

 

0 Kudos
2 Replies
MarceloMarques
Esri Regular Contributor

Install pgAdmin on the machine that you are trying to run this and test if you can connect to the PostgreSQL Instance using pgAdmin and/or psql.

| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov
0 Kudos
A_Wyn_Jones
Esri Contributor

With regards to setting this up via ArcGIS Pro - your user will need superuser status. Here's the documentation which describes the required permissions of the permutations available in AWS:

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/privileges-postgre...

With regards to trying this from ArcGIS Server - it looks like your VM running ArcGIS Server doesn't have access to your PostGres VM. You need to ensure you have allowed connections from this machine (and another clients) in PostGres config (as well as networking/firewall):

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/configure-postgres...

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."