Skip to content

Commit f29e6eb

Browse files
committed
Logs, unlike docs, revealed that kafka-rest needs ...
both zookeeper and bootstrap addresses. Was getting connection errors to localhost:9092 broker id -1, resulting in REST requests never returning.
1 parent eb1a102 commit f29e6eb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

11confluent-config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ data:
4343
4444
#id=kafka-rest-test-server
4545
listeners=http://0.0.0.0:80
46-
schema.registry.url=http://schemas.kafka.svc.cluster.local:80
46+
bootstrap.servers=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
4747
zookeeper.connect=zookeeper:2181
48+
schema.registry.url=http://schemas.kafka.svc.cluster.local:80
4849
#
4950
# Configure interceptor classes for sending consumer and producer metrics to Confluent Control Center
5051
# Make sure that monitoring-interceptors-<version>.jar is on the Java class path

test/rest-curl.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ data:
2222
curl -X POST \
2323
-H "Content-Type: application/vnd.kafka.json.v2+json" -H "Accept: application/vnd.kafka.v2+json" \
2424
--data "{\"records\":[{\"value\":\"Test from $HOSTNAME at $(date -u -Iseconds)\"}]}" \
25-
$REST/topics/$TOPIC -v --max-time 30 \
26-
|| echo " (timeout might be ok because we only want to send one message)"
27-
# TODO why does the above block?
28-
25+
$REST/topics/$TOPIC
2926
3027
curl --retry 10 -H 'Accept: application/vnd.kafka.v2+json' $REST/topics/$TOPIC/partitions
3128
echo ""

0 commit comments

Comments
 (0)