Friday, May 15, 2015

WC_PERSISTENT | SESSION TIMEOUT !! 30 MINUTES DEFAULT




WC_PERSISTENT cookie is used to track session management in websphere commerce and session timeout is managed in WAS console. This is for global flag. If you want to enable them at the store level, this can be set using at STORE table by setting column PERSISTENTSESSION for corresponding store.


Dynacache on off | from WAS Console

On toolkit, Right click on server1-->

WAS console and remove check box on Enable servlet caching to turn off dynacache, and click apply  , save and restart server.

Saturday, May 9, 2015

Access your AWS linux instance from windows

The traditional SSH into Unix is not supported directly. You need to generate a pair of RSA keys and add public key to EC2 to login.

On your windows instance: You have to the following steps. Putty does not support the private key format (.pem) generated by Amazon EC2 so you have to generated keys using Git Bash and then convert them into keys in PuttyGen.

  • PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. 

  • Install Putty (Download). 
  • Install PuttyGen, (Download).
  • Download and Install Git Bash (Download link)
  • Open Git Bash --It opens a console
  • Run the following command ssh-keygen -t rsa 
           Generating public/private rsa key pair.
              Enter file in which to save the key (/c/Users/admin/.ssh/id_rsa):
    • The above process generates a public key and a private key.
    • Open puttyGen and load private key and save private key. 
    • Open putty and in settings -->SSH->Auth--Add your private key




    Monday, April 27, 2015

    SSL HANDSHAKE FAILURE | Signer Certificate retrieve from port


    CWPKI0022E: SSL HANDSHAKE FAILURE:  A signer with SubjectDN "CN=localhost, O=IBM, C=US" was sent from target host:port "localhost:443".  The signer may need to be added to local trust store "C:/IBM/WCD70_2/wasprofile/config/cells/localhost/nodes/localhost/trust.p12" located in SSL configuration alias "NodeDefaultSSLSettings" loaded from SSL configuration file "security.xml".  The extended error message from the SSL handshake exception is: "PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target".
    00000053 SystemOut     O
    00000053 SystemOut     O CWPKI0022E: SSL HANDSHAKE FAILURE:  A signer with SubjectDN "CN=localhost, O=IBM, C=US" was sent from target host:port "localhost:443".  The signer may need to be added to local trust store "C:/IBM/WCD70_2/wasprofile/config/cells/localhost/nodes/localhost/trust.p12" located in SSL configuration alias "NodeDefaultSSLSettings" loaded from SSL configuration file "security.xml".  The extended error message from the SSL handshake exception is: "PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target".
    00000053 SystemOut     O
    00000053 SystemOut     O
    00000053 SystemOut     O CWPKI0428I: The signer might need to be added to the local trust store. You can use the Retrieve from port option in the administrative console to retrieve the certificate and resolve the problem. If you determine that the request is trusted, complete the following steps: 1. Log into the administrative console.  2. Expand Security and click SSL certificate and key management. Under Configuration settings, click Manage endpoint security configurations. 3. Select the appropriate outbound configuration to get to the (cell):localhost:(node):localhost management scope. 4. Under Related Items, click Key stores and certificates and click the NodeDefaultTrustStore key store. 5. Under Additional Properties, click Signer certificates and  Retrieve From Port.  6. In the Host field, enter localhost in the host name field, enter 443 in the Port field, and localhost_cert in the Alias field. 7. Click Retrieve Signer Information.  8. Verify that the certificate information is for a certificate that you can trust. 9. Click Apply and Save.
    00000053 SystemOut     O
    00000053 ExtendedInfo  I   CWXFR9010I: Extended information : [URL=https://localhost:8006/webapp/wcs/preview/servlet/static/helloworld/dewalt] [parameters=deleteCartCookie=true  ] [userId=-1002]
    00000053 LoggingHelper E /GenericJSPPageError.jsp - java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target
                                     javax.servlet.jsp.JspException: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target
        at com.ibm.commerce.foundation.internal.client.taglib.RESTTag.myExecute(RESTTag.java:1238)
        at com.ibm.commerce.foundation.internal.client.taglib.RESTTag.execute(RESTTag.java:1067)
        at com.ibm.commerce.foundation.internal.client.taglib.RESTTag.doEndTag(RESTTag.java:537)

    Goto Admin console -->Security section and
    SSL certificate and key management > Key stores and certificates > NodeDefaultTrustStore > Signer certificates
    Retrieve from port

    Thursday, April 9, 2015

    Catalog uploads(file upload) in Management Center | does not work in Firefox | CatalogEntrySEO

    If you have done this in the past , you would know but there are no error messages in firefox and catalog uploads in management center (File upload) does not work. It works in IE but you need to every time click on settings and click Compatibility view settings and add localhost



    E.g  If you want to upload for CatalogEntrySEO
    File first 2 lines in the file to upload:
    CatalogEntrySEO,,,,,,
    PartNumber,LanguageId,URLKeyword,PageTitle,MetaDescription,ImageAltText,Delete

    Settings for maxError and commit counts are defined at:
    C:\IBM\WCDE_ENT70\workspace\WC\xml\config\com.ibm.commerce.catalog\dataload\wc-dataload.xml
    You can also define them at individual load item level.



    Tuesday, March 31, 2015

    Solr PreProcessing Error | SYS_C00151674 | Debugging

    com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor determineCatalogEntriesForCatalog(Connection connection, String catalogID)
    INFO: The catalog with ID: 10051 contains 174468 catalog entries.
     com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain processDataConfig(DataProcessingConfig, String)
    INFO: ORA-00001: unique constraint (SYS_C00151674) violated


    If any of these 2 queries finds rows, that would be a good pointer and backup deletes and run the delete's and try again.

    Rule 1: In Master catalog, you should always have 1 catalog entry belong to 1 master catalog category and CMC and dataload enforces that but if the data is loaded through another channel, this could happen.

    1) To identify if there is a catalog entry that has more than one parent category, run the following SQL query against the database:
    select catentry_id, catgroup_id from catgpenrel where catentry_id in (select catentry_id from catgpenrel where catalog_id = group by catentry_id having count(catentry_id) > 1)
    where is the catalog ID value for which di-preprocess is being run.

    The above query will provide a list of catalog entry IDs and the categories that they are mapped to if they are mapped to more than one category in the master catalog ID.
     e.g.
    select catentry_id, catgroup_id from catgpenrel
    where catentry_id in (select catentry_id from catgpenrel where catalog_id = 10051 group by catentry_id having count(catentry_id) > 1);

    Rule 2: You should have always 1 parent category for each master catalog category.
    2) To identify if the issue is caused by a category having multiple parent categories in the master catalog, run the following SQL query against the database:
    select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = and catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = group by catgroup_id_child having count(catgroup_id_child) > 1)
    e.g.
    select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = 10051 and
    catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = 10051
    group by catgroup_id_child having count(catgroup_id_child) > 1);

    More Logging: Edit the logging.properties file:

        Runtime location: WC_installdir/instances/ instance_name/xml/config/dataimport/logging.properties
        Toolkit location: WCDE_INT70\workspace\WC\xml\config\dataimport\logging.properties
        Verify that .level=FINEST and java.util.logging.FileHandler.level=FINEST
        Verify that java.util.logging.FileHandler.limit=80000000
        Verify that java.util.logging.FileHandler.count=10 

    Wednesday, March 4, 2015

    Solr Build index fails | would not provide error information | run solr direct

    Last I encountered an error where running build-index from toolkit would give the following 2 lines but it wouldn't rebuild index and do nothing.
    The program exiting with exit code: 0.
    Data import process completed successfully with no errors.


    If you need to directly run index on SOLR server: This is the command
    http://localhost/solr/MC_10051_CatalogEntry_en_US/dataimport?command=full-import

    To Monitor:
    http://localhost/solr/MC_10051_CatalogEntry_en_US/dataimport?command=status

    Once I ran directly on SOLR, full-import, it gave the errors.
    In this particular case, it gave heap error and had to increase 512 MB to 1024 MB in WAS admin console.