OrientDB“移动现有数据库时出错”

OrientDB " Error on moving existent database"

我正在尝试使用 docker 设置 OrientDB 分布式配置。但是我在启动第二个节点时遇到错误 -

2015-10-09 17:14:14:066 WARNI [node1444321499719]->[[node1444321392311]] requesting deploy of database 'testDB' on local server... [OHazelcastPlugin] 2015-10-09 17:14:14:117 INFO [node1444321499719]<-[node1444321392311] received updated status node1444321499719.testDB=SYNCHRONIZING [OHazelcastPlugin] 2015-10-09 17:14:14:119 INFO [node1444321499719]<-[node1444321392311] received updated status node1444321392311.testDB=SYNCHRONIZING [OHazelcastPlugin] 2015-10-09 17:14:15:935 WARNI [node1444321499719] moving existent database 'testDB' located in '/orientdb/databases/testDB' to '/orientdb/databases/../backup/databases/testDB' and get a fresh copy from a remote node... [OHazelcastPlugin] 2015-10-09 17:14:15:936 SEVER [node1444321499719] error on moving existent database 'testDB' located in '/orientdb/databases/testDB' to '/orientdb/databases/../backup/databases/testDB'. Try to move the database directory manually and retry [OHazelcastPlugin][node1444321499719] Error on starting distributed plugin com.orientechnologies.orient.server.distributed.ODistributedException: Error on moving existent database 'testDB' located in '/orientdb/databases/testDB' to '/orientdb/databases/../backup/databases/testDB'. Try to move the database directory manually and retry at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.backupCurrentDatabase(OHazelcastPlugin.java:1007) at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.requestDatabase(OHazelcastPlugin.java:954) at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installDatabase(OHazelcastPlugin.java:893) at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installNewDatabases(OHazelcastPlugin.java:1426) at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.startup(OHazelcastPlugin.java:184) at com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:979) at com.orientechnologies.orient.server.OServer.activate(OServer.java:346) at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)

如果我在没有 docker 的情况下启动 orientdb 集群,则不会出现此错误。 我也可以将它移动到容器中

[root@64f6cc1eba61 orientdb]# mv -v /orientdb/databases/testDB /orientdb/databases/../backup/databases/testDB '/orientdb/databases/testDB' -> '/orientdb/databases/../backup/databases/testDB' '/orientdb/databases/testDB/distributed-config.json' -> '/orientdb/databases/../backup/databases/testDB/distributed-config.json' removed '/orientdb/databases/testDB/distributed-config.json' removed directory: '/orientdb/databases/testDB' [root@64f6cc1eba61 orientdb]# ls -l /orientdb/databases/../backup/databases/testDB total 4 -rw-r--r--. 1 root root 455 Oct 9 11:32 distributed-config.json [root@64f6cc1eba61 orientdb]#

我使用的是 OrientDB 2.1.3 版

已报告并修复此问题:

https://github.com/orientechnologies/orientdb/issues/4891

将 'distributed.backupDirectory' 变量设置为特定目录,问题应该就消失了。

顺便说一句,运行 orient 分布在 docker 是我们目前无法使用的经验: - Docker 尚不支持多播,您可以解决它,但这很痛苦。但主要问题是: - Docker 不会在重启时重复使用 ip 地址,因此容器重启会给它一个新的 ip 地址,这会把你的集群搞得一团糟。

我们放弃使用 orient distributed with docker 直到 docker 解决了这两个问题(我相信这两个问题都在路线图上)。

如果您有其他经历,我很高兴听到您的想法。