What config to enable Broker to find realtime nodes?

Hi,

I installed two realtime nodes on two machines (A and B), then I installed broker on another machine C. When I queried broker on C, that broker seems talked to local 8084 port to fetch data, and failed, since the realtime nodes are on other machines.

What config that I need to change, so broker on machine C could know realtime node (A and B)?

In more details:

Query on machine C: curl -X POST ‘http://localhost:8082/druid/v2/?pretty’ -H ‘content-type: application/json’ -d@/home/xxx/query.body

Broker console log on machine C:

2016-02-05T02:37:13,830 WARN [HttpClient-Netty-Boss-0] org.jboss.netty.channel.SimpleChannelUpstreamHandler - EXCEPTION, please implement org.jboss.netty.handler.codec.http.HttpContentDecompressor.exceptionCaught() for proper handling.

java.net.ConnectException: Connection refused: localhost/127.0.0.1:8084

Thanks,

Bo

I am running Druid 0.8.3.

Command to run Broker:

java -Xmx1024m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -classpath config/_common:config/broker:lib/* io.druid.cli.Main server broker

common.runtime.properties:

Extensions (no deep storage model is listed - using local fs for deep storage - not recommended for production)

Also, for production to use mysql add, “io.druid.extensions:mysql-metadata-storage”

druid.extensions.coordinates=[“io.druid.extensions:mysql-metadata-storage”,“io.druid.extensions:druid-examples”,“io.druid.extensions:druid-kafka-eight”]

druid.extensions.localRepository=extensions-repo

Zookeeper

druid.zk.service.host=zookeeper01

druid.zk.paths.base=druid01

Metadata Storage (use something like mysql in production by uncommenting properties below)

by default druid will use derby

druid.metadata.storage.type=mysql

druid.metadata.storage.connector.connectURI=jdbc:mysql://mysql_server:3306/druid01

druid.metadata.storage.connector.user=root

druid.metadata.storage.connector.password=xxx

Deep storage (local filesystem for examples - don’t use this in production)

druid.storage.type=local

druid.storage.storageDirectory=/tmp/druid/localStorage

Query Cache (we use a simple 10mb heap-based local cache on the broker)

druid.cache.type=local

druid.cache.sizeInBytes=10000000

Indexing service discovery

druid.selectors.indexing.serviceName=overlord

Coordinator Service Discovery

druid.selectors.coordinator.serviceName=coordinator

Monitoring (disabled for examples, if you enable SysMonitor, make sure to include sigar jar in your cp)

druid.monitoring.monitors=[“com.metamx.metrics.SysMonitor”,“com.metamx.metrics.JvmMonitor”]

Metrics logging (disabled for examples - change this to logging or http in production)

druid.emitter=noop

config/broker/runtime.properties:

Default host: localhost. Default port: 8082. If you run each node type on its own node in production, you should override these values to be IP:8080

#druid.host=localhost

#druid.port=8082

druid.service=broker

We enable using the local query cache here

druid.broker.cache.useCache=true

druid.broker.cache.populateCache=true

For prod: set numThreads = # cores - 1, and sizeBytes to 512mb

druid.processing.buffer.sizeBytes=100000000

druid.processing.numThreads=1

Ok, things seem good after I change druid.host to be actual host name for realtime node and broker.

druid.host=xxx

Glad you figured it out :slight_smile: