Curl post command issue

Error:

1)

curl -H ‘Content-Type:  application/x-ndjson’ -XPOST ‘localhost:9200/bank/account/_bulk?pretty’ –data-binary @accounts.json

Working: (remove the space after “Content-Type:”)

http not support error

curl -H ‘Content-Type: application/x-ndjson’ -XPOST ‘localhost:9200/bank/account/_bulk?pretty’ –data-binary @accounts.json

correct syntax for windows  (change single quote to double quote)

curl -H ‘Content-Type:application/x-ndjson’ -XPOST ‘http://localhost:9200/bank/account/_bulk?pretty’ –data-binary @C:\BDS\KibanaData\accounts.json

right:

curl -H “Content-Type:application/x-ndjson” -XPOST “http://localhost:9200/bank/account/_bulk?pretty” –data-binary @C:\BDS\KibanaData\accounts.json

and it works!

 

 

How to run Confluent from Windows

  1. Start ZooKeeper Server. From confluent-3.0.1\bin\windows directory run below command. zookeeper-server-start.bat ..\..\etc\kafka\zookeeper.properties
  2. Start Kafka Server. kafka-server-start.bat ..\..\etc\kafka\server.properties
  3. Start Schema Registry: schema-registry-start.bat ..\..\etc\schema-registry\schema-registry.properties
  4. Start producer. kafka-console-producer.bat –broker-list localhost:9092 –topic text.test
  5. Start Consumer. kafka-console-consumer.bat –topic text.test –from-beginning –zookeeper localhost:2181
  6. Then start pumping messages from producer and you should receive it on consumer.