2014-04-28 71 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