Esri / arcgis-cookbook

Chef cookbooks for ArcGIS
Apache License 2.0
298 stars 116 forks source link

IP Changes #19

Closed pkdavidson closed 9 years ago

pkdavidson commented 9 years ago

Been dealing with an unusual issue: I created an all-in-one Portal/Server/DStore, etc... with the Chef cookbooks under Windows. This was done on a VM Workstation virtual Win2012R2 server. We then put it up onto VM Sphere.

Apparently, when this happened, the mac changed which then changed the IP address of the server. Server and Portal were working after I re-imported the security cert.

But the DataStore was not accessible and kept giving me an error. It kept trying to connect to the IP address of the original VM box.

I tried uninstalling and reinstalling Data Store and the Web Adaptors but no luck.
DataStore somewhere had something tied to the original IP. I did all my work with URLs to try to avoid these problems.

I'm now uninstalling everything and thanks to Chef, hope it should be a fairly quick re-install.

Any idea how to fix this sort of issue? Where might that IP be hard coded? I searched all files under Program Files\ArcGIS and found it only in C:\Program Files\ArcGIS\Server\DatabaseSupport\dsconnections.lst and changing it there made difference.

A lot of googling and GeoNetting yielded no real answers to this.

Now that I'm aware of the issue, I think we can prevent this by keeping IPs and macs when we go from my VMWorkstation setups to the Sphere....

Thanks

pbobov commented 9 years ago

Paul,

I think I know what the problem is.

Take a look at C:\Program Files\ArcGIS\DataStore\framework\etc\hostidentifier.properties file.

The cookbook sets nodet['data_store']['preferredidentifier'] attribute to 'ip' by default. Actually, the right default value for this attribute is 'hostname'. 'ip' should only be used in environments where hostnames do not work (like Amazon VPC).

Please try setting 'preferredidentifier' to 'hostname' in node.json file:

{
... 
  "data_store" :  {
    ...
   "preferredidentifier" : "hostname",
   ...
  }
...
}

Regards, Pavel

pkdavidson commented 9 years ago

Excellent, thanks Pavel!

pbobov commented 9 years ago

I need to change the default value for node['data_store']['preferredidentifier'] attribute in the cookbook to 'hostname'. So I'll keep the issue open until it is done.

pkdavidson commented 9 years ago

And, yes, preferred identifier was set to ip

pbobov commented 9 years ago

The default value of node['data_store']['preferredidentifier'] attribute is changed to 'hostname'.