druid icon indicating copy to clipboard operation
druid copied to clipboard

druid 0.14.1-incubating router response 502 when a tier's brokers are all down

Open doctording opened this issue 7 years ago • 6 comments

druid 0.14.1-incubating

  • 2 historical, 2 tiers
  1. hot
  2. _default_tier
  • router, runtime.properties

druid.service=druid/router
druid.plaintextPort=8888

# HTTP proxy
druid.router.http.numConnections=50
druid.router.http.readTimeout=PT5M
druid.router.http.numMaxThreads=100
druid.server.http.numThreads=100

# Service discovery
druid.router.defaultBrokerServiceName=druid/broker
druid.router.coordinatorServiceName=druid/coordinator

# Management proxy to coordinator / overlord: required for unified web console.
druid.router.managementProxy.enabled=true

druid.router.tierToBrokerMap={"hot":"druid:broker-hot","_default_tier":"druid/broker"}
  • datasource

image

1 broker, router query is ok

  • localhost: 8082 => _default_tier

the following query is ok

curl -X POST \
  http://localhost:8888/druid/v2 \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: dafc7149-9a4b-4c57-86e2-0a40f6362c1c' \
  -H 'cache-control: no-cache' \
  -d '{
  "dimensions": [
    "added", 
    "cityName",
    "comment"
  ], 
  "aggregations": [
  ], 
  "intervals": "2015-09-11T00:00:00+00:00/2015-09-13T00:00:00+00:00", 
  "limitSpec": {
    "limit": 50, 
    "type": "default", 
    "columns": [  
    
    ]
  }, 
  "granularity": {
    "timeZone": "UTC", 
    "type": "period", 
    "period": "P1D"
  }, 
  "postAggregations": [], 
  "queryType": "groupBy", 
  "dataSource": "wikipedia"
}'

then 2 brokers, the same query is ok

  • localhost: 8082 => druid/broker
  • localhost: 9082 => druid:broker-hot

then 3 brokers, the same query is ok

  • localhost: 8082 => druid/broker
  • localhost: 9082 => druid:broker-hot
  • localhost: 9083 => druid:broker-hot

after kill the hot tier's all brokers

  • localhost: 8082 => druid/broker (not kill)
  • localhost: 9082 => druid:broker-hot (kill)
  • localhost: 9083 => druid:broker-hot (kill)

then the same query is wrong

image

but use the _default_tier broker is ok

image

the router log

2019-05-15T06:22:50,655 INFO [NodeTypeWatcher[BROKER]] org.apache.druid.curator.discovery.CuratorDruidNodeDiscoveryProvider$NodeTypeWatcher - Node[localhost:9082:DiscoveryDruidNode{druidNode=DruidNode{serviceName='druid:broker-hot', host='localhost', bindOnHost=false, port=-1, plaintextPort=9082, enablePlaintextPort=true, tlsPort=-1, enableTlsPort=false}, nodeType='BROKER', services={lookupNodeService=LookupNodeService{lookupTier='__default'}}}] disappeared.
2019-05-15T06:29:01,843 ERROR [qtp173070089-70] org.apache.druid.server.router.QueryHostFinder - WTF?! No server found for serviceName[druid:broker-hot]. Using backup
2019-05-15T06:29:01,855 ERROR [AsyncQueryForwardingServlet-3f362135-187] org.apache.druid.server.AsyncQueryForwardingServlet - Exception handling request: {class=org.apache.druid.server.AsyncQueryForwardingServlet, exceptionType=class java.net.ConnectException, exceptionMessage=Connection refused, exception=java.net.ConnectException: Connection refused, query=GroupByQuery{dataSource='wikipedia', querySegmentSpec=LegacySegmentSpec{intervals=[2015-09-11T00:00:00.000Z/2015-09-13T00:00:00.000Z]}, virtualColumns=[], limitSpec=DefaultLimitSpec{columns='[]', limit=50}, dimFilter=null, granularity={type=period, period=P1D, timeZone=UTC, origin=null}, dimensions=[DefaultDimensionSpec{dimension='added', outputName='added', outputType='STRING'}, DefaultDimensionSpec{dimension='cityName', outputName='cityName', outputType='STRING'}, DefaultDimensionSpec{dimension='comment', outputName='comment', outputType='STRING'}], aggregatorSpecs=[], postAggregatorSpecs=[], havingSpec=null}, peer=0:0:0:0:0:0:0:1}
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_171]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0_171]
	at org.eclipse.jetty.io.SelectorManager.doFinishConnect(SelectorManager.java:351) ~[jetty-io-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:185) [jetty-io-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.io.ManagedSelector.access$1200(ManagedSelector.java:60) [jetty-io-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:455) [jetty-io-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:325) [jetty-io-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produceTask(EatWhatYouKill.java:357) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:181) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:760) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:678) [jetty-util-9.4.10.v20180503.jar:9.4.10.v20180503]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]

doctording avatar May 14 '19 15:05 doctording

I set up the router, but hot tier broker do not work, only default broker work.
Could you please show me your configuration?

chenggaw avatar Sep 12 '19 10:09 chenggaw

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

stale[bot] avatar Jun 20 '20 17:06 stale[bot]

DRUID: Request failed with status code 502 after following step-by-step "Load Data" in Druid. and sometimes, I get the Error code 500, too!

essiTo avatar Jul 06 '20 12:07 essiTo

This issue is no longer marked as stale.

stale[bot] avatar Jul 06 '20 12:07 stale[bot]

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Aug 03 '23 00:08 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Sep 01 '23 00:09 github-actions[bot]