Saturday, November 1, 2014

Alfresco: No live node exists - error halts solr indexing





Error: 

Using 4.0.d on postgresql indexing with Solr, I see this error in alfresco.log
2012-02-15 08:11:50,393  ERROR [extensions.webscripts.AbstractRuntime] [http-8443-4] Exception from executeScript - redirecting to status template error: 01156612 Wrapped Exception (with status template): No live node exists: 

   ID:        520521

   Cache row: NodeEntity[ ID=520521, version=16, store=workspace://SpacesStore, uuid=64b01e12-dfac-4b22-96d0-bfa30ba7d34e, typeQNameId=32, localeId=15, aclId=null, deleted=true, transaction=TransactionEntity[ ID=1064115, server=null, changeTxnId=f4359d12-f144-43c7-8c17-18697c4eb864, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=anbj01, auditCreated=2012-02-07T08:05:37.520+01:00, auditModifier=anbj01, auditModified=2012-02-07T09:20:18.000+01:00]]

   DB row:    NodeEntity[ ID=520521, version=16, store=workspace://SpacesStore, uuid=64b01e12-dfac-4b22-96d0-bfa30ba7d34e, typeQNameId=32, localeId=15, aclId=null, deleted=true, transaction=TransactionEntity[ ID=1064115, server=null, changeTxnId=f4359d12-f144-43c7-8c17-18697c4eb864, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=anbj01, auditCreated=2012-02-07T08:05:37.520+01:00, auditModifier=anbj01, auditModified=2012-02-07T09:20:18.000+01:00]]

 org.springframework.extensions.webscripts.WebScriptException: 01156612 Wrapped Exception (with status template): No live node exists: 

   ID:        520521

   Cache row: NodeEntity[ ID=520521, version=16, store=workspace://SpacesStore, uuid=64b01e12-dfac-4b22-96d0-bfa30ba7d34e, typeQNameId=32, localeId=15, aclId=null, deleted=true, transaction=TransactionEntity[ ID=1064115, server=null, changeTxnId=f4359d12-f144-43c7-8c17-18697c4eb864, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=anbj01, auditCreated=2012-02-07T08:05:37.520+01:00, auditModifier=anbj01, auditModified=2012-02-07T09:20:18.000+01:00]]

   DB row:    NodeEntity[ ID=520521, version=16, store=workspace://SpacesStore, uuid=64b01e12-dfac-4b22-96d0-bfa30ba7d34e, typeQNameId=32, localeId=15, aclId=null, deleted=true, transaction=TransactionEntity[ ID=1064115, server=null, changeTxnId=f4359d12-f144-43c7-8c17-18697c4eb864, commitTimeMs=null], auditProps=AuditablePropertiesEntity[ auditCreator=anbj01, auditCreated=2012-02-07T08:05:37.520+01:00, auditModifier=anbj01, auditModified=2012-02-07T09:20:18.000+01:00]]

This error halts Solr indexing, it cannot get past that. I think Solr should be more fault tolerant, but my primary question here is how can this be fixed?


Solution 1: This will work for all versions of ICP.  If you are using alfresco 4.2+ Solution 2 is the recommended.

I tried this on 4.0.e.

We need to apply it directly on alfresco database.

This was not a cache issue, I had to remove the "no live" node directly from the database.
Solr is definitely exposing underlying issues on the database, I'm not sure if it would be best if Solr (like old lucene) moved past errors, so that indexing can continue, or halt like in this case. It went unnoticed for several days, so there was a very outdated index. But if indexing had moved on, I'm not sure an error in alfresco.log would have been spotted and subsequently fixed.
This is how I fixed it:
I ran these select statements to find out where the node id 520521 is present
select * from alf_child_assoc where child_node_id = 520521;

select * from alf_node_assoc where target_node_id = 520521;

select * from alf_node_assoc where source_node_id = 520521;

select * from alf_node_aspects where node_id = 520521;

select * from alf_node_properties where node_id = 520521;

select * from alf_node where id = 520521;

From there I could see that the node had no properties, it was not a child node to any node, and didn't have any associations.
It did however have a childnode (webpreview). This to me are some remains from a transaction that has gone very wrong, and the post in alf_node can/must be deleted.
So I deleted the rows
delete from alf_node_assoc where source_node_id = 520521;

delete from alf_node where id = 520521

Then for the now orphan webpreview childnode
 update alf_node set NODE_DELETED = true where id = 530544;

From there the indexing kicked in an now works.

*** If you fail to delete the node from alf_node. We need to delete if from other tables which has the foriegn key for alf_node table.


Solution 2:

This may not work for lower versions of alfresco 4.2

Following some steps from the wiki, I ran the SOLR FIX action. As I hadn't used any of the SOLR urls before I first had to set up the certificate on my browser. I copied browser.p12 from (my directory structure, YMMV) /opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/keystore/browser.p12 on the server to my desktop, then imported it into Firefox (better instructions on the wiki). I then navigated to https://our.alfresco.url:8443/solr/admin/cores?action=FIX in Firefox, accepted the untrusted certificate exception and waited a few minutes for the page to load. Once it had loaded it displayed:
<response><lst name="responseHeader"><int name="status">0</int><intname="QTime">48942</int></lst></response>
and the error messages in catalina.out stopped.




















source : https://forums.alfresco.com/forum/developer-discussions/repository-services/no-live-node-exists-error-halts-solr-indexing

Monday, October 20, 2014

Clone Mac Address in Windows XP


Many ISP providers uses your ethernet card (lan card) mac address to recognize your system and assign  unique Ip address in that lan.

If you have multiple system or to use any guests laptop's it is  very difficult to contact ISP customer care to register the new Mac address.

So we can set the mac id of our system which is already registered with ISP in the guests system. This is called cloning of mac.

First we need to get the mac id of our primary system:

1. Open Cmd prompt
2. Type the command getmac  and then enter will give us the mac address.


3. Copy the physical address(we will call this as mac address) in note pad .
In this screen shot 08-00-27-C0-EB-AA.

Thats it our fist step completed


To change the mac address in target system.
1. Right click on network icon in system tray(near time and date)

2. select status 

3. Click on properties.
4. Local area network properties dialog opens up. 

5. Click on configure button.


6. From the openned dialog box select advanced tab.
7. Select Network address option from the list menu.
8. Click on value radio button.
9. Enter the mac address we have saved from the source system. In this it is.
080027C0EBAA.
***Enter mac address with out '-'.
10. Click on ok button.

11. Restart the system.

12. Check the mac id with the "getmac" command from command prompt. We did this in first phase to collect  the mac id from source.


Thats it we are done.

Thursday, October 9, 2014

SmartGitHg Installation in Ubuntu 14.04


sudo add-apt-repository ppa:eugenesan/ppa

sudo apt-get update

sudo apt-get install smartgithg

after install set environment variable in ~/.bashrc

This will only work with java 7 version. 

export SMARTGIT_JAVA_HOME=/home/venky/App/jdk1.7.0_55

done