Sunday, May 1, 2016

Oracle Endeca 10.x : EndecaHow to prevent 404 error after baseline update due to workbench password change?

Behaviour :- Web application starts showing 404-page error after baseline update once admin password changed from change password window ... thumbnail 1 summary
Behaviour :-

Web application starts showing 404-page error after baseline update once admin password changed from change password window using Endeca workbench and its not updated WorkbenchConfig.xml.

Workbench XML IFCR password change
WorkbenchConfig.xml IFCR screenshot
The following error can be seen in Endeca application logs

INFO: [LiveMDEXHostA] Starting backup utility 'backup_log_dir_for_component_DgraphA1'.
Apr 29, 2015 9:53:25 PM com.endeca.soleng.eac.toolkit.component.Component start
INFO: [LiveMDEXHostA] Starting component 'DgraphA1'.
Apr 29, 2015 9:53:33 PM sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Publishing Workbench 'live' configuration to MDEX 'DgraphA1'
Apr 29, 2015 9:53:33 PM com.endeca.soleng.eac.toolkit.component.IFCRComponent pushLiveContentToDgraphById
INFO: Pushing live content to dgraph: DgraphA1
Apr 29, 2015 9:53:33 PM com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript
SEVERE: Unauthorized (401): Unauthorized access to workbench. Please check your credentials.
Occurred while executing line 5 of valid BeanShell script: 
[[

2|       

3|        compId = invokingObject.getElementId();
4|        log.info("Publishing Workbench 'live' configuration to MDEX '" + compId + "'");
5|        IFCR.pushLiveContentToDgraphById(compId);
6|      
7|    
]]
Apr 29, 2015 9:53:33 PM com.endeca.soleng.eac.toolkit.component.ServerComponent runPostStartupScript
WARNING: Caught an exception while executing post-startup script for server component 'DgraphA1'.
com.endeca.soleng.eac.toolkit.exception.AppControlException: Error executing valid BeanShell script.
at com.endeca.soleng.eac.toolkit.script.Script.runBeanShellScript(Script.java:179)
at com.endeca.soleng.eac.toolkit.script.Script.run(Script.java:127)
at com.endeca.soleng.eac.toolkit.component.ServerComponent.runPostStartupScript(ServerComponent.java:323)
at com.endeca.soleng.eac.toolkit.component.ServerComponent.startInParallel(ServerComponent.java:132)
at com.endeca.soleng.eac.toolkit.component.cluster.DgraphCluster.applyIndex(DgraphCluster.java:612)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.endeca.soleng.eac.toolkit.Controller.invokeRequestedMethod(Controller.java:917)
at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:255)
at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:134)
Caused by: com.endeca.soleng.eac.toolkit.utility.IFCRUtility$HttpStatusException: Unauthorized (401): Unauthorized access to workbench. Please check your credentials.
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.execute(IFCRUtility.java:785)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.httpPostDoNotConsume(IFCRUtility.java:731)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.httpPost(IFCRUtility.java:703)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.httpPost(IFCRUtility.java:654)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.mdexPublish(IFCRUtility.java:598)
at com.endeca.soleng.eac.toolkit.component.IFCRComponent.pushLiveContentToDgraphById(IFCRComponent.java:442)
at com.endeca.soleng.eac.toolkit.script.Script.runBeanShellScript(Script.java:165)
... 45 more
Apr 29, 2015 9:53:33 PM com.endeca.soleng.eac.toolkit.utility.Utility start
INFO: [LiveMDEXHostA] Starting shell utility 'rmdir_dgraph-input-old'.


Solution:-

This issue comes if Endeca workbench admin password is different than WorkbenchConfig.xml under Endeca_app/config/script file. As per logs, Index generated by Dgidx gets propagated to live Dgraph first than Endeca workbench contents gets published to live Dgraph. So if the password is different than publishing live content method gets failed and logs the error in the log but baseline process does not stop.

The following code as per snapshot can be added to baseline process under Endeca_App/config/script/DataIngest.xml to prevent above issue even password is different.

Endeca Baseline update process change to prevent 404 error



Above code would first try to export site data and verify if workbench password and WorkbenchConfig.xml password both are same or not and export the XML.

Note : Delete the generated XML after adding above code.


From Author

Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

12 comments

  1. do you have idea on this error?

    [05.04.16 11:41:22] SEVERE: Service Unavailable (503): [00:00:55] Workbench is starting up (112 of 112 bundles activated, 174 of 176 components ready)...
    Occurred while executing line 3 of valid BeanShell script:
    [[

    1|
    2|
    3| IFCR.provisionSite();
    4| CAS.importDimensionValueIdMappings("CSAen-dimension-value-id-manager",
    5| InitialSetup.getWorkingDir() + "/test_data/initial_dval_id_mappings.csv");
    6|

    ]]

    [05.04.16 11:41:22] SEVERE: Caught an exception while invoking method 'run' on object 'InitialSetup'. Releasing locks.

    Caused by java.lang.reflect.InvocationTargetException
    sun.reflect.NativeMethodAccessorImpl invoke0 - null
    Caused by com.endeca.soleng.eac.toolkit.exception.AppControlException
    com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript - Error executing valid BeanShell script.
    Caused by com.endeca.soleng.eac.toolkit.utility.IFCRUtility$HttpStatusException
    com.endeca.soleng.eac.toolkit.utility.IFCRUtility execute - Service Unavailable (503): [00:00:55] Workbench is starting up (112 of 112 bundles activated, 174 of 176 components ready)...

    ReplyDelete
    Replies
    1. Hi June G,

      This issue generally gets resolved if you restart Tools and Framework If it does not means Endeca file system gets corrupted. you can do following things
      1. Re install Endeca Tools and Framework
      2. Delete tools and framework state folder and initialize the application once again

      I hope this helps.

      Thanks

      Delete
  2. Hi Ajay,

    can you help me..

    While ProductCatalogSimpleIndexingAdmin, Endecascriptservice failed... in the log i found below errors


    /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Caused by :atg.repository.search.indexing.IndexingException: Exception while submitting configuration for application

    /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Caused by (#2):com.endeca.repository.importer.ImporterException: Unable to connect to config repository on MachineA:8006 with user admin, Response:HTTP/1.1 401 Unauthorized

    ReplyDelete
    Replies
    1. Hi Mohan,

      Which version of oracle commerce or ATG or Endeca is being used? Please open endeca logs under <>/logs/appname.0.0.log and see what is the exact error is coming and send me out. This issue is related to Endeca Experience manager password mismatch with either ATG config or Endeca config.

      Thanks,
      Ajay Agrawal

      Delete
    2. ATG 11.2
      Endeca 11.2


      sorry ajay. Endecascriptservice not failed. Endecascriptservice got cancelled..
      ya i checked the App log, But after Endecascriptservice started in ProductCatalogSimpleIndexingAdmin only app log will be loaded. Am i correct??.. So, i didnt get any log loaded in app log ajay.

      pls guide me ajay

      But when i delete and create the credentialstoremanager values in dyn/admin indexing successfully completed.And if i restarted
      the server again and tried ProductCatalogSimpleIndexingAdmin got cancelled in Endecascriptservice and got the
      below mentioned error in server log..

      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin --- atg.repository.search.indexing.IndexingException: atg.repository.search.indexing.IndexingException: Exception while submitting configuration for application Test
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.AbstractRecordStoreAggregateSession.endSession(AbstractRecordStoreAggregateSession.java:517)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.RecordSubmitterImpl.endSession(RecordSubmitterImpl.java:248)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingPhase.doPhaseCleanup(IndexingPhase.java:401)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingPhase.performPhaseTasks(IndexingPhase.java:349)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingPhase.performPhaseTasksSerially(IndexingPhase.java:243)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingJob.performJobSerially(IndexingJob.java:398)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.SimpleIndexingAdmin.indexBaseline(SimpleIndexingAdmin.java:737)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.SimpleIndexingAdmin.indexBaseline(SimpleIndexingAdmin.java:715)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.SimpleIndexingAdmin$2.run(SimpleIndexingAdmin.java:1224)


      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Caused by (#2):com.endeca.repository.importer.ImporterException: Unable to connect to config repository on MachineA:8006 with user admin, Response:HTTP/1.1 401 Unauthorized
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at com.endeca.repository.importer.ConfigRepositoryImporter.submit(ConfigRepositoryImporter.java:296)
      **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.ConfigImportDocumentSubmitterSessionImpl.endSession(ConfigImportDocumentSubmitterSessionImpl.java:343)

      Delete
    3. This comment has been removed by the author.

      Delete
    4. sorry ajay. Endecascriptservice not failed. Endecascriptservice got cancelled..
      ya i checked the App log, But after Endecascriptservice started in ProductCatalogSimpleIndexingAdmin only app log will be loaded. Am i correct??.. So, i didnt get any log loaded in app log ajay. ATG & Endeca 11.2

      But when i delete and create the credentialstoremanager values in dyn/admin indexing successfully completed.And if i restarted
      the server again and tried ProductCatalogSimpleIndexingAdmin got cancelled in Endecascriptservice and got the
      below mentioned error in server log..

      Delete
    5. **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Caused by (#2):com.endeca.repository.importer.ImporterException: Unable to connect to config repository on MachineA:8006 with user admin, Response:HTTP/1.1 401 Unauthorized

      Delete
    6. Hi Mohan,

      There are two parts of it. There is ATG component that holds the Endeca password key and that matches the password with ECR repository. Could you please follow my this post http://www.ajayagrwal.com/2016/04/endeca-112-unauthorized-401-access-to-workbench.html and set the workbench password that is working.

      I hope this helps.

      Thanks,
      Ajay Agrawal

      Delete
    7. Thanks Ajay. ProductCatalogSimpleIndexingAdmin successfully finished..

      Delete
    8. Awesome, Glad that it worked for you.

      Thanks for referring to my blog.

      Thanks

      Delete
  3. ATG 11.2
    Endeca 11.2

    sorry ajay. Endecascriptservice not failed. Endecascriptservice got cancelled..
    ya i checked the App log, But after Endecascriptservice started in ProductCatalogSimpleIndexingAdmin only app log will be loaded. Am i correct??.. So, i didnt get any log loaded in app log ajay.


    But when i delete and create the credentialstoremanager values in dyn/admin indexing successfully completed.And if i restarted
    the server again and tried ProductCatalogSimpleIndexingAdmin got cancelled in Endecascriptservice and got the
    below mentioned error in server log..

    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin --- atg.repository.search.indexing.IndexingException: atg.repository.search.indexing.IndexingException: Exception while submitting configuration for application Test
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.AbstractRecordStoreAggregateSession.endSession(AbstractRecordStoreAggregateSession.java:517)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.RecordSubmitterImpl.endSession(RecordSubmitterImpl.java:248)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingPhase.doPhaseCleanup(IndexingPhase.java:401)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingPhase.performPhaseTasks(IndexingPhase.java:349)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingPhase.performPhaseTasksSerially(IndexingPhase.java:243)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.IndexingJob.performJobSerially(IndexingJob.java:398)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.SimpleIndexingAdmin.indexBaseline(SimpleIndexingAdmin.java:737)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.SimpleIndexingAdmin.indexBaseline(SimpleIndexingAdmin.java:715)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.admin.SimpleIndexingAdmin$2.run(SimpleIndexingAdmin.java:1224)


    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Caused by (#2):com.endeca.repository.importer.ImporterException: Unable to connect to config repository on MachineA:8006 with user admin, Response:HTTP/1.1 401 Unauthorized
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at com.endeca.repository.importer.ConfigRepositoryImporter.submit(ConfigRepositoryImporter.java:296)
    **** Error /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin at atg.endeca.index.ConfigImportDocumentSubmitterSessionImpl.endSession(ConfigImportDocumentSubmitterSessionImpl.java:343)

    ReplyDelete

Text Widget