Janusgraph with Bigtable + Elastic search backend is failing using docker 0.6.0 due to NoNode for /hbase/hbaseid in ZK

Viewed 174

The below configuration is used to start the Janusgraph using docker janusgraph/janusgraph:0.6:

Configuration- janusgraph.properties:

    gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory

    storage.backend=hbase
    storage.hbase.ext.hbase.client.connection.impl=com.google.cloud.bigtable.hbase2_x.BigtableConnection
    storage.hbase.ext.google.bigtable.project.id=xxx
    storage.hbase.ext.google.bigtable.instance.id=xxx

    cache.db-cache = true
    cache.db-cache-clean-wait = 20
    cache.db-cache-time = 180000
    cache.db-cache-size = 0.25

    index.search.backend=elasticsearch
    index.search.hostname=xxxxx
    index.search.elasticsearch.client-only=true

    ids.block-size=100000
    graph.graphname=ConfigurationManagementGraph

Configuration - janusgraph-server.properties

#
  # NOTE: THIS FILE IS GENERATED VIA "update.sh"
  # DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
  #
  # Copyright 2021 JanusGraph Authors
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #      http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.

  host: 0.0.0.0 
  port: 8182
  evaluationTimeout: 30000
  channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
  graphManager: org.janusgraph.graphdb.management.JanusGraphManager
  graphs:
    ConfigurationManagementGraph: /tmp/janusgraph/janusgraph.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/empty-sample.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] }}
  #   # 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.GraphSONMessageSerializerV2d0, 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: false, interval: 180000},
    csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
    jmxReporter: {enabled: true},
    slf4jReporter: {enabled: true, interval: 180000},
    graphiteReporter: {enabled: false, interval: 180000}}
  maxInitialLineLength: 4096
  maxHeaderSize: 8192
  maxChunkSize: 8192
  maxContentLength: 65536
  maxAccumulationBufferComponents: 1024
  resultIterationBatchSize: 64
  writeBufferLowWaterMark: 32768
  writeBufferHighWaterMark: 65536

Configuration - janusgraph-hbase-es-server.properties

# Copyright 2019 JanusGraph Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# JanusGraph configuration sample: HBase and Elasticsearch
#
# This file connects to HBase using a Zookeeper quorum
# (storage.hostname) consisting solely of localhost.  It also connects
# to Elasticsearch running on localhost over Elasticsearch's native "Transport"
# protocol.  Zookeeper, the HBase services, and Elasticsearch must already 
# be running and available before starting JanusGraph with this file.

# The implementation of graph factory that will be used by gremlin server
#
# Default:    org.janusgraph.core.JanusGraphFactory
# Data Type:  String
# Mutability: LOCAL
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory

# The primary persistence provider used by JanusGraph.  This is required. 
# It should be set one of JanusGraph's built-in shorthand names for its
# standard storage backends (shorthands: berkeleyje, cql, hbase, inmemory)
# or to the full package and classname of a custom/third-party
# StoreManager implementation.
#
# Default:    (no default value)
# Data Type:  String
# Mutability: LOCAL
storage.backend=hbase

# The hostname or comma-separated list of hostnames of storage backend
# servers.  This is only applicable to some storage backends, such as
# cassandra and hbase.
#
# Default:    127.0.0.1
# Data Type:  class java.lang.String[]
# Mutability: LOCAL
storage.hostname= <zookeeper quorum host>

# Whether to enable JanusGraph's database-level cache, which is shared
# across all transactions. Enabling this option speeds up traversals by
# holding hot graph elements in memory, but also increases the likelihood
# of reading stale data.  Disabling it forces each transaction to
# independently fetch graph elements from storage before reading/writing
# them.
#
# Default:    false
# Data Type:  Boolean
# Mutability: MASKABLE
cache.db-cache = true

# How long, in milliseconds, database-level cache will keep entries after
# flushing them.  This option is only useful on distributed storage
# backends that are capable of acknowledging writes without necessarily
# making them immediately visible.
#
# Default:    50
# Data Type:  Integer
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend.  After starting the database for the first
# time, this file's copy of this setting is ignored.  Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
cache.db-cache-clean-wait = 20

# Default expiration time, in milliseconds, for entries in the
# database-level cache. Entries are evicted when they reach this age even
# if the cache has room to spare. Set to 0 to disable expiration (cache
# entries live forever or until memory pressure triggers eviction when set
# to 0).
#
# Default:    10000
# Data Type:  Long
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend.  After starting the database for the first
# time, this file's copy of this setting is ignored.  Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
cache.db-cache-time = 180000

# Size of JanusGraph's database level cache.  Values between 0 and 1 are
# interpreted as a percentage of VM heap, while larger values are
# interpreted as an absolute size in bytes.
#
# Default:    0.3
# Data Type:  Double
# Mutability: MASKABLE
cache.db-cache-size = 0.5

# The indexing backend used to extend and optimize JanusGraph's query
# functionality. This setting is optional.  JanusGraph can use multiple
# heterogeneous index backends.  Hence, this option can appear more than
# once, so long as the user-defined name between "index" and "backend" is
# unique among appearances.Similar to the storage backend, this should be
# set to one of JanusGraph's built-in shorthand names for its standard
# index backends (shorthands: lucene, elasticsearch, es, solr) or to the
# full package and classname of a custom/third-party IndexProvider
# implementation.
#
# Default:    elasticsearch
# Data Type:  String
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend.  After starting the database for the first
# time, this file's copy of this setting is ignored.  Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
index.search.backend=elasticsearch

# The hostname or comma-separated list of hostnames of index backend
# servers.  This is only applicable to some index backends, such as
# elasticsearch and solr.
#
# Default:    127.0.0.1
# Data Type:  class java.lang.String[]
# Mutability: MASKABLE
index.search.hostname=xxx

Few environment variables are overridden in deployment file as follows:

- name: JANUS_PROPS_TEMPLATE
          value: hbase-es
        - name: janusgraph.index.search.backend
          value: elasticsearch
        - name: janusgraph.index.search.hostname
          value: xxxxxxxxxx
        - name: janusgraph.ids.block-size
          value: "100000"
        - name: gremlinserver.graphManager
          value: org.janusgraph.graphdb.management.JanusGraphManager
        - name: graph.graphname
          value: ConfigurationManagementGraph
        - name: gremlin.graph
          value: org.janusgraph.core.ConfiguredGraphFactory
        - name: gremlinserver.graphs.ConfigurationManagementGraph
          value: /tmp/janusgraph/janusgraph.properties

Issue:

21704 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:java.io.tmpdir=/tmp
21704 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:java.compiler=<NA>
21704 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:os.name=Linux
21705 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:os.arch=amd64
21705 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:os.version=5.4.129+
21705 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:user.name=janusgraph
21705 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:user.home=/var/lib/janusgraph
21705 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Client environment:user.dir=/opt/janusgraph
21707 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=xxx.xxx.xxx.xxx:2181 sessionTimeout=90000 watcher=org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient$$Lambda$220/23707443@6084632e
21730 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx-SendThread(xxx.xxx.xxx.xxx:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Opening socket connection to server xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx:2181. Will not attempt to authenticate using SASL (unknown error)
21733 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx-SendThread(xxx.xxx.xxx.xxx:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Socket connection established to xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx:2181, initiating session
21754 [ReadOnlyZKClient-xxx.xxx.xxx.xxx:2181@xxxxxxxx-SendThread(xxx.xxx.xxx.xxx:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Session establishment complete on server xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx:2181, sessionid = 0x17d230b386b0004, negotiated timeout = 40000
21767 [main] WARN  org.apache.hadoop.hbase.client.ConnectionImplementation  - Retrieve cluster id failed
java.util.concurrent.ExecutionException: org.apache.hadoop.hbase.shaded.org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase/hbaseid
    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
    at org.apache.hadoop.hbase.client.ConnectionImplementation.retrieveClusterId(ConnectionImplementation.java:574)
    at org.apache.hadoop.hbase.client.ConnectionImplementation.<init>(ConnectionImplementation.java:307)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.hadoop.hbase.client.ConnectionFactory.lambda$createConnection$0(ConnectionFactory.java:230)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.runAs(User.java:347)
    at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:228)
    at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:128)
    at org.janusgraph.diskstorage.hbase.HBaseCompat1_0.createConnection(HBaseCompat1_0.java:43)
    at org.janusgraph.diskstorage.hbase.HBaseStoreManager.<init>(HBaseStoreManager.java:335)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:73)
    at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:525)
    at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:489)
    at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:64)
    at org.janusgraph.core.JanusGraphFactory.lambda$open$0(JanusGraphFactory.java:165)
    at org.janusgraph.graphdb.management.JanusGraphManager.openGraph(JanusGraphManager.java:239)
    at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:165)
    at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:115)
    at org.janusgraph.graphdb.management.JanusGraphManager.lambda$new$0(JanusGraphManager.java:73)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.janusgraph.graphdb.management.JanusGraphManager.<init>(JanusGraphManager.java:72)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:84)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:124)
    at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:87)
    at org.janusgraph.graphdb.server.JanusGraphServer.start(JanusGraphServer.java:85)
    at org.janusgraph.graphdb.server.JanusGraphServer.main(JanusGraphServer.java:53)
Caused by: org.apache.hadoop.hbase.shaded.org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase/hbaseid
    at org.apache.hadoop.hbase.shaded.org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
    at org.apache.hadoop.hbase.shaded.org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
    at org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient$ZKTask$1.exec(ReadOnlyZKClient.java:177)
    at org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient.run(ReadOnlyZKClient.java:342)
    at java.lang.Thread.run(Thread.java:748)
26172 [main] INFO  org.apache.hadoop.hbase.client.RpcRetryingCallerImpl  - Call exception, tries=6, retries=16, started=4136 ms ago, cancelled=false, msg=org.apache.hadoop.hbase.shaded.org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase, details=row 'janusgraph' on table 'hbase:meta' at null, see https://s.apache.org/timeout

Should I create a new node called /hbase in zookeeper manually? Or how to fix this issue? The ultimate objective is to connect Janusgraph with Bigtable + ES backend.

0 Answers
Related