Register Database Connection

1500
6
03-23-2018 11:27 AM
EricMahaffey1
Occasional Contributor

I'm trying to register a database connection within ArcGIS Server that is on a different domain than my client (with no trusted bridge).  I can make an admin ArcGIS Server connection from ArcGIS Desktop on my client.  When I then try to register a database connection, I enter the connection information to my "Publisher Database" (on same domain as my client), and that succeeds, however when I try to enter the "Server Database" connection information it fails.  ArcGIS Desktop on my client is trying to validate the connection to a server that it can't see.  Knowing this would be a likely issue, why can't we manually type the connection information in.  That way we can create the .SDE file that's needed to import the connection within ArcGIS Server Manager.  Within the AGS Manager web page, there is only an option to import a connection to the database your trying to register.  If your server environment does not have ArcGIS Desktop, you cannot create a valid file to import. 

My goal is to build a map service within a development environment that's reading data from a SQL Server database on one domain, then migrate that service to a production environment on a different (air gapped) domain.  Maybe I'm doing something wrong.  Can anyone shed some light on this, and help me out? 

0 Kudos
6 Replies
VinceAngelo
Esri Esteemed Contributor

If your server environment does not have ArcGIS Desktop, you cannot create a valid file to import. 

Not true:  You can use the Python within ArcGIS Server to create connection files, via arcpy.CreateDatabaseConnection_management()

The lack of a trusted bridge, however, should prevent any access, so this is really a non sequitur.  The publishing process uses the hostname and connection properties from the local machine's connection to the server to identify the registered connection on the server.  No identical registered connection, no service.

Therefore, you need a mechanism to publish from a trusted host (via RDP or SSH, or possibly both)

- V

EricMahaffey1
Occasional Contributor

Thanks Vince.  I'll see if I can generate the connection file using Python.

0 Kudos
EricMahaffey1
Occasional Contributor

Vince, I finally got a chance to create the SDE file using Python.  I decided to test the workflow on an instance of ArcGIS Server that is reachable from my client ArcGIS Desktop.  So I'm able to create the SDE file, and use it to register the database.  It validates, so I'm assuming all is well.  I've also configured the host file on both my client running ArcGIS Desktop, and the server running ArcGIS Server to use the same reference to the database server.  In this case the IP addresses are the same, and the server name declared in the host file is the same as well.  I'm trying to use the host file to trick ArcGIS Server once I move the SDE, and SD file over to the disconnected network (different IP address, but same server name).  From ArcGIS Desktop I've made my database connection using the server name, loaded one layer (SQL Server view with geometry data type), and have generated and SD file choosing "No Available Connection" for the ArcGIS Server connection.  The file generates, however, when I try to publish it through ArcGIS Server Manager, it fails with this message, "The contents of the selected service definition file is invalid.  Please contact the author of the file."  The ArcGIS Server logs don't really tell me anything, nor do the OS event logs.  The odd thing is I can publish the SD file in ArcCatalog to the same ArcGIS Server connection.  It just won't publish through the ArcGIS Server Manager browser app.  Any thoughts?

0 Kudos
VinceAngelo
Esri Esteemed Contributor

Doing a bait & switch on IPs doesn't appear to be working. I wouldn't ever consider attempting same, so I can't provide any technical feedback, but I am reminded of those Chiffon margarine commercials from the 70's -- "It's not nice to fool Mother Nature!"

- V

0 Kudos
EricMahaffey1
Occasional Contributor

Haha.  Yeah I'm a child of the 70's so I remember those commercials.  In my case I have to be able to fool Mother Nature (a.k.a. ArcGIS Server).  There has to be a work flow for developing map configuration files using a database connection, and transferring them over to multiple environments (i.e. Development, Test, Production).  I'm sure there is something small that I'm missing I just can't figure out what it is.

0 Kudos
EricMahaffey1
Occasional Contributor

Update: I was able to get it to work.  Although I'm not sure why.

  1. Follow the same workflow as I stated above.
  2. RDP into the server running ArcGIS Server
  3. Copy the SD file to that server
  4. Launch ArcGIS Server Manager through the RDP session
  5. Publish the SD file that was copied locally.  Success!

In my case I have one ArcGIS Server environment that is on the same domain as my client (this is our Development architecture).  We have a Test environment on a separate network that is accessible only by using a Citrix web portal which provides RDP access.  Our Production environment is accessed by a VPN and provides RDP as well.  So basically this allows us to move files onto the server, and the ability to run AGS Manager in a local browser on the server.  I have a case started in with Esri Support (#02092400 Help publishing an SD file to an disconnected environment).  I'll post any solutions when they are resolved.

0 Kudos