Oracle Endeca Forge Failed but with no logs

Sometimes when you execute your baseline update, Forge fails and produces no logs.

[06.28.13 11:34:01] SEVERE: Batch component 'Forge' failed. Refer to component logs in /data/endeca/apps/usapseattlesmall/./logs/forges/Forge on host ITLHost.
Occurred while executing line 23 of valid BeanShell script:

20|
21| // archive logs and run ITL
22| Forge.archiveLogDir();
23| Forge.run();
24| Dgidx.archiveLogDir();
25| Dgidx.run();
26|

[06.28.13 11:34:01] SEVERE: Caught an exception while invoking method 'run' on object 'BaselineUpdate'. 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.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.component.BatchComponent run - Batch component 'Forge' failed. Refer to component logs in /data/endeca/apps/usapseattlesmall/./logs/forges/Forge on host ITLHost.

[06.28.13 11:34:01] INFO: Released lock 'update_lock'.

Possible issue here are:

1. Pipeline has incorrect XML format due your custom calculations
2. Forge did not start because of Environment Variables

To help with the Issue you should inspect your logs at $ENDECA_CONF/logs: process.x.log , invoke.x.log , main.x.log will give you hints on what went wrong.

Check Validity of Pipeline’s XML Content

You can execute a linux command to check whether your XMLs are properly formatted by:

xmllint --noout *.xml

if anything was printed on your terminal there is an issue with XML formatting.

Starting Endeca Dgraph Manually

Sometimes Using the workbench is not enough to start a component. Below is the command to manually start your dgraph or any component

This command uses the Workbench to start the dgraph

sh /path/to/PlatformServices/6.1.3/bin/eaccmd.sh start --app app_id --comp Dgraph1

another way is to use the Dgraph command

${ENDECA_PATH}/MDEX/6.4.0/bin/dgraph  
--threads 6  
--whymatch  
--spl  
--dym  
--dym_hthresh 5  
--dym_nsug 3  
--stat-abins  
--unctrct -v  
--port 19003  
--pidfile ${ENDECA_PATH}/apps/usapseattlesmall/dgraph.pid  
--log ${ENDECA_PATH}/apps/usapseattlesmall/logs/dgraphs/Dgraph1/Dgraph1.reqlog  
--out ${ENDECA_PATH}/apps/usapseattlesmall/logs/dgraphs/Dgraph1/Dgraph1.log  
--spellpath ${ENDECA_PATH}/apps/usapseattlesmall/data/dgraphs/Dgraph1/dgraph_input  
--updatedir ${ENDECA_PATH}/apps/usapseattlesmall/data/dgraphs/Dgraph1/dgraph_input/updates  
--updatelog ${ENDECA_PATH}/apps/usapseattlesmall/logs/dgraphs/Dgraph1/Dgraph1.updatelog ${ENDECA_PATH}/apps/usapseattlesmall/data/dgraphs/Dgraph1/dgraph_input/usap

Useful Endeca Tips and Commands

Fix “Failed to obtain lock” error

./runcommand.sh LockManager releaseLock update_lock
When you accidentally CTRL+C a running process or an error occurred, The flag will remain on the EAC and you need to release it before you can run a baseline process again. This command will do the trick.

Update your configuration

./runcommand.sh --update-definition
If you have edited your AppConfig.xml or any Configuration files at /config/script you need to update your configuration for your changes to be applied. The command above will let you update your definition without restarting the platform services nor force you to execute initialize_services.sh

Don’t use --equivopt dgidx flag

this dgidx flag is used to compute dimension value equivalence classes to minimize the index size, however this adds up to the indexing phase time. This flag has been deprecated starting Endeca 6.4.0. We used this before for saving some disk space but upon removal on 6.4.0 it took down our Dgidx process from 7 hrs to 45 minutes with no threads specified and down to 25 mins with 16 threads.

Maxing your Dgidx --threads

Maxing out your available CPU Cores for Dgidx’ disposal will do wonders. The speed won’t exponential based on the number of cores because –threads flags are only used on the indexing phase of Dgidx, but if you need faster execution time Add this flag.

Note: This post will be updated if i encountered other useful commands on Endeca 6.1.x or 6.4.x search platform. Some of the tips are available on the Oracle perf guide, I’ve rewritten it here based on my own experience and for easier archive retrieval.

How can twitter earn money

Twitter has a 140 character limitation which is imposed early on. 20 characters reserved for a twitter username and 140 for the text, this feature has been loved this feature. Money however will be become problematic sooner or later, they tried several steps monetizing their site by showing promoted spo on the trending widget, but still the dollars are not coming.

They are trying to create a billion dollar from their collosal userbase but twitter is not like facebook. Facebook has this targeted ads that is based on demographics and the user likes and users on fb has this culture of changing its UI every now and then. Twitter on the other site was promoted by early adopters that was passed by words to non-geeks. They never had a drastic UI change in the past and their users will not like it because they expect that twitter to be just the same old interface they have loved, Simple and no clutter.

Regarding monetization my idea is to have a pro-account or a credit based policy. If they could charge twitter power users for the service they will earn a lot. SMS has been charged per successful text message and earns more directly proportional to the volume of SMS. They could have a limit of 50 tweets per day or less for free accounts and let users that exceeds the limit to buy the service for 200 tweets a day or even unlimited tweets they will earn bucks and we’ll see less clutter on your twitter feed. I know you have a friend where they posts almost anything they do, what they eat.

more money for the company, less annoyance on your feed. Win! Win!

Endeca Search Platform

Endeca Search Platform is a commercial solution that’s also used by many companies around the world, mostly for e-commerce websites. It doesn’t rely on algorithms but it tries to emulate a “conversation” between user and your data.

Endeca features the use of unstructured data and business intelligence. Search engines help your user refine to the things they want to search using multi-facet categorization.

We have implemented multiple merchandising rules and search pre-processor using this engine.

There are several ways to merchandise a product in your Endeca Search Engine. One good example is the “Boost or Bury” feature that lets you define what products do you want to put on top of the search result or bury in the deepest of your results. This is a good tool for your sales team to push fast selling products on top. Our default ranking is computed based on the average sales but this tool makes merchandising customization by website page a breeze.

Example
1. Boost all “Nike” products when user is on the “Running Shoes” Page
2. Bury all results with Rating < 50 and Boost all records that is flagged as free shipping

Endeca has been acquired by Oracle last October 2011 and as of now the old endeca portal/documentation is now closed. The oracle portal and oracle communities is alive and kicking but i’m missing the old cool/chillax/helpful environment of endeca community. The portal was easy to use and will show you relevant search results and documentation is the best.