I have an ArcGIS server instance running on a cloud server on Amazon built using the Cloud Builder tool. It's running on Ubuntu and is version 10.3. ArcGIS for Server is running, and works perfectly with data copied to the server.
I've created an Enterprise Geodatabase in PostgreSQL on the same cloud server. The database creation worked with no errors, and I've loaded data into the database. I created the database using ArcCatalog on my local system. I can connect to the database from ArcMap and ArcCatalog on my local machine. When I try and register the database with ArcGIS for Server on the cloud server, I get the following error message:
The connection property set was missing a required property or the property value was unrecognized. Underlying DBMS error[timeout expired SQL state: ]
I've tried changing authentication_timeout, statement_timeout, and lock_timeout to a few different values in the postgresql.conf file with no change.
I've tried executing the arcpy.CreateDatabaseConnection_management function on the cloud server, and it outputs:
timeout expired
Connection to database 'arcgis' failed.
timeout expired
timeout expired
Connection to database 'arcgis' failed.
timeout expired
<Result 'Z:\\gisdata\\ArcGIS_AWS.sde'>
Despite the messages, it succesfully creates the connection file. If I try and register the database with that connection file, I still get the same error message as above.
Looking in the folder /arcigs/server/bin/ I see all of the .dll files required to connect to PostgreSQL.
What am I missing? Why can't I register this geodatabase with the Server?
Have you updated the pg_hba.conf file to allow connections from the Server machine, even though it's on the same machine as the Server? 127.0.0.1 is probably listed, but it may need the actual IP address of the machine itself as it may see the connection coming from the private IP address, (10.x.x.x), instead of the 127.0.0.1 ip address.
I meant to mention that in the original post. pg_hba.conf is updated. I can successfully connect to the database on the cloud server from my local computer using ArcMap, ArcCatalog and pgAdmin.
Right, but I think if your Postgres database and your ArcGIS Server are both on a machine with an IP address of 10.0.0.1, you also need to add 10.0.0.1 to the pg_hba.conf file to make sure that Server can connect to the database. By default, PG can connect to itself through 127.0.0.1, (it's local IP address), but Server, as a client, won't be able to connect because it's trying to make the connection through 10.0.0.1. I'd run ifconfig on the machine and see if adding the IPV4 address helps.