cancel
Showing results for 
Search instead for 
Did you mean: 

No live node exists - error halts solr indexing

loftux
Star Contributor
Star Contributor
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?
If I do
select * from alf_transaction where change_txn_id='f4359d12-f144-43c7-8c17-18697c4eb864';
id   version   server_id   change_txn_id   commit_time_ms
1064115   1   4   f4359d12-f144-43c7-8c17-18697c4eb864   1328887525021
and then
select * from alf_node where transaction_id = 1064115

id   version   store_id   uuid   transaction_id   node_deleted   type_qname_id   acl_id   audit_creator   audit_created   audit_modifier   audit_modified   audit_accessed   locale_id
530844   4   45   64b01e12-dfac-4b22-96d0-bfa30ba7d34e   1064115   f   34   1649   anbj01   2012-02-07T08:05:37.520+01:00   anbj01   2012-02-07T09:20:18.000+01:00      27
530847   2   45   8b85ff9f-4416-4195-aab8-88ec1dab1288   1064115   f   120   1649   anbj01   2012-02-10T16:24:56.896+01:00   anbj01   2012-02-10T16:24:56.896+01:00      27
530841   5   50   8b85ff9f-4416-4195-aab8-88ec1dab1288   1064115   t   32      anbj01   2012-02-10T16:24:56.896+01:00   anbj01   2012-02-10T16:24:56.896+01:00      15
520521   16   50   64b01e12-dfac-4b22-96d0-bfa30ba7d34e   1064115   t   32      anbj01   2012-02-07T08:05:37.520+01:00   anbj01   2012-02-07T09:20:18.000+01:00      15
Is this just a cache issue, so a restart of tomcat would help?
Or is it something corrupted in the db?
Looking at the source http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/jav...
it is failing in the function trying to "Find an undeleted node" with "ConcurrencyFailureException if the ID doesn't reference a <b>live</b> node".
But what exactly makes this node not live?
15 REPLIES 15

andy
Champ on-the-rise
Champ on-the-rise
Hi

In the current enterprise versions:
1) the cause fixed
2) SOLR skips such errors
3) SOLR records any errors (it does not fail the whole TX - just some nodes)
4) Errors can be found and nodes retried

FIX will soon include this

These fixes will be in the next community release (no I do not know when)

We did intitially fail hard so issues were not passed by ….

Andy

pavelm
Champ in-the-making
Champ in-the-making
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.

I don't delete parent node. NODE_DELETED on parent is true.
Enough update child node (thumbnail) alf_node set NODE_DELETED = true where id = 530544;
It works for me.

yogeshnehra
Champ in-the-making
Champ in-the-making
This issue is related to solr, When solr create indexes, Solr make connection with alfresco to get all transactions to create index, By default it ask for all the transactions and alfresco reply with all transaction ids. If some node is deleted, its details go to archive folder. but if there are some reference remain for deleted node then scheduler will unable to clean it and throw this exception. To solve this issue just delete that transaction id. But when you try to delete transaction id from alf_transaction table, it always throw foreign key constraints. To resolve this just take database backup and drop below foreign key constraints and recreate them with cascade effect.


(`alfresco400dev`.`alf_node`, CONSTRAINT `fk_alf_node_txn` FOREIGN KEY (`transaction_id`) REFERENCES `alf_transaction` (`id`))


ALTER TABLE alf_node DROP CONSTRAINT fk_alf_node_txn;

ALTER TABLE alf_node
    ADD CONSTRAINT fk_alf_node_txn FOREIGN KEY (transaction_id)
    REFERENCES alf_node (id)
    ON DELETE CASCADE


(`alfresco400dev`.`alf_child_assoc`, CONSTRAINT `fk_alf_cass_cnode` FOREIGN KEY (`child_node_id`) REFERENCES `alf_node` (`id`))


ALTER TABLE alf_child_assoc DROP CONSTRAINT fk_alf_cass_cnode;

ALTER TABLE alf_child_assoc
    ADD CONSTRAINT fk_alf_cass_cnode FOREIGN KEY (child_node_id)
    REFERENCES alf_node (id)
    ON DELETE CASCADE


(`alfresco400dev`.`alf_node_aspects`, CONSTRAINT `fk_alf_nasp_n` FOREIGN KEY (`node_id`) REFERENCES `alf_node` (`id`))


ALTER TABLE alf_node_aspects DROP CONSTRAINT fk_alf_nasp_n;

ALTER TABLE alf_node_aspects
    ADD CONSTRAINT fk_alf_nasp_n FOREIGN KEY (node_id)
    REFERENCES alf_node (id)
    ON DELETE CASCADE

(`alfresco400dev`.`alf_node_properties`, CONSTRAINT `fk_alf_nprop_n` FOREIGN KEY (`node_id`) REFERENCES `alf_node` (`id`))

ALTER TABLE alf_node_properties DROP CONSTRAINT fk_alf_nprop_n;

ALTER TABLE alf_node_properties
    ADD CONSTRAINT fk_alf_nprop_n FOREIGN KEY (node_id)
    REFERENCES alf_node (id)
    ON DELETE CASCADE

delete  from alf_transaction where id  = 42057


then configure alfresco for not to provide deleted node for indexing by putting below property  -

index.tracking.minRecordPurgeAgeDays=0


Now on solr machine call this url -

http://solrhostname:8080/solr/admin/cores?action=FIX

Now delete solr indexes and recreate them.

Now your problem will disappear (it worked for me). Smiley Happy

yogeshnehra
Champ in-the-making
Champ in-the-making
Forgot to mention - Transaction Id used in above reply can be get from exception see bold text below -

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]

ltardioli
Champ in-the-making
Champ in-the-making
The chrisokelly's solution works like a charm here!
Thank you!

yanpak
Champ in-the-making
Champ in-the-making
Chrisokelly, many thanks to you! You save my day and… You are man! Certainly!
Thank you!