谢谢! 我真的想在3台服务器上安装。出于举个例子的目的,我是 试图设置一个类“actor”,有3个集群“actor_server74”, “actor_server75”和“actor_server76”。我的服务器叫做server74,server75和 server76。我希望这些集群的排列方式使得每个集群都有2个副本 如果1个节点出现故障,我仍然可以访问所有数据,所以对于 例如:
我已尝试使用以下步骤进行设置: 1.下载OrientDB 2.1.15社区并解压缩到3台服务器上。 2.从每台服务器上的databases目录中删除GratefulDeadConcerts数据库。 3.使用tcp-ip而不是multi-cast配置hazelcast.xml并指定3台服务器的IP地址。
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.0.xsd"
xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group>
<name>root</name>
<password>root</password>
</group>
<network>
<port auto-increment="false">2434</port>
<join>
<multicast enabled="false">
<multicast-group>224.0.0.1</multicast-group>
<multicast-port>2434</multicast-port>
</multicast>
<tcp-ip enabled="true">
<member>172.21.0.74:2434</member>
<member>172.21.0.75:2434</member>
<member>172.21.0.76:2434</member>
</tcp-ip>
</join>
</network>
<executor-service>
<pool-size>16</pool-size>
</executor-service>
</hazelcast>
在server74上编辑default-distributed-db-config.json,如下所示: enter image description here
使用dserver.sh启动server74。
将orientdb-community-2.1.15从server74复制到server75和server76,并更新config / orientdb-server-config.xml,server75中的nodeName,如下所示:
使用dserver.sh启动server74
2016-04-08 23:23:10:533 INFO [server75] Saving distributed configuration file for database 'testdb' to: /data/server/orientdb-community-2.1.15/databases/testdb/distributed-config.json [OHazelcastPlugin]
2016-04-08 23:23:10:550 INFO [server75] Publishing online status for database server75.testdb... [OHazelcastDistributedDatabase]
2016-04-08 23:23:10:556 INFO [server75] received updated status server75.testdb=ONLINE [OHazelcastPlugin][server75] Error on starting distributed plugin
com.orientechnologies.orient.server.distributed.ODistributedException: Quorum cannot be reached because there are no nodes available
at com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.calculateQuorum(OHazelcastDistributedDatabase.java:417)
at com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.send2Nodes(OHazelcastDistributedDatabase.java:121)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.sendRequest(OHazelcastPlugin.java:358)
at com.orientechnologies.orient.server.distributed.sql.OCommandExecutorSQLSyncCluster.replaceCluster(OCommandExecutorSQLSyncCluster.java:155)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.requestDatabase(OHazelcastPlugin.java:975)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installDatabase(OHazelcastPlugin.java:906)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installNewDatabases(OHazelcastPlugin.java:1484)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.startup(OHazelcastPlugin.java:175)
at com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:993)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:336)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Exception in thread "main" com.orientechnologies.orient.server.distributed.ODistributedStartupException: Error on starting distributed plugin
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.startup(OHazelcastPlugin.java:184)
at com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:993)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:336)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Caused by: com.orientechnologies.orient.server.distributed.ODistributedException: Quorum cannot be reached because there are no nodes available
at com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.calculateQuorum(OHazelcastDistributedDatabase.java:417)
at com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.send2Nodes(OHazelcastDistributedDatabase.java:121)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.sendRequest(OHazelcastPlugin.java:358)
at com.orientechnologies.orient.server.distributed.sql.OCommandExecutorSQLSyncCluster.replaceCluster(OCommandExecutorSQLSyncCluster.java:155)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.requestDatabase(OHazelcastPlugin.java:975)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installDatabase(OHazelcastPlugin.java:906)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installNewDatabases(OHazelcastPlugin.java:1484)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.startup(OHazelcastPlugin.java:175)
... 3 more