【发布时间】:2014-04-28 18:05:33
【问题描述】:
我已经在嵌入式分布式模式下设置了 OrientDB (orientdb-community-1.7-20140428.151223-168-distribution)。我能够在 2 个单独的 JVM 中启动嵌入式 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
我在服务器日志中看到以下错误消息。任何帮助将不胜感激。
2014-04-28 13:56:13:849 信息将数据库“Tinker”的分布式配置文件保存到:/Users/peddi/Downloads/orientdb-community-1.7-SNAPSHOT/databases/Tinker/distributed-config。 json [OHazelcast插件] 2014-04-28 13:56:13:856 INFO [node1398358958901] 发现队列中没有以前的消息/peddi/Downloads/orientdb-community-1.7-SNAPSHOT/databases/Tinker com.orientechnologies.orient.core.storage.impl.memory.OStorageMemory 无法转换为 com.orientechnologies.orient.server.distributed.ODistributedStorage -> com.orientechnologies.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.orient.server.hazelcast.OHazelcastPlugin.installNewDatabases(OHazelcastPlugin.java:844) 在 com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.entryAdded(OHazelcastPlugin.java:528) 在 com.hazelcast.map.MapService.dispatchEvent(MapService.java:684) 在 com.hazelcast.map.MapService.dispatchEvent(MapService.java:65) 在 com.hazelcast.spi.impl.EventServiceImpl$LocalEventDispatcher.run(EventServiceImpl.java:529) 在 com.hazelcast.util.executor.StripedExecutor$Worker.run(StripedExecutor.java:142) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang.Thread.run(Thread.java:724) 在 com.hazelcast.util.executor.PoolExecutorThreadFactory$ManagedThread.run(PoolExecutorThreadFactory.java:59)
【问题讨论】:
-
你的分布式cfg.json是什么?节点加入后,您能否在输出中也报告 JSON?
-
以下是来自日志的配置:2014-04-29 12:53:37:184 INFO 更新了数据库的分布式配置: Tinker: ---------- { "version": 1、“复制”:true,“autoDeploy”:true,“hotAlignment”:false,“offlineMsgQueueSize”:0,“clusters”:{“内部”:{“复制”:false},“索引”:{“复制":false }, "*":{ "replication":true, "readQuorum":1, "writeQuorum":2, "failureAvailableNodesLessQuorum":false, "readYourWrites":true,"partitioning":{ "strategy":"循环”,“默认”:0,“分区”:[[“
”,“node1398358958901”]] } } } } -
default-distributed-db-config.json 是安装附带的。我不认为我在该文件中进行了修改。
-
你好 Luca,请问你上面的配置,如果配置有问题,请告诉我。我们想使用 OrientDB 作为嵌入式分布式服务器,由于我无法通过创建数据库的第一个问题,所以我完全被这个问题阻止了。我真的需要证明 OrientDB 能够在嵌入式和分布式模式下为我们工作。谢谢
-
您只有一个节点在线。看分区。也许您已经复制了第一个服务器的 cfg,其中 id 是“node1398358958901”。删除或更改 server2/config/orientdb-dserver-config.xml 中的 id
标签: distributed embedded-database orientdb