Monday, September 29, 2008

Verity K2 server hangs on CFMX

I came across a situation when submitting new content for reindex or removal from a search collection simply does not do anything. The process runs forever and there's no activity by k2. I'm using CFMX7.0.2.

When this happens, check your search collection folder called trans. There is a file called data.trn in which k2 writes the commands that it is supposed to execute. I think it is sort of a batch file of all commands issued for a given collection.

A typical example of what it contains:
LAST LOGCHECK "-989436216"
LAST CLEAN "-989436216"
LAST OPTIMIZE "0"
LAST MAINTENANCE "-989436216"
I noticed that from time to time I'd get some weird looking file writing/permission errors in the various k2 log files (found under [VERITY ROOT]/Data/services/ColdFusionK2_indexserver1/ folder). Whenever these happen, data.trn still shows the commands that were issued earlier. As more and more commands are issued it would keep on growing this file and adding new commands to it. But the real problem is that the first command that caused the failure is probably still there and for whatever reason cannot be finished.

So what to do? The easiest thing is to simply edit the file and remove all the lines below the 4th line in the example above - that's what a 'clean' data.trn contains. I do that after turning k2 off in the services (just in case). After this, indexing process tends to go back to normal.

No comments: