2016-09-29 3 views
1

우리는 Java API 라이브러리가있는 노드가 5 개인 클러스터에서 OrientDB를 사용하고 있습니다. 둘 다 버전 2.2.8을 사용하고 있으며 Tinkerpop Blueprints 버전 2.6.0을 사용하고 있습니다. 데이터베이스가 오랫동안 정상적으로 작동하는 이상한 문제가 발생하고 갑자기 아래 오류가 발생하기 시작합니다. 1.7에서 2.2로 업그레이드 한 이후로만이 문제가 발생하기 시작했습니다.orientdb 로컬 노드가 아닌 마스터

이전에 다른 사람이이 문제/오류를 경험했는지 또는 누군가가 다중 노드 환경을 작동시키기 위해 변경해야 할 사항에 대해 조언을 해 주 었는지 궁금합니다.

com.orientechnologies.orient.server.distributed.ODistributedConfigurationChangedException: Local node 'aNode' is not the master for cluster 'aCluster' (it is 'anotherNode') 
    DB name="dbName" 
    DB name="dbName" 
    at sun.reflect.GeneratedConstructorAccessor61.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:428) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:379) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:261) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:153) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2133) 
    at com.orientechnologies.orient.client.remote.OStorageRemote$28.execute(OStorageRemote.java:1316) 
    at com.orientechnologies.orient.client.remote.OStorageRemote$28.execute(OStorageRemote.java:1289) 
    at com.orientechnologies.orient.client.remote.OStorageRemote$2.execute(OStorageRemote.java:198) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:230) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:195) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1289) 
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:560) 
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:106) 
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2733) 
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2703) 
    at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:175) 
+0

어떤 작업을 수행하고 있습니까? 특정 클러스터의 저장입니까? – Lvca

+0

이전 작업은 Blueprints OrientVertex를 사용하여 에지를 추가 한 다음 그래프에서 커밋을 호출하는 것입니다. – TomW

+0

default-distributed-db-config.json을 게시 할 수 있습니까? –

답변

0

2 노드 시나리오에서 비슷한 것을 보았습니다.

com.orientechnologies.orient.server.distributed.ODistributedConfigurationChangedException: Local node 'node1' is not the master for cluster 'event_3' (it is 'node2') 
    DB name="********" 
    DB name="********" 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:428) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:379) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:261) 
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:153) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2133) 
    at com.orientechnologies.orient.client.remote.OStorageRemote$6.execute(OStorageRemote.java:543) 
    at com.orientechnologies.orient.client.remote.OStorageRemote$6.execute(OStorageRemote.java:537) 
    at com.orientechnologies.orient.client.remote.OStorageRemote$1.execute(OStorageRemote.java:166) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:230) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.asyncNetworkOperation(OStorageRemote.java:158) 
    at com.orientechnologies.orient.client.remote.OStorageRemote.createRecord(OStorageRemote.java:523) 
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:2075) 
    at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveNew(OTransactionNoTx.java:246) 
    at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:179) 
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2598) 
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:103) 
    at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1800) 
    at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1791) 
    (... stack trace truncated here ...) 
예외가 발생

자바 코드 :

OPartitionedDatabasePool pool = new OPartitionedDatabasePool(dbUrl, user, password); 
    ... 
    try (ODatabaseDocumentTx ignored = pool.acquire()) { 
     ODocument document = new ODocument(className); 
     document.fromJSON(recordData.encode()); 
     document.field("date", timestamp, OType.DATETIME); 
     document.save(); 
    } 

클러스터를 나열하는 클러스터 'event_3가'실제로 노드 2가 소유하고 있음을 보여줍니다 노드 1에 문서 (자바 API를) 절약에, 나는 오류를 얻을 :

|# |NAME  | ID|CLASS  |CONFLICT-STRATEGY|COUNT|OWNER_SERVER|OTHER_SERVERS|AUTO_DEPLOY_NEW_NODE| 
|14 |event_1  | 18|event  |     | 1| node1  | [node2] |  true  | 
|15 |event_2  | 19|event  |     | 1| node1  | [node2] |  true  | 
|16 |event_3  | 20|event  |     | 0| node2  | [node1] |  true  | 

삽입이 다른 경우에 성공하므로 특정 경우에만 삽입하기 위해 잘못된 노드가 선택된 것처럼 보입니다.

관련 문제