2

I have an Amazon EC2 instance running ArcGIS server 10.3.1. It has been running with security set https. I recently had to change security to mixed mode http and https. Now when the server reboots security changes back to http only, breaking the web adapter that is configured to use SSL. After each reboot I have to change security back to mixed.

Before the change to mixed security the server was running on https only without problem for several years.

Is this expected behavior and is there a way to force the instance to stay on mixed security?

  • What OS are you using? Did you use the cloud builder? – risail Dec 9 '15 at 20:18
  • Using windows server 2008. Yes the cloud builder was originally used. ArcGIS Server 10.1 was originally installed, it's been upgraded manually since then – Dowlers Dec 9 '15 at 20:21
  • when you switch to to https/https in admin and hit update do you wait until the server as completely restarted takes a minute or two, and have you tried to use on https only, if so is the result the same? – risail Dec 9 '15 at 20:24
  • When I change to http/https I wait until all the map services come back up and everything works as expected until the next server reboot. If I set it use just https it stays on https after reboot. This is how the server has been running for past 2 or 3 years. I think I had the same problem back when the server was at 10.1 but can't remember clearly. – Dowlers Dec 9 '15 at 20:29
  • And there is nothing in your log to indicate a problem? – risail Dec 9 '15 at 20:33
1

At some point your install got corrupted it may have been in the upgrade process or it could be in the original AMI ESRI provided at 10.1. Your left with two options.

  1. Use only https only as you said that works. http/https redirects the unsecure request to the secure site. I don't recommend this because it does not solve the problem. And you need to find it.
  2. Rebuild the site which can be done quickly and do it from a new machine there are considerable differences between 10.1 and 10.3 and you can't narrow down if the bug appeared from the beginning or during the servers lifespan...This can be done really quickly:

a. install new server. b. copy the folder /arcgis/server/usr/config-store/data from the "old server" to the "new server". This will register all of the database connections for you. c. write a script that loops over the contents of the directory "/arcgis/server/usr/directories/arcgissystem/arcgisinput" on the "old server" and publishes the mxd to the new server. Do not copy this folder from the old one to the new one the services are more complicated than the DB sde files you will end up with problems. this is the script

import arcpy
from arcpy import env
import os


env.workspace = r"c:\xxx"


outdir = r'C:\xxx'
arcpy.SignInToPortal_server("uname","pword","siteurl")
in_server = r"C:xxx\server.ags"
wrkspace_ssd = r"C:\xxx"
#create a list of mxd files
root = os.walk(r"xxx") #walk /arcgis/server/usr/directories/arcgissystem/arcgisinput

for file in root:
    #print file
    for f in file[2]:
        #print file[2]
        try:
            if f.find(".mxd") > -1:
                service = f[:-4]
                #print service
                mxd = file[0] + "\\" + f
                #print mxd
                sd = wrkspace_ssd + "\\" + service + '.sd'
                #print sd
                sddraft = wrkspace_ssd + "\\" + service + '.sddraft'
                ssd_draft_file = arcpy.mapping.CreateMapSDDraft(mxd, sddraft, service, 'ARCGIS_SERVER')
                #analysis = arcpy.mapping.AnalyzeForSD(ssd_draft_file)
                sd_final = arcpy.StageService_server(sddraft, sd)
                folder = file[0].split('\\')[6]
                #print folder
                arcpy.UploadServiceDefinition_server(in_sd_file=sd, in_server=in_server, in_service_name="", in_cluster="", in_folder_type="EXISTING", in_folder=folder, in_startupType="STARTED", in_override="USE_DEFINITION", in_my_contents="NO_SHARE_ONLINE", in_public="PRIVATE", in_organization="NO_SHARE_ORGANIZATION", in_groups="")
                print "CurrentService: " + service
        except Exception as e:
           print e
print "Done"
arcpy.SignOutFromPortal_server()

This script is not going to create the server folders for you on the new server So either modify the script or create the folders manually on the new server based on the old server and the script will store the folder name and publish them to the "Existing" folder

  • If I were to do this do you see a problem with creating the instance off of existing snapshots of the current instance? The server has a lot of data in SQL Server and migrating the databases and ensuring replicas are still valid would be additional work. If I did a complete uninstall of ArcGIS Server and then a clean install on a new copy of the existing instance do you think it would be enough to fix the corruption? I guess it won't hurt to try. I can always just switch elastic IPs if it works. – Dowlers Dec 10 '15 at 0:40
  • You could try it but I'd be willing to bet the problem will persist...what your seeing is not normal behavior, and I suspect your snapshot will capture the problem. All your data will come over with the above method.you can delete the existing server but make sure you manually get the rest of the files the esri uninstall leaves some folders behind in the server directory, and you will be exposing yourself to down time. What you could try is a restore point using the esri tool and spin up a new aws instance and use the restore tool. I've always found it faster and cleaner to start from scratch. – risail Dec 10 '15 at 0:55
  • I did a complete uninstall and reinstall on a snap shot and it seems to have worked. I hate that ESRI amazon tool and agree that starting for scratch is always cleaner. Anyway it worked and that script to move the services over is awesome. Thanks so much. – Dowlers Dec 11 '15 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.