--We are testing kafka connect in distributed mode to pull topic records from kafka to HDFS. We have two boxes. One in which kafka and zookeeper daemons are running. We have kept one instance of kafka connect in this box. We have another box where HDFS namenode is present. We have kept another instance of kafka connect here.We started kafka,zookeeper and kafka connect in first box. We started kafka connect in second box as well. Now as per confluent documentation, we have to start the HDFS connector(or any other connector for that matter) using REST API. So, after starting kafka connect in these two boxes, we tried starting connector through REST API. We tried below command:-curl -X POST -H "HTTP/1.1 Host: ip-10-16-34-57.ec2.internal:9092 Content-Type: application/json Accept: application/json" --data '{"name": "hdfs-sink", "config": {"connector.class":"io.confluent.connect.hdfs.HdfsSinkConnector", "format.class":"com.qubole.streamx.SourceFormat", "tasks.max":"1", "hdfs.url":"hdfs://ip-10-16-37-124:9000", "topics":"Prd_IN_TripAnalysis,Prd_IN_Alerts,Prd_IN_GeneralEvents", "partitioner.class":"io.confluent.connect.hdfs.partitioner.DailyPartitioner", "locale":"", "timezone":"Asia/Calcutta" }}' http://ip-10-16-34-57.ec2.internal:8083/connectorsAs soon as we press enter here, we get below response:<html><head><meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/><title>Error 415 </title></head><body><h2>HTTP ERROR: 415</h2><p>Problem accessing /connectors. Reason:<pre> Unsupported Media Type</pre></p><hr /><i><small>Powered by Jetty://</small></i></body></html>(tried with localhost,ip-10-16-37-124,10.16.34.57,10.16.37.124 also). Have got "curl: (7) Failed connect to 10.16.37.124:8083; Connection refused" and "Error 500: Request Timed out" in those cases.The connect-distributed.properties file at etc/kafka/ is below in both the kafka connect nodes. We have created the said three topics as well (connect-offsets,connect-configs,connect-status)bootstrap.servers=ip-10-16-34-57.ec2.internal:9092group.id=connect-clusterkey.converter=com.qubole.streamx.ByteArrayConvertervalue.converter=com.qubole.streamx.ByteArrayConverterenable.auto.commit=truekey.converter.schemas.enable=truevalue.converter.schemas.enable=trueinternal.key.converter=org.apache.kafka.connect.json.JsonConverterinternal.value.converter=org.apache.kafka.connect.json.JsonConverterinternal.key.converter.schemas.enable=falseinternal.value.converter.schemas.enable=falseoffset.storage.topic=connect-offsetsrest.port=8083config.storage.topic=connect-configsstatus.storage.topic=connect-statusoffset.flush.interval.ms=10000ip-10-16-34-57.ec2.internal = server where kafka,zookeeper and one instance of kafka connect is runningip-10-16-37-124 = server where hdfs namenode and second instance of kafka connect is runinngWhat is the issue here? Are we missing something to start kafka connect in distributed mode to work with HDFS connectors.Looking forward to hearing from you.kafka connect in standalone mode is working fine.Nishant
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/c612f5da-4f86-4c2e-ae77-9e926d458538%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To post to this group, send email to confluent...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
WARNING: The following warnings have been detected: WARNING: The (sub)resource method listConnectors in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotation.
WARNING: The (sub)resource method createConnector in org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource contains empty path annotation.
WARNING: The (sub)resource method listConnectorPlugins in org.apache.kafka.connect.runtime.rest.resources.ConnectorPluginsResource contains empty path annotation.
WARNING: The (sub)resource method serverInfo in org.apache.kafka.connect.runtime.rest.resources.RootResource contains empty path annotation.
[2017-06-18 06:12:35,231] INFO Started o.e.j.s.ServletContextHandler@1cbf6e72{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler:744)
[2017-06-18 06:12:35,232] INFO Finished reading KafkaBasedLog for topic connect-configs (org.apache.kafka.connect.util.KafkaBasedLog:146)
[2017-06-18 06:12:35,232] INFO Started KafkaBasedLog for topic connect-configs (org.apache.kafka.connect.util.KafkaBasedLog:148)
[2017-06-18 06:12:35,232] INFO Started KafkaConfigBackingStore (org.apache.kafka.connect.storage.KafkaConfigBackingStore:248)
[2017-06-18 06:12:35,233] INFO Herder started (org.apache.kafka.connect.runtime.distributed.DistributedHerder:195)
[2017-06-18 06:12:35,238] INFO Started ServerConnector@2b35894d{HTTP/1.1}{0.0.0.0:8083} (org.eclipse.jetty.server.ServerConnector:266)
[2017-06-18 06:12:35,238] INFO Started @1136ms (org.eclipse.jetty.server.Server:379)
[2017-06-18 06:12:35,238] INFO REST server listening at http://10.77.8.72:8083/, advertising URL http://10.77.8.72:8083/ (org.apache.kafka.connect.runtime.rest.RestServer:150)
[2017-06-18 06:12:35,238] INFO Kafka Connect started (org.apache.kafka.connect.runtime.Connect:56)
[2017-06-18 06:12:35,260] INFO Discovered coordinator insight-01a:9092 (id: 2147483647 rack: null) for group amghouse-connect-cluster. (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:586)
[2017-06-18 06:12:35,263] INFO (Re-)joining group amghouse-connect-cluster (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:420)
[2017-06-18 06:12:35,283] INFO Successfully joined group amghouse-connect-cluster with generation 3 (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:388)
[2017-06-18 06:12:35,284] INFO Joined group and got assignment: Assignment{error=0, leader='connect-1-c8b5aed3-937e-4f0b-aaf2-4b929659f8d8', leaderUrl='http://10.77.8.72:8083/', offset=-1, connectorIds=[], taskIds=[]} (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1151)
[2017-06-18 06:12:35,284] INFO Starting connectors and tasks using config offset -1 (org.apache.kafka.connect.runtime.distributed.DistributedHerder:814)
[2017-06-18 06:12:35,284] INFO Finished starting connectors and tasks (org.apache.kafka.connect.runtime.distributed.DistributedHerder:824)
[2017-06-18 06:12:36,734] INFO Reflections took 1438 ms to scan 79 urls, producing 3636 keys and 18128 values (org.reflections.Reflections:229)
To post to this group, send email to confluent...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.