janusgraphexception:由于后端异常,无法执行操作

rm5edbpk  于 2021-06-14  发布在  Cassandra
关注(0)|答案(1)|浏览(402)

启动janusgraph时,我会因为这个异常而发疯。它发生在gremlin服务器重启之间,甚至没有触及配置文件。
这个错误总是在gremlin服务器第一次启动时出现。
这是来自日志的堆栈跟踪:

6911 [main] INFO  org.janusgraph.diskstorage.log.kcvs.KCVSLog  - Loaded unidentified ReadMarker start time 2019-08-21T17:57:53.794212900Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller@51efb731
8148 [main] WARN  org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker  - Skipping outdated lock on KeyColumn [k=0x 16-165-160-103-105- 30- 71-114- 97-112-104- 95- 78- 97-109-101- 95- 73-110-100-101-248, c=0x  0] with our rid ( 48- 97- 48- 48- 52- 98- 48- 49- 49- 54- 52- 50- 52- 45- 68- 69- 83- 75- 84- 79- 80- 45- 56- 67- 86- 72- 80- 57- 49- 49) but mismatched timestamp (actual ts 2019-08-21T17:57:54.934645Z, expected ts 2019-08-21T17:57:54.934645300Z)
8149 [main] ERROR org.janusgraph.graphdb.database.StandardJanusGraph  - Could not commit transaction [1] due to storage exception in system-commit
org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:56)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:91)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:139)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:196)
    at org.janusgraph.diskstorage.BackendTransaction.commit(BackendTransaction.java:150)
    at org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:716)
    at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1380)
    at org.janusgraph.graphdb.database.management.ManagementSystem.commit(ManagementSystem.java:246)
    at org.janusgraph.graphdb.management.ConfigurationManagementGraph.createIndexIfDoesNotExist(ConfigurationManagementGraph.java:311)
    at org.janusgraph.graphdb.management.ConfigurationManagementGraph.<init>(ConfigurationManagementGraph.java:81)
    at org.janusgraph.graphdb.management.JanusGraphManager.lambda$new$0(JanusGraphManager.java:77)
    at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.janusgraph.graphdb.management.JanusGraphManager.<init>(JanusGraphManager.java:74)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:80)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:122)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:86)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: org.janusgraph.diskstorage.locking.PermanentLockingException: Permanent locking failure
    at org.janusgraph.diskstorage.locking.AbstractLocker.checkLocks(AbstractLocker.java:359)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkAllLocks(ExpectedValueCheckingTransaction.java:175)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.prepareForMutations(ExpectedValueCheckingTransaction.java:154)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager.mutateMany(ExpectedValueCheckingStoreManager.java:72)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:94)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:91)
    at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54)
    ... 20 more
Caused by: org.janusgraph.diskstorage.PermanentBackendException: Read 1 locks with our rid  48- 97- 48- 48- 52- 98- 48- 49- 49- 54- 52- 50- 52- 45- 68- 69- 83- 75- 84- 79- 80- 45- 56- 67- 86- 72- 80- 57- 49- 49 but mismatched timestamps; no lock column contained our timestamp (2019-08-21T17:57:54.934645300Z)
    at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSeniority(ConsistentKeyLocker.java:528)
    at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSingleLock(ConsistentKeyLocker.java:454)
    at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSingleLock(ConsistentKeyLocker.java:118)
    at org.janusgraph.diskstorage.locking.AbstractLocker.checkLocks(AbstractLocker.java:351)
    ... 27 more
8152 [main] ERROR org.janusgraph.graphdb.database.StandardJanusGraph  - Could not commit transaction [1] due to exception
org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:56)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:91)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:139)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:196)
    at org.janusgraph.diskstorage.BackendTransaction.commit(BackendTransaction.java:150)
    at org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:716)
    at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1380)
    at org.janusgraph.graphdb.database.management.ManagementSystem.commit(ManagementSystem.java:246)
    at org.janusgraph.graphdb.management.ConfigurationManagementGraph.createIndexIfDoesNotExist(ConfigurationManagementGraph.java:311)
    at org.janusgraph.graphdb.management.ConfigurationManagementGraph.<init>(ConfigurationManagementGraph.java:81)
    at org.janusgraph.graphdb.management.JanusGraphManager.lambda$new$0(JanusGraphManager.java:77)
    at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.janusgraph.graphdb.management.JanusGraphManager.<init>(JanusGraphManager.java:74)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:80)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:122)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:86)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: org.janusgraph.diskstorage.locking.PermanentLockingException: Permanent locking failure
    at org.janusgraph.diskstorage.locking.AbstractLocker.checkLocks(AbstractLocker.java:359)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkAllLocks(ExpectedValueCheckingTransaction.java:175)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.prepareForMutations(ExpectedValueCheckingTransaction.java:154)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager.mutateMany(ExpectedValueCheckingStoreManager.java:72)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:94)
    at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:91)
    at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54)
    ... 20 more
Caused by: org.janusgraph.diskstorage.PermanentBackendException: Read 1 locks with our rid  48- 97- 48- 48- 52- 98- 48- 49- 49- 54- 52- 50- 52- 45- 68- 69- 83- 75- 84- 79- 80- 45- 56- 67- 86- 72- 80- 57- 49- 49 but mismatched timestamps; no lock column contained our timestamp (2019-08-21T17:57:54.934645300Z)
    at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSeniority(ConsistentKeyLocker.java:528)
    at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSingleLock(ConsistentKeyLocker.java:454)
    at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSingleLock(ConsistentKeyLocker.java:118)
    at org.janusgraph.diskstorage.locking.AbstractLocker.checkLocks(AbstractLocker.java:351)
    ... 27 more
8153 [main] ERROR org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Could not invoke constructor on class org.janusgraph.graphdb.management.JanusGraphManager (defined by the 'graphManager' setting) with one argument of class Settings

我在Windows10上,我使用的janusgraph版本是0.4.0,配置为使用cassandra 3.11.0和elastisearch 6.7.2,两者都在docker上运行(同时我手动启动gremlin服务器)。
我已经尝试过清理docker的所有东西(容器、图像和卷)。我也试过运行“bin/janusgraph.sh clean-”,但没有成功。即使再次下载janusgraph-0.4.0-hadoop2.zip并从一开始就对其进行重新配置,也无济于事。
不用说,如果我尝试在不接触原始配置文件的情况下启动服务器,它就会工作(但没有配置管理图)
我不明白它怎么能不碰任何东西就断了。
这是gremlin服务器配置:

host: 0.0.0.0
port: 8182
scriptEvaluationTimeout: 180000

# channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer

channelizer: org.janusgraph.channelizers.JanusGraphWebSocketChannelizer
graphManager: org.janusgraph.graphdb.management.JanusGraphManager
graphs: {
  #graph: conf/gremlin-server/janusgraph-cql-es-server.properties,
  ConfigurationManagementGraph: conf/gremlin-server/janusgraph-cql-es-server-configured.properties,
}
scriptEngines: {
  gremlin-groovy: {
    plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
               org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/init.groovy]}}}}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}

# - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 }

# - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1, config: { serializeResultToString: true }}

  # Older serialization versions for backwards compatibility:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
  - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
metrics: {
  consoleReporter: {enabled: true, interval: 180000},
  csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: true},
  slf4jReporter: {enabled: true, interval: 180000},
  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
  graphiteReporter: {enabled: false, interval: 180000}}
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 65536

这是janus图形配置(为了简洁起见,我删除了注解):

gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory

graph.graphname=ConfigurationManagementGraph

storage.backend=cql

storage.hostname=127.0.0.1

storage.cql.keyspace=janusgraph

cache.db-cache = true

cache.db-cache-time = 180000

cache.db-cache-size = 0.25

index.search.backend=elasticsearch

index.search.hostname=127.0.0.1

index.search.elasticsearch.client-only=true

这是gremlin服务器在启动时运行的脚本:

def globals = [:]

def getGraph() {
    def graphNames =  ConfiguredGraphFactory.getGraphNames();
    def graphMaps = [:];
    for (graphName in graphNames) {
        def g = ConfiguredGraphFactory.open(graphName);
        graphMaps.put(graphName, g.traversal())
    }
    return graphMaps;
}

globals << getGraph()

在docker compose控制台中,我没有看到异常,gremlin服务器显示错误之前的最后一件事是以下行:

cassandra        | INFO  [MigrationStage:1] 2019-08-21 17:57:53,725 ColumnFamilyStore.java:430 - Initializing janusgraph.system_properties_lock_

请问有人知道是什么导致了这个问题吗?
谢谢您!

o2gm4chl

o2gm4chl1#

你不能使用 JDK11 ,但您可以使用 JDK8 ,或修改源代码本身。
参考

相关问题