This thread is getting a bit messy, and I may put as a document after the dev summit, but wanted to put this here for now...just a cut and paste from Word, so formatting is bad, sorry...I will fix that when I get a chance. I will mark this correct so it floats tot he top.
----
Old/current AGS server: AGS 10.2.1; Windows Server 2008 R2
New AGS server: AGS 10.5.1; Windows Server 2012 R2.
Task: Move current ArcGIS Server 10.2.x services over to new to the new ArcGIS Server 10.5.x server.
Issue: Our services do not use the Web-Mercator Aux (WMA) spatial reference (SR), which seems to be the default. We also use a different set of tile scales. This causes issues with cached services that are being move over. These instructions were developed by working thru the issues caused by these non-(by design)-standard parameters.
Comments:
- For non-cached services, the TransferServices toolbox works well. https://github.com/eea/discomap.ServiceTransferTool I modified the tool GUI/paramenters for our use to limit the server selection to our servers, and also added a feature to read a secure settings.ini file for the admin credentials, to reduce logins and/or hardcoding. But it is pretty ready-to-run from the github site.
- For cached services, at least those that do not use WMA for the SR and/or with a cache in the 10.2.x compact format, it did nor work well.
- I have not tried it on the GP services yet, but will be soon.
- Some of these steps for the cached services could be automated, but I prefer to manually process so I can review each step. I had to repeat the process several times for some that burped for some reason.
Steps for moving cached, non-WMA service from AGS 10.2.x (compact) to AGS 10.5.x (compact)
this probably works will other upgrade from 10.2.x format, but this is what we needed.
On 10.2.x machine:
- Find the \arcgisserver\directories\arcgiscache\<service> folder and copy it over to a temp/holding folder on the 10.5.x machine
- I like to use ArcCatalog to navigate directly to that folder I just copied to preview the cache. This is a good way to make sure all the files copied correctly (it is external to any service)
On the new 10.5.x machine:
- Create new service from the mxd. Do not turn caching on.
- In ArcCatalog:
- open Service Properties for new service, turn caching on specifying a current service with cache, if you can. Check to create tiles manually.
- Stop service
- Exit ArcCatalog (not necessary, but prevents being in wrong place/folder)
- Edit \arcgisserver\directories\arcgiscache\newService>\Layers\conf.xml
- I prefer NotePad++ or other editor that has XML Tools and Compare http://docs.notepad-plus-plus.org/index.php/Plugin_Central
- Use XML Tools to “pretty, with line breaks”
- Verify that coordinate system is correct for your cache.
- Scroll to bottom and remove the “V2” from
<StorageFormat>esriMapCacheStorageModeCompactV2</StorageFormat> - Save
- Exit
- Using File Explorer, copy all the “L##” folders from the temp location from Step 1, into same location in the new \arcgisserver\directories\arcgiscache\<newService>\Layers folder (most often the _alllayers folder)
- Make sure you move to another folder when copy is complete, or close File Explorer.
- In ArcCatalog, start new service. Do Not Preview, at this time (stay on Content tab)
- Run: Server Tools -> Caching-> Upgrade Map Server Cache Storage Format
- At this point, you can use the same process as step 2, but do not use the preview tab (will still be blank)
- Run: Server Tools -> Caching-> Manage Map Server Cache Status
- I like to right click the service and “View Cache Status” at this time.
- You can now use Preview tab.
- It may take a few extra seconds the first time.
- If the cache does not appear (and you know it should at this scale), try closing and re-opening ArcCatalog.
- If still no luck, try viewing with a “good” layer in ArcMap. Make sure the spatial reference/projection and extent are correct.
- If still having issues, try deleting the service, looking a the conf.xml file and starting it again. I have had things burp/corrupt, but a second run worked.
- For one of my services, I had to modify the conf.cgi file by renaming it .txt editing, then changing it back. This is not recommended unless you feel comfortable with the xml code within.
- I recommend checking things thoroughly, including making sure the \arcgisserver\directories\arcgiscache\<service>\Layers\_alllayers\L## folders look like they are populated correctly.
Things I tried that didn’t work (even if initially they looked like they did):
- Tried using the TransferService tool. Did not work, as stated above.
- I thought creating the TPK and importing that worked, instead of the manual copy, but at least for my service, it dropped two tile scales. This may be due to the large extent (Alaska) of the service or other
- If there was a 10.2.2 cache or cache folder for the services (whether or not is was used), the service is trying to create a cache folder on 10.5.1, but it creates the conf.xml with WMA as the spatial-reference/projection and (maybe) with the default scales.
- If I copy the compress 10.2.2 cache over before creating the service, it does not recognize the cache. (i.e., not correct compact format)
If I make sure these isn’t a cache folder, then try to read in the schema of the 10.2.2 cache, it gave me an error
If I use 10.5.1 ArcCatalog to create a new schema file, it will recognize the schema, but if I have the cache folder in place, it gives me an error
- I was not able to import the cache from the 10.2.2 service…error #1 above.
- I exported a tpk from 10.2.2, but again an error when trying to import. When I did get it to work, it was incomplete.
- If I remove the cache folder, then use the new schema file to setup the cache, it worked…or didn’t give me an error…but then when I try to load the tiles from the tpk, I got a lot of errors. When I look at the preview, it is blank. Went to look at the tile schema it created, and it is tried to use WMA even though the mxd and the dataframe and data in it are all Alaska Albers.
Created new tiling schema, this time specifying the output coordinates as Alaska Albers, and that somewhat worked, but still wanted to default to WMA.