Workaround: and new title: Migrating non-WMA 10.2.x cached service to 10.5.x

294
2
Jump to solution
02-20-2018 04:22 PM
RebeccaStrauch__GISP
MVP Esteemed Contributor

Original post ...workaround is in the comments for now:  I am currently migrating our ArcGIS Server Enterprise Advanced (AGS) 10.2.2  services and caches to a new AGS 10.5.1 server.  We use the Alaska Albers projection (3338). I am using the TransferServices toolbox, and it seems to work well for most services. 

For those services that are dynamic, the service has no issues keeping the services in Alaska Albers.

However, for any service that has a cache, or even had a cache folder (even if the service is now dynamic), the new service creates a tile scheme with WMA.

I have tried several ways to try to "trick" it into ready the Alaska Albers tile scheme, but have had no luck.  I even tried several times to generate a new tile scheme, using the sourc (alaska Albers) mxd as input, and when as far as setint the "output coordinates" under the Environment tab to 3338, and yet the output tile scheme .xml says WMA.

I know the whole world would be happier if we conceeded to using WMA and not Alaska Albers, but unless you are using 3D (which we are not at this time), Alaska Albers works so such better.

Is there a bug in the "Generate Map Server Cache Tiling Scheme" and caches in general for AGS 10.5.1?

I do have a call into tech support.  We are just now trying to move to 10.5.1, so I think asking to move to 10.6.x might be asking for another delay.  However, not sure what to do about this.  For this particular service (lines), I could probably go dynamic, but we have quite a few cache raster map-services (i.e. base maps) that this could be a major issue.  Thanks for any suggestions (I'll let you know if I've already tried and ruled out).

Alaska GIS Users

1 Solution

Accepted Solutions
RebeccaStrauch__GISP
MVP Esteemed Contributor

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:

  1. Find the \arcgisserver\directories\arcgiscache\<service> folder and copy it over to a temp/holding folder on the 10.5.x machine
  2. 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:

  1. Create new service from the mxd. Do not turn caching on.
  2. 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)
  1. Edit \arcgisserver\directories\arcgiscache\newService>\Layers\conf.xml
  2. I prefer NotePad++ or other editor that has XML Tools and Compare http://docs.notepad-plus-plus.org/index.php/Plugin_Central
  3. Use XML Tools to “pretty, with line breaks”
  4. Verify that coordinate system is correct for your cache.
  5. Scroll to bottom and remove the “V2” from
    <StorageFormat>esriMapCacheStorageModeCompactV2</StorageFormat>
  6. Save
  7. Exit
  8. 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)
  9. Make sure you move to another folder when copy is complete, or close File Explorer.
  10. In ArcCatalog, start new service. Do Not Preview, at this time (stay on Content tab)
  11. Run: Server Tools -> Caching-> Upgrade Map Server Cache Storage Format
  12. At this point, you can use the same process as step 2, but do not use the preview tab (will still be blank)
  13. Run: Server Tools -> Caching-> Manage Map Server Cache Status
  14. I like to right click the service and “View Cache Status” at this time.
  15. You can now use Preview tab.
    1. It may take a few extra seconds the first time. 
    2. If the cache does not appear (and you know it should at this scale), try closing and re-opening ArcCatalog.
    3. If still no luck, try viewing with a “good” layer in ArcMap. Make sure the spatial reference/projection and extent are correct.
    4. 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.
    5. 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.
  16. 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.

View solution in original post

2 Replies
RebeccaStrauch__GISP
MVP Esteemed Contributor

EDIT: IGNORE my suggestions to use the TPK for this process....had more problems.  Leaving this comment in in case there is somethig that will help others...but see next comment for additional info.

I'm not sure that this is the proper way to upgrade my 10.2.2 cached services to 10.5.1, but I figured out a workflow that seems to be working ok (after two services moved).  I'm not sure if it will work for my basemap map services, but that is for tomorrow.  

Part of my issue was that since the first few attempts failed miserably, when I tried to generate a fresh 10.5.1 tile schema, it still was grabbing WMA even though I tried everything to override it.  A (OS) ArcGIS Server service restart didn't do it, but a stop and start seemed to help.  I was then able to generate a new tile schema with my scales and with Alaska Albers.  (whoooo).

So, in a nutshell, this is what is working at this point:

  • I created a TPK of the cache on the 10.2.2 machine
  • I created a 10.5.1 service from the original mxd (with caching turned off)
  • I switched on caching (vs dynamic) for the new server…turned auto creation aff…read in the new .xml file that says alaska albers.
  • Then imported the tpk.

I did get errors about missing tiles for the larger scales, but I think those are in the water, where I purposely didn't cache in the first place.  So far it is looking ok, but tomorrow is another day and more services.

btw - for those that use the TransferServices Toolbox, I thik this problem started with this tool, but only for the cached services, or with a cache directory for the service on the source server (whether or not it was a dynamic or cached service).  However, that tool is pretty nifty for about 70-80% of our services successfully.  For thos wanting to know where I found it..

How copy map service from one ArcGIS server to another ArcGIS server 

The best practice to transfer the ArcGIS Server data from one machine to another, 

You have to read thru the notes.  

I will close this thread but will add any other tricks I find or if tech support tells me the way I should be doing this.

RebeccaStrauch__GISP
MVP Esteemed Contributor

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:

  1. Find the \arcgisserver\directories\arcgiscache\<service> folder and copy it over to a temp/holding folder on the 10.5.x machine
  2. 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:

  1. Create new service from the mxd. Do not turn caching on.
  2. 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)
  1. Edit \arcgisserver\directories\arcgiscache\newService>\Layers\conf.xml
  2. I prefer NotePad++ or other editor that has XML Tools and Compare http://docs.notepad-plus-plus.org/index.php/Plugin_Central
  3. Use XML Tools to “pretty, with line breaks”
  4. Verify that coordinate system is correct for your cache.
  5. Scroll to bottom and remove the “V2” from
    <StorageFormat>esriMapCacheStorageModeCompactV2</StorageFormat>
  6. Save
  7. Exit
  8. 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)
  9. Make sure you move to another folder when copy is complete, or close File Explorer.
  10. In ArcCatalog, start new service. Do Not Preview, at this time (stay on Content tab)
  11. Run: Server Tools -> Caching-> Upgrade Map Server Cache Storage Format
  12. At this point, you can use the same process as step 2, but do not use the preview tab (will still be blank)
  13. Run: Server Tools -> Caching-> Manage Map Server Cache Status
  14. I like to right click the service and “View Cache Status” at this time.
  15. You can now use Preview tab.
    1. It may take a few extra seconds the first time. 
    2. If the cache does not appear (and you know it should at this scale), try closing and re-opening ArcCatalog.
    3. If still no luck, try viewing with a “good” layer in ArcMap. Make sure the spatial reference/projection and extent are correct.
    4. 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.
    5. 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.
  16. 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.

View solution in original post