向路由器提交提取规范时出现“无法提交主管:请求失败,状态码为502”

时间:2019-05-20 12:12:41

标签: postgresql amazon-s3 druid

我收到错误消息“无法提交主管:请求失败,状态码为502” ,当我尝试通过路由器将摄取规范提交给druid UI时。接收规范可在独立的Druid服务器中使用。

我已使用4台计算机设置了集群,其中1台用于协调器和霸主(主服务器),1台用于历史和中间管理器(数据),1台用于代理(查询),1台用于路由器,并带有一个单独的实例动物园管理员。日志中没有错误。

摄入规范如下:

{
  "type": "kafka",
  "dataSchema": {
    "dataSource": "table1",
    "parser": {
      "type": "string",
      "parseSpec": {
        "format": "json",
        "dimensionsSpec": {
          "dimensions": [
           // List of valid dimensions
          ]
        },
        "timestampSpec": {
          "column": "createdOnDate", // In 'YYYY-MM-DD' format
          "format": "iso"
        }
      }
    },
    "granularitySpec": {
      "type": "uniform",
      "segmentGranularity": "MONTH",
      "rollup": false,
      "queryGranularity": "none"
    },
    "metricsSpec": []
  },
  "ioConfig": {
    "type": "kafka",
    "topic": "mongotopic",
    "consumerProperties": {
      "bootstrap.servers": "ip:9092"
    },
    "useEarliestOffset": true
  },
  "tuningConfig": {
    "type": "kafka",
    "forceExtendableShardSpecs": true,
    "maxParseExceptions": 100,
    "maxSavedParseExceptions": 10
  }
}

common.runtime.properties的内容如下:

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.
#

#
# Extensions
#

# This is not the full list of Druid extensions, but common ones that people often use. You may need to change this list
# based on your particular setup.
druid.extensions.loadList=["druid-histogram", "druid-datasketches", "druid-lookups-cached-global", "druid-s3-extensions","postgresql-metadata-storage"]

# If you have a different version of Hadoop, place your Hadoop client jar files in your hadoop-dependencies directory
# and uncomment the line below to point to your directory.
#druid.extensions.hadoopDependenciesDir=/my/dir/hadoop-dependencies

#
# Logging
#

# Log all runtime properties on startup. Disable to avoid logging properties on startup:
druid.startup.logging.logProperties=true

#
# Zookeeper
#

druid.zk.service.host=druid-ip:2181
druid.zk.paths.base=/druid

#
# Metadata storage
#

# For Derby server on your Druid Coordinator (only viable in a cluster with a single Coordinator, no fail-over):
#druid.metadata.storage.type=derby
#druid.metadata.storage.connector.connectURI=jdbc:derby://metadata.store.ip:1527/var/druid/metadata.db;create=true
#druid.metadata.storage.connector.host=metadata.store.ip
#druid.metadata.storage.connector.port=1527

# For MySQL (make sure to include the MySQL JDBC driver on the classpath):
#druid.metadata.storage.type=mysql
#druid.metadata.storage.connector.connectURI=jdbc:mysql:///druid
#druid.metadata.storage.connector.user=druid
#druid.metadata.storage.connector.password=druid

# For PostgreSQL (make sure to additionally include the Postgres extension):
druid.metadata.storage.type=postgresql
druid.metadata.storage.connector.connectURI=jdbc:postgresql://db.example.com:5432/druid
druid.metadata.storage.connector.user=user
druid.metadata.storage.connector.password=password

#
# Deep storage
#

# For local disk (only viable in a cluster if this is a network mount):
# druid.storage.type=local
# druid.storage.storageDirectory=var/druid/segments

# For HDFS (make sure to include the HDFS extension and that your Hadoop config files in the cp):
#druid.storage.type=hdfs
#druid.storage.storageDirectory=/druid/segments

# For S3:
druid.storage.type=s3
druid.storage.bucket=valid-bucket
druid.storage.baseKey=druid/segments
druid.s3.accessKey=valid-key
druid.s3.secretKey=valid-secret

#
# Indexing service logs
#

# For local disk (only viable in a cluster if this is a network mount):
#druid.indexer.logs.type=file
#druid.indexer.logs.directory=var/druid/indexing-logs

# For HDFS (make sure to include the HDFS extension and that your Hadoop config files in the cp):
#druid.indexer.logs.type=hdfs
#druid.indexer.logs.directory=/druid/indexing-logs

# For S3:
druid.indexer.logs.type=s3
druid.indexer.logs.s3Bucket=druid-test-1
druid.indexer.logs.s3Prefix=druid/indexing-logs

#
# Service discovery
#

druid.selectors.indexing.serviceName=druid/overlord
druid.selectors.coordinator.serviceName=druid/coordinator

#
# Monitoring
#

druid.monitoring.monitors=["org.apache.druid.java.util.metrics.JvmMonitor"]
druid.emitter=logging
druid.emitter.logging.logLevel=info

# Storage type of double columns
# ommiting this will lead to index double as float at the storage layer

druid.indexing.doubleStorage=double

#
# SQL
#
druid.sql.enable=true

在通过路由器的IP(IP:8888 / unified-console)的IP将规范提交到“任务/主管/提交主管”选项卡时,我得到提交主管失败:请求失败,状态码为502 < / em>用户界面中的错误。 Zookeeper,S3和Postgres配置有效。该界面显示1个中级经理,0个历史记录,0个数据源和0个细分。

1 个答案:

答案 0 :(得分:0)

发生这种情况是因为 common.runtime.properties 的扩展名列表中缺少 druid-kafka-indexing-service 扩展名。