2014-04-28 73 views
0

我已經在嵌入式分佈式模式下安裝了OrientDB(orientdb-community-1.7-20140428.151223-168-distribution)。我能夠在2個獨立的JVM中啓動嵌入的orientDB,並驗證這兩個服務器是否是羣集的一部分。嵌入式OrientDB分佈式模式 - 未能創建數據庫

Members [2] { 
    Member [localhost]:2434 this 
    Member [localhost]:2435 
} 

然後我登錄到控制檯並創建了一個名爲Tinker的數據庫。在控制檯中,它表示數據庫已成功創建,但無法從第二個節點連接到同一個數據庫。

orientdb> create database remote:localhost:2425/Tinker admin admin memory 

Creating database [remote:localhost:2425/Tinker] using the storage type [memory]... 
Connecting to database [remote:localhost:2425/Tinker] with user 'admin'...OK 
Database created successfully. 

Current database is: remote:localhost:2425/Tinker 
orientdb {Tinker}> connect remote:localhost:2424/Tinker admin admin    

Disconnecting from the database [Tinker]...OK 
Connecting to database [remote:localhost:2424/Tinker] with user 'admin'... 
Error: com.orientechnologies.orient.core.exception.OConfigurationException: Database 'Tinker' is not configured on server 

我在服務器日誌中看到下面的錯誤消息。任何幫助將不勝感激。信息保存數據庫'Tinker'的分佈式配置文件爲:/Users/peddi/Downloads/orientdb-community-1.7-SNAPSHOT/databases/Tinker/distributed-config .json [OHazelcastPlugin] 2014-04-28 13:56:13:856信息[node1398358958901]在隊列中未找到以前的消息orientdb.node.node1398358958901.Tinker.request [OHazelcastDistributedMessageService] [node1398358958901] < - [node1398358958902] error on在/Users/peddi/Downloads/orientdb-community-1.7-SNAPSHOT/databases/Tinker中安裝數據庫Tinker com.orientechnologies.orient.core.storage.impl.memory.OStorageMemory無法轉換爲com.orientechnologies.orient.server .distributed.ODistributedStorage - > com.orien technologies.orient.server.hazelcast.OHazelcastPlugin.executeOnLocalNode(OHazelcastPlugin.java:643) - > com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.onMessage(OHazelcastDistributedDatabase.java:454) - > com.orientechnologies.orient。 server.hazelcast.OHazelcastDistributedDatabase $ 1.run(OHazelcastDistributedDatabase.java:248) - > java.lang.Thread.run(Thread.java:724)線程「hz._hzInstance_1_orientdb.cached.thread-4」com.orientechnologies中的異常。 orient.server.distributed.ODistributedException:在com.orientechnologies處未收到來自遠程節點的自動部署數據庫 com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installNewDatabases(OHazelcastPlugin.java:844) 的響應。 orient.server.hazelcast.OHazelcastPlugin.ent ryAdded(OHazelcastPlugin.java:528) at com.hazelcast.map.MapService.dispatchEvent(MapService.java:684) at com.hazelcast.map.MapService.dispatchEvent(MapService.java:65) at com.hazelcast。 spi.impl.EventServiceImpl $ LocalEventDispatcher.run(EventServiceImpl.java:529) at com.hazelcast.util.executor.StripedExecutor $ Worker.run(StripedExecutor.java:142) at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) at com.hazelcast.util。 executor.PoolExecutorThreadFactory $ ManagedThread.run(PoolExecutorThreadFactory.java:59)

+0

什麼是您的分佈式cfg.json?節點加入後,您還可以在輸出中報告JSON嗎? – Lvca

+0

以下是配置日誌:2014-04-29 12:53:37:184 INFO更新數據庫的分佈式配置:修補程序: ---------- { 「版本」:1, 「複製 「:真, 」自動部署「:真, 」hotAlignment「:假, 」offlineMsgQueueSize「:0,」 簇「:{ 」內部「:{ 」複製「:假 }, 」索引「 :{ 「複製」:假 }, 「*」:{ 「複製」:真, 「readQuorum」:1, 「writeQuorum」:2, 「failureAvailableNodesLessQuor嗯 「:假的, 」readYourWrites「:真正的」 分區 「:{ 」策略「:」 循環 「 」默認值「:0, 」分區「:[」 」, 「node1398358958901」] ] } } } } – ppeddi

+0

default-distributed-db-config.json是安裝時隨附的一個。我不認爲我在該文件中修改過。 – ppeddi

回答

0

您只有一個在線節點。看看分區。也許你已經複製了ID爲「node1398358958901」的第一臺服務器的cfg。

刪除或更改server2/config/orientdb-dserver-config.xml中的ID