Not able to query created datasource

I have run a non-hadoop index task which resulted in the creation of data source called “websites”. I can see the data source listed in the coordinator console.

Now I am trying to query some data. I have created a query json and executing following query from putty to my Ubuntu machine running single node druid cluster:

user@machine:/opt/druid-0.9.1.1$ sudo curl -X ‘POST’ -H ‘Content-Type:application/json’ -d @quickstart/websites-ds-metadata-query.json localhost:8081/druid/v2/?pretty

However this gave me following output:

Error 404

HTTP ERROR: 404

Problem accessing /druid/v2/. Reason:

    Not Found

Powered by Jetty://

So I tried running following query (as suggested here) to check if it returns the datasource:

user@machine:/opt/druid-0.9.1.1$ sudo curl -X ‘GET’ localhost:8081/druid/v2/datasources

that too gave me following output:

Error 404

HTTP ERROR: 404

Problem accessing /druid/v2/datasources. Reason:

    Not Found

Powered by Jetty://

I must be missing something. What is that?

do you see any thing on the broker logs ?

Hi Mahesh, are you sure you have the broker running on 8081? It seems like you are running a queries against the coordinator.

Hey Mahesh,

The default broker port is 8082, try that instead.

Ohh thanks all. It seems that I was indeed querying to coordinator, not broker.
Also it will be a lot of help if there is a single page listing all default ports. I just googled and came across this page.

It lists following ports:

  • 1527 (Derby; not needed if you are using a separate metadata store like MySQL or PostgreSQL)
  • 2181 (ZooKeeper; not needed if you are using a separate zookeeper cluster)
  • 8081 (Druid Coordinator)
  • 8090 (Druid Overlord)
  • 8082 (Druid Broker)
  • 9095 (Pivot)
  • 8083 (Druid Historical)
  • 8091 (Druid Middle Manager)
  • 8100–8199 (Druid Peons)
  • 8200 (Tranquility Server)
    Does default druid ports are the same as above?

Ohhh found below tut which lists druid default ports: http://druid.io/docs/latest/tutorials/cluster.html