无法启动 OrientDB 服务器
Can't start OrientDB Server
我在我的服务器上安装了 OrientDB 2.2.0 但无法启动它 运行 server.sh 脚本。以前的版本在服务器上运行良好,当前版本在我的笔记本上是 运行。服务器是来自 Ubuntu 15.10 32 位的 Digital Ocean 的 droplet。我得到的错误如下。
Invalid maximum direct memory size: -XX:MaxDirectMemorySize=512g The
specified size exceeds the maximum representable size. Error: Could
not create the Java Virtual Machine. Error: A fatal exception has
occurred. Program will exit.
更新
问题在于 -XX:MaxDirectMemorySize=512g。我将其更改为 -XX:MaxDirectMemorySize=512m 并且错误消失了。现在的问题是服务器尝试启动但给我以下消息:
Creating the system database 'OSystem' for current server
[OSystemDatabase]Exception in thread "main"
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:693)
at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
at com.orientechnologies.common.directmemory.OByteBufferPool.allocateBuffer(OByteBufferPool.java:309)
at com.orientechnologies.common.directmemory.OByteBufferPool.acquireDirect(OByteBufferPool.java:228)
at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.cacheFileContent(OWOWCache.java:1255)
at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.load(OWOWCache.java:617)
at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.updateCache(O2QCache.java:1200)
at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.doLoad(O2QCache.java:439)
at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.allocateNewPage(O2QCache.java:489)
at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation.commitChanges(OAtomicOperation.java:426)
at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:420)
at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.endAtomicOperation(ODurableComponent.java:118)
at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.create(OPaginatedCluster.java:197)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.addClusterInternal(OAbstractPaginatedStorage.java:3349)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doAddCluster(OAbstractPaginatedStorage.java:3330)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.create(OAbstractPaginatedStorage.java:381)
at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.create(OLocalPaginatedStorage.java:120)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:378)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:106)
at com.orientechnologies.orient.server.OSystemDatabase.(OSystemDatabase.java:42)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1217)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:343)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
我想你有 32 位 JVM。您应该将此值设置为 -XX:MaxDirectMemorySize=2g .
(代表OP发表).
现在一切正常。我刚刚将 -XX:MaxDirectMemorySize=512m
更改为 -XX:MaxDirectMemorySize=2g
。
我在我的服务器上安装了 OrientDB 2.2.0 但无法启动它 运行 server.sh 脚本。以前的版本在服务器上运行良好,当前版本在我的笔记本上是 运行。服务器是来自 Ubuntu 15.10 32 位的 Digital Ocean 的 droplet。我得到的错误如下。
Invalid maximum direct memory size: -XX:MaxDirectMemorySize=512g The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
更新 问题在于 -XX:MaxDirectMemorySize=512g。我将其更改为 -XX:MaxDirectMemorySize=512m 并且错误消失了。现在的问题是服务器尝试启动但给我以下消息:
Creating the system database 'OSystem' for current server [OSystemDatabase]Exception in thread "main" java.lang.OutOfMemoryError: Direct buffer memory at java.nio.Bits.reserveMemory(Bits.java:693) at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123) at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) at com.orientechnologies.common.directmemory.OByteBufferPool.allocateBuffer(OByteBufferPool.java:309) at com.orientechnologies.common.directmemory.OByteBufferPool.acquireDirect(OByteBufferPool.java:228) at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.cacheFileContent(OWOWCache.java:1255) at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.load(OWOWCache.java:617) at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.updateCache(O2QCache.java:1200) at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.doLoad(O2QCache.java:439) at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.allocateNewPage(O2QCache.java:489) at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation.commitChanges(OAtomicOperation.java:426) at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:420) at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.endAtomicOperation(ODurableComponent.java:118) at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.create(OPaginatedCluster.java:197) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.addClusterInternal(OAbstractPaginatedStorage.java:3349) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doAddCluster(OAbstractPaginatedStorage.java:3330) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.create(OAbstractPaginatedStorage.java:381) at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.create(OLocalPaginatedStorage.java:120) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:378) at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:106) at com.orientechnologies.orient.server.OSystemDatabase.(OSystemDatabase.java:42) at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1217) at com.orientechnologies.orient.server.OServer.activate(OServer.java:343) at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
我想你有 32 位 JVM。您应该将此值设置为 -XX:MaxDirectMemorySize=2g .
(代表OP发表).
现在一切正常。我刚刚将 -XX:MaxDirectMemorySize=512m
更改为 -XX:MaxDirectMemorySize=2g
。