Identify Staging Problems

To troubleshoot issues with replicating from a staging environment to a production or development environment, follow this process.

When staging problems occur, isolating problem causes can help formulate a solution.

This example covers staging from the Staging environment to Production, but the same steps apply to any staging process running from staging to development.

Note

  1. Monitor the job status of the data replication process on the Staging instance.

  2. If it fails, look at the staging logs for failure messages.

  3. Look at the staging logs of the Staging instance first.

  4. Look at the most recent staging log file. A single staging log often contains several days’ worth of staging events in one file.

    1https://staging.web.customerName.demandware.net/on/
    2demandware.servlet/webdav/Sites/Logs

    This only works with Firefox. Microsoft Internet Explorer isn’t supported.

  5. Look for the beginning of the replication process in the logs. It will have a similar timestamp to the data replication task you started. (individual tasks created in Business Manager)

    1[2007-01-15 21:17:12.848 GMT] ISH-CORE-2250: New replication task "1168895828901" in domain "Sites-Site" successfully created.
    2[2007-01-15 21:18:34.171 GMT] ISH-CORE-2250: New replication task "1168895910472" in domain "Sites-customerName" successfully created.
    3[2007-01-15 21:21:13.574 GMT] ==========================================================================
    4[2007-01-15 21:21:13.574 GMT] ReplicationPublication process created.
    5[2007-01-15 21:21:13.575 GMT] Start date: Mon Jan 15 21:21:12 GMT 2007
    6[2007-01-15 21:21:13.575 GMT] TargetSystem: Production (http://216.75.207.174:80)
    7[2007-01-15 21:21:13.575 GMT] Process uuid: bcvh6iaalTxJYaaacowN3YFqCG)
    8[2007-01-15 21:21:13.575 GMT] --------------------------------------------
  6. Scroll down through the log file. You will see the job go through steps such as gathering stats for all tables:

    1[2007-01-15 21:27:06.602 GMT] ISH-CORE-2070: SQL (64ms, rows=1): begin dbms_stats.gather_table_stats(user, 'PRODUCTOPTION_AV$1', method_opt => 'for all indexed columns', cascade => TRUE); end;
    2[2007-01-15 21:27:06.654 GMT] ISH-CORE-2070: SQL (52ms, rows=1): begin dbms_stats.gather_table_stats(user, 'PRODUCTOPTION$1', method_opt => 'for all indexed columns', cascade => TRUE); end;
    3[2007-01-15 21:27:06.826 GMT] ISH-CORE-2070: SQL (171ms, rows=1): begin dbms_stats.gather_table_stats(user, 'BUNDLEASSIGNMENT$1', method_opt => 'for all indexed columns', cascade => TRUE); end;
    4[2007-01-15 21:27:06.869 GMT] ISH-CORE-2070: SQL (43ms, rows=1): begin dbms_stats.gather_table_stats(user, 'PRODUCTOPTIONPRICE_AV$1', method_opt => 'for all indexed columns', cascade => TRUE); end;
    5[2007-01-15 21:27:06.869 GMT] ISH-CORE-2067: Starting new transaction...
    6[2007-01-15 21:27:06.872 GMT] ISH-CORE-2069: Commit transaction.
    7[2007-01-15 21:27:06.882 GMT] ISH-CORE-2067: Starting new transaction..
  7. Next you will see the rsynch running which gets the actual file system directories ready for copying to the target instance

    12007-01-15 21:27:08.317 GMT] StagingGroup: Site specific content search index (Relative directory: search/content)
    2[2007-01-15 21:27:08.317 GMT] ISH-CORE-2486: Synchronize Files of unit 'Sites-customerName-Site' in site 'Sites-customerName-Site' to exchange directory at '/remote/aaas/staging/stg'.
    3[2007-01-15 21:27:08.318 GMT] Executing command: /build/2.0.0/system/bin/synchronize.sh /remote/aaas/aaas_stg/sharedata/sites/Sites-customerName-Site/1/search/content/
    4/remote/aaas/staging/stg/Sites-customerName-Site/search/content/ ()
    5[2007-01-15 21:27:08.402 GMT] rsync debug (/usr/bin/rsync -tr --delete /remote/aaas/aaas_stg/sharedata/
    6sites/Sites-customerName-Site/1/search/content/ /remote/aaas/staging/stg/Sites-customerName-Site/
    7search/content/)
    8[2007-01-15 21:27:08.476 GMT] ISH-CORE-1956: Files in path 'search/content' of site 'Sites-customerName-Site' are successfully prepared
  8. The final step on the Staging instance should be a handoff to the target (Production server). Its staging log entry resembles the following line.

    1[2007-01-15 21:27:09.783 GMT] Staging pipeline in live system successfully called.
  9. If you don’t see this success message, look for errors such as the following and follow the recommended steps.

    1ISH-CORE-2491: Setting state of process with uuid='dC8KAANna1AAAAEOTN9h9md4' from 'StartingStagingProcess' to 'ErrorAcquiringEditingLocks

Fix Staging Problems 

If you identify a staging problem, follow this process.

  1. Stop and restart the staging and target instance via Control Center.

  2. Repeat the failed staging process with the same parameters.

  3. If the staging environment log shows no errors, look at the production staging log.

    1https://production-web-customerName.demandware.net/on/demandware.servlet/webdav/Sites/Logs
  4. Production staging logs will start with a message that looks like this.

    12007-01-15 20:29:30.321 GMT] Copy staging process with uuid=bcFvkiaalTMxMaaaco4bVYFqBX[2007-01-15 20:29:32.347 GMT] Starting StagingResources-Acquire@Sites-Site (
  5. Depending on what you are staging, you will see the database table copy begin.

    1[2007-01-15 20:30:20.296 GMT] ISH-CORE-2070: SQL (123ms, rows=1): INSERT /*+ APPEND */ INTO CATALOG$1 dest SELECT CATALOGDOMAINID,ID,TYPECODE,STATUS,PROXYFLAG,STARTMAINTENANCE,
    2ENDMAINTENANCE,POSITION,UUID,OCA,DOMAINID,LASTMODIFIED FROM CATALOG$S src WHERE src.DOMAINID NOT IN ('bcIxgiaalXEYQaaacmKaN9rLDa')
    3[2007-01-15 20:30:20.665 GMT] ISH-CORE-2070: SQL (369ms, rows=0): TRUNCATE TABLE CATALOGSITEASSIGNMENT$1 REUSE STORAGE
    4[2007-01-15 20:30:20.769 GMT] ISH-CORE-2070: SQL (100ms, rows=1): INSERT /*+ APPEND */ INTO CATALOGSITEASSIGNMENT$1
  6. After copying, we switch from temp to source tables $2 to $1.

    1[2007-01-15 20:35:43.935 GMT] ISH-CORE-2300: <dbms_output> Switching synonym PRODUCT_AV from PRODUCT_AV$2 to PRODUCT_AV$1...
    2[2007-01-15 20:35:43.935 GMT] ISH-CORE-2300: <dbms_output> Switching synonym DELETEDPRODUCT from DELETEDPRODUCT$2 to DELETEDPRODUCT$1...
    3[2007-01-15 20:35:43.935 GMT] ISH-CORE-2300: <dbms_output> Switching synonym PRODUCT from PRODUCT$2 to PRODUCT$1...
    4[2007-01-15 20:35:43.935 GMT] ISH-CORE-2300: <dbms_output> Switching synonym PRODUCTLINK from PRODUCTLINK$2 to PRODUCTLINK$1...
    5[2007-01-15 20:35:43.935 GMT] ISH-CORE-2300: <dbms_output> Switching synonym PRODUCTOPTION from PRODUCTOPTION$2 to PRODUCTOPTION$1
  7. If it finishes successfully, you will see the following message at the end of the logs.

    1[2007-01-15 21:31:17.434 GMT] ReplicationPublication process finished with state 'StagingProcessCompleted'.
    2[2007-01-15 21:31:17.435 GMT] Process uuid: cfbcMiaalTlpoaaado7llYFqCL)
    3[2007-01-15 21:31:17.435 GMT] End date: Mon Jan 15 21:31:16 GMT 2007
    4[2007-01-15 21:31:17.435 GMT] =======================================