无法配置 OrientDB - Java 在 CENTOS7 上的集成

Unable to configure OrientDB - Java integration on CENTOS7

我正在尝试使用 orient-db 创建部署我的 java Web 应用程序到 CENTOS7 机器上。 目前我已经在 root 特权用户 ~/softwares/$ORIENTDB_HOME 上设置了 Orient-db 服务器已成功设置为初始配置,用户名和密码以及启动。 我现在正在尝试创建一个远程数据库,供我的 java 应用程序使用 运行 console.sh

之后的创建数据库命令访问,如下所示

orientdb> CREATE DATABASE remote:localhost/test root root plocal

但我收到以下错误

Creating database [remote:localhost/test] using the storage type [plocal]... Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot create the remote storage: test

Error: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot create database 'test' DB name="test" DB name="test"

Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot create folders in storage with path /softwares/orientdb-community-2.2.5/orientdb-community-2.2.5/databases/test DB name="test"

我尝试对 .sh bin 目录和 $ORIENTDB_HOME/databases 目录进行 CHMODing,但问题仍然存在。

但是它允许我用 plocal 创建一个数据库

orientdb> CREATE DATABASE plocal:localhost/test root root plocal

但是我在 java 结束时收到以下错误

$ java -jar dataloader-jar-with-dependencies.ja

2016-11-24 20:10:41 DEBUG ASMLoader:38 - connecting to:plocal:localhost/asm

2016-11-24 20:10:41 DEBUG ASMLoader:39 - uname:admin

2016-11-24 20:10:41 DEBUG ASMLoader:40 - password :admin

Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database 'plocal:localhost/asm' at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.(ODatabaseDocumentTx.java:190) at com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled.(OPartitionedDatabasePool.java:421) at com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled.(OPartitionedDatabasePool.java:417) at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.initQueue(OPartitionedDatabasePool.java:353) at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.(OPartitionedDatabasePool.java:114) at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.(OrientGraphFactory.java:71) at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.(OrientGraphFactory.java:52) at com.virtusa.asm.repo.ASMLoader.main(ASMLoader.java:42) Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Error on opening database: the engine 'plocal' was not found. URL was: plocal:localhost/asm. Registered engines are: [remote] DB name="plocal:localhost/asm" at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:462) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.(ODatabaseDocumentTx.java:170) ... 7 more

恕我直言,你把角色和权限搞得一团糟。您使用哪个系统用户解压 OrientDB?您使用哪一个 运行 将其作为独立服务器使用? 我问是因为您可以使用 plocal 中的控制台创建数据库(plocal 表示嵌入式)。 我猜你使用 root 提取了 tar,然后从普通用户登录 shell.

started 服务器

在最后一步中,您指向了错误的数据库地址:connecting to:plocal:localhost/asm

如果您在 plocal(嵌入式)中访问数据库,只需使用 plocal:/path/to/db/folder

如果您正在访问独立服务器提供的数据库,请使用 remote:SERVER_ADDRESS/db_NAME