2016-11-24 55 views
0

我正嘗試使用orient-db在CENTOS7機器上創建部署我的java web應用程序。 目前我已經在root用戶上設置了Orient-db特權用戶〜/ softwares/$ ORIENTDB_HOME 服務器在初始配置中成功設置了用戶名和密碼並啓動。 現在我想創建一個遠程數據庫通過使用運行console.sh無法在CENTOS7上配置OrientDB - Java集成

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

後如下create database命令我的Java應用程序進行訪問,但我收到以下錯誤

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"

我嘗試了CHMODing .sh bin目錄以及$ ORIENTDB_HOME/databases目錄,但問題仍然存在。

但是它讓我恕我直言,你所做創建具有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

+0

Hav你試圖創建文件夾/數據庫/測試和CHMODing它?也可以嘗試使用最新的2.2.13版本。 –

回答

0

得到以下錯誤分貝與角色和權限混淆。您使用哪個系統用戶來解壓OrientDB?你用哪一個作爲獨立的服務器來運行它? 我「米問,因爲你能夠在plocal與控制檯創建一個數據庫(plocal意味着嵌入式)。 我猜你用根提取焦油,然後從一個普通用戶登錄shell啓動的服務器。

在最後一步,你都指向一個錯誤的數據庫地址:connecting to:plocal:localhost/asm

如果您正在訪問的plocal分貝(嵌入式),只需使用plocal:/path/to/db/folder

如果您正在訪問由一個獨立的服務器提供的DB,使用remote:SERVER_ADDRESS/db_NAME