Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple listeners support : Confluent Schema-Registry with redpanda #98

Closed
Tracked by #744
raphaelauv opened this issue Nov 16, 2020 · 28 comments
Closed
Tracked by #744
Assignees
Milestone

Comments

@raphaelauv
Copy link

raphaelauv commented Nov 16, 2020

I want to use the confluent schema-registry with redpanda , I'm trying with the confluent docker image and I don't know what to set for :

SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL

From this blog post https://www.confluent.fr/blog/how-to-prepare-for-kip-500-kafka-zookeeper-removal-guide/ , we should replace

kafkastore.connection.url by kafkastore.bootstrap.servers

So SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL become SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS

https://docs.confluent.io/current/installation/docker/config-reference.html#schema-registry-configuration

Docker-compose configuration :

version: '3.8'

services:

  kafka-broker:
    image: vectorized/redpanda
    ports:
      - 9092:9092
    expose:
      - 29092
    environment:
      KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-broker:29092,OUTSIDE://localhost:9092
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,OUTSIDE:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT

  schema-registry:
    image: confluentinc/cp-schema-registry:6.1.0
    hostname: schema-registry
    depends_on:
      - kafka-broker
    ports:
      - 8081:8081
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-broker:29092

The shema-registry container logs :

[main] ERROR io.confluent.admin.utils.ClusterStatus - Error while getting broker list.
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Call(callName=listNodes, deadlineMs=1605548460336, tries=1, nextAllowedTryMs=1605548460437) timed out at 1605548460337 after 1 attempt(s)
	at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
	at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
	at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)
	at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
	at io.confluent.admin.utils.ClusterStatus.isKafkaReady(ClusterStatus.java:149)
	at io.confluent.admin.utils.cli.KafkaReadyCommand.main(KafkaReadyCommand.java:150)
Caused by: org.apache.kafka.common.errors.TimeoutException: Call(callName=listNodes, deadlineMs=1605548460336, tries=1, nextAllowedTryMs=1605548460437) timed out at 1605548460337 after 1 attempt(s)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
[main] INFO io.confluent.admin.utils.ClusterStatus - Expected 1 brokers but found only 0. Trying to query Kafka for metadata again ...
[main] ERROR io.confluent.admin.utils.ClusterStatus - Expected 1 brokers but found only 0. Brokers found [].

and Redpanda logs :

Missing license key. Please get a new one at https://vectorized.io/download-trial/
Error fetching the Redpanda topic details: dial tcp :0: connect: connection refused
  Version                                 release-20.11.1 (rev 0fb1a90)                                        
  OS                                      x86_64                                                            5.4.0-53-generic                                                  #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC 2020                        

Thank you

@raphaelauv raphaelauv changed the title Schema Registry with redpanda Confluent Schema-Registry with redpanda Nov 16, 2020
@emaxerrno
Copy link
Contributor

thanks @raphaelauv for the report. We'll take a look. cc: @dotnwat

@dotnwat dotnwat self-assigned this Nov 16, 2020
@dotnwat
Copy link
Member

dotnwat commented Nov 17, 2020

@raphaelauv thanks for the detailed report.

the good news is that this appears to be a networking issue. i was able to at least start the schema registry and get it connected to a redpanda instance not running inside docker:

...
schema-registry_1  | [2020-11-17 00:31:14,420] INFO HV000001: Hibernate Validator 6.0.17.Final (org.hibernate.validator.internal.util.Version)
schema-registry_1  | [2020-11-17 00:31:14,585] INFO Started o.e.j.s.ServletContextHandler@4a699efa{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler)
schema-registry_1  | [2020-11-17 00:31:14,595] INFO Started o.e.j.s.ServletContextHandler@7b44b63d{/ws,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler)
schema-registry_1  | [2020-11-17 00:31:14,607] INFO Started NetworkTrafficServerConnector@15a04efb{HTTP/1.1,[http/1.1]}{0.0.0.0:8081} (org.eclipse.jetty.server.AbstractConnector)
schema-registry_1  | [2020-11-17 00:31:14,607] INFO Started @19335ms (org.eclipse.jetty.server.Server)
schema-registry_1  | [2020-11-17 00:31:14,607] INFO Server started, listening for requests... (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain)

there are two issues at play here

  1. we have an issue with ipv6 and how the broker is binding to its listening port.
  2. the redpanda broker inside docker appears to be advertising an empty host. @0x5d is working on this via rpk/config: Make redpanda.advertised* optional #99

I'll update this ticket when we've resolved these issues.

In the mean time, I was able to get things working by running redpanda outside of docker, and then pointing the schema registery container at localhost via network_mode: host.

@emaxerrno
Copy link
Contributor

@raphaelauv #100 just landed which fixes this issue.

@emaxerrno
Copy link
Contributor

@raphaelauv fixed in the latest release https://github.com/vectorizedio/redpanda/releases/latest

let us know if you run into issues again.

@raphaelauv
Copy link
Author

raphaelauv commented Nov 18, 2020

Hi thanks for your reply.

I just tried by pulling the latest docker image and it's still not working , did you try my docker-compose example ? Thank you again

I tried with all theses different possibilities :

SCHEMA_REGISTRY_BOOTSTRAP_SERVERS: PLAINTEXT://kafka-broker:29092
SCHEMA_REGISTRY_BOOTSTRAP_SERVERS: kafka-broker:29092
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka-broker:29092
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-broker:29092

@dotnwat
Copy link
Member

dotnwat commented Nov 18, 2020

@raphaelauv thanks for testing again! sorry, this ticket was closed too early.

there are a couple issues that we are working on to resolve this. first, we have a networking issue that is preventing the advertised server from being properly configured in this docker-compose scenario. follow #125 should be a pretty quick fix.

i was able to circumvent this with host-based networking as a quick test.

version: '3.8'
services:
  kafka-broker:
    image: vectorized/redpanda:latest
    network_mode: host
    ports:
      - 9092:9092

  schema-registry:
    image: confluentinc/cp-schema-registry:6.0.0
    network_mode: host
    depends_on:
      - kafka-broker
    ports:
      - 8081:8081
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: localhost:9092

unfortunately the schema registry unearthed an issue with our fetch request compatibility. we have two pull request being tested right now that addresses this which you can follow here #25 and #126.

all these fixes should drop in the next day or two. i'll update this ticket then.

@dotnwat dotnwat reopened this Nov 18, 2020
@emaxerrno
Copy link
Contributor

we should try this now that #25 and #126 merged.

@raphaelauv
Copy link
Author

I pulled the latest container for redpanda still the same error

@BenPope
Copy link
Member

BenPope commented Nov 27, 2020

@raphaelauv can you use host networking as above?

We're still working on configuration via env vars.

I've raised an issue for supporting multiple listeners.

@raphaelauv
Copy link
Author

Thank for the hack ( host networking ) but multiple listeners is a necessary feature for my kafka stack. I will wait until it's ready.

@dotnwat
Copy link
Member

dotnwat commented Dec 11, 2020

thanks @raphaelauv we'll update when its done. turned out to be more work than we anticipated, but i'd say early next week.

@emaxerrno
Copy link
Contributor

emaxerrno commented Jan 23, 2021

Multiple listeners went in on #186 . Will tag here w/ release.

@raphaelauv
Copy link
Author

Hi, I just tried my example ( from first post ) with the release v21.2.2 , it's not working

@raphaelauv raphaelauv changed the title Confluent Schema-Registry with redpanda Multiple listeners support : Confluent Schema-Registry with redpanda Feb 17, 2021
@BenPope
Copy link
Member

BenPope commented Feb 17, 2021

We don't support env vars yet, so when you start Redpanda, you'll need to pass some command line flags:

You might be able to get away with:

redpanda start
--kafka-addr="$KAFKA_LISTENERS"
--advertise-kafka-addr="$KAFKA_ADVERTISED_LISTENERS"

@emaxerrno
Copy link
Contributor

@raphaelauv what @BenPope said :)

We have a few users using confluent schema registry successfully now:

#591

@emaxerrno
Copy link
Contributor

@raphaelauv this works

version: '3.8'

services:

  kafka-broker:
    image: vectorized/redpanda:v21.2.2
    ports:
      - 9092:9092
    expose:
      - 29092
    entrypoint: [/usr/bin/rpk, redpanda, start, --kafka-addr, "PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092", --advertise-kafka-addr, "PLAINTEXT://kafka-broker:29092,OUTSIDE://localhost:9092"]

  schema-registry:
    image: confluentinc/cp-schema-registry:6.1.0
    hostname: schema-registry
    depends_on:
      - kafka-broker
    ports:
      - 8081:8081
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-broker:29092
      

@raphaelauv
Copy link
Author

raphaelauv commented Feb 17, 2021

@senior7515 thank you but I just copy paste your example on a new docker-compose.yml file and then "docker-compose up -d"

schema-registry give me :

[main] ERROR io.confluent.admin.utils.ClusterStatus - Error while getting broker list.
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Call(callName=listNodes, deadlineMs=1613587593245, tries=1, nextAllowedTryMs=1613587593346) timed out at 1613587593246 after 1 attempt(s)
	at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
	at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
	at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)
	at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
	at io.confluent.admin.utils.ClusterStatus.isKafkaReady(ClusterStatus.java:149)
	at io.confluent.admin.utils.cli.KafkaReadyCommand.main(KafkaReadyCommand.java:150)
Caused by: org.apache.kafka.common.errors.TimeoutException: Call(callName=listNodes, deadlineMs=1613587593245, tries=1, nextAllowedTryMs=1613587593346) timed out at 1613587593246 after 1 attempt(s)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: listNodes
[kafka-admin-client-thread | adminclient-1] WARN org.apache.kafka.clients.NetworkClient - [AdminClient clientId=adminclient-1] Connection to node -1 (kafka-broker/172.28.0.2:29092) could not be established. Broker may not be available.
[main] INFO io.confluent.admin.utils.ClusterStatus - Expected 1 brokers but found only 0. Trying to query Kafka for metadata again ...

are you sure this work on your side ?

Thanks

@BenPope
Copy link
Member

BenPope commented Feb 17, 2021

Do you have the logs for Redpanda?

@raphaelauv
Copy link
Author

raphaelauv commented Feb 17, 2021


[{{0.0.0.0 29092} plaintext} {{0.0.0.0 9092} outside}]
[{{kafka-broker 29092} plaintext} {{localhost 9092} outside}]
Detecting the current cloud vendor and VM
Could not detect the current cloud vendor
System check 'Dir '/var/lib/redpanda/data' scheduler tuned' failed with non-fatal error 'readlink /sys/dev/block/0:56: no such file or directory'
System check 'Dir '/var/lib/redpanda/data' IRQs affinity static' failed with non-fatal error 'readlink /sys/dev/block/0:56: no such file or directory'
System check 'Dir '/var/lib/redpanda/data' nomerges tuned' failed with non-fatal error 'readlink /sys/dev/block/0:56: no such file or directory'
System check 'Fstrim systemd service and timer active' failed with non-fatal error 'dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory'
System check 'NTP Synced' failed with non-fatal error 'couldn't check NTP with timedatectl or ntpstat'
System check 'Dir '/var/lib/redpanda/data' IRQs affinity set' failed with non-fatal error 'readlink /sys/dev/block/0:56: no such file or directory'
System check 'RFS Table entries' failed with non-fatal error 'open /proc/sys/net/core/rps_sock_flow_entries: no such file or directory'
System check 'Data directory filesystem type' failed. Required: xfs, Current unknown
System check 'Dir '/var/lib/redpanda/data' IRQs affinity set' failed. Required: true, Current 
System check 'Dir '/var/lib/redpanda/data' IRQs affinity static' failed. Required: true, Current 
System check 'Dir '/var/lib/redpanda/data' nomerges tuned' failed. Required: true, Current 
System check 'Dir '/var/lib/redpanda/data' scheduler tuned' failed. Required: true, Current 
System check 'Fstrim systemd service and timer active' failed. Required: true, Current 
System check 'I/O config file present' failed. Required: true, Current false
System check 'Max AIO Events' failed. Required: >= 1048576, Current 65536
System check 'Max syn backlog size' failed. Required: >= 4096, Current 2048
System check 'NTP Synced' failed. Required: true, Current 
System check 'RFS Table entries' failed. Required: >= 32768, Current 
System check 'Swappiness' failed. Required: 1, Current 60
System check - PASSED
ERROR 2021/02/17 18:49:25 svType != tvType; key=kafka_api, st=[]interface {}, tt=map[string]interface {}, sv=[map[address:0.0.0.0 name:plaintext port:29092] map[address:0.0.0.0 name:outside port:9092]], tv=map[address:0.0.0.0 port:9092]
We'd love to hear about your experience with redpanda:
https://vectorized.io/feedback
Starting redpanda...
Running:
SUPERCRONIC=supercronic-linux-amd64 SUPERCRONIC_SHA1SUM=a2e2d47078a8dafc5949491e5ea7267cc721d67c HOSTNAME=9814b984f309 PWD=/ HOME=/var/lib/redpanda SHLVL=0 SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.11/supercronic-linux-amd64 PATH=/opt/redpanda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBIAN_FRONTEND=noninteractive /opt/redpanda/bin/redpanda redpanda --redpanda-cfg /etc/redpanda/redpanda.yaml --overprovisioned --lock-memory=false
INFO   redpanda::main - application.cc:65 - Redpanda aaf8c81 - aaf8c81f17251b20d306d9f801a898c9d258303c
INFO   redpanda::main - application.cc:73 - kernel=5.8.0-43-generic, nodename=9814b984f309, machine=x86_64
INFO  2021-02-17 18:49:27,322 [shard 0] redpanda::main - application.cc:174 - Configuration:

cluster_id: ""
config_file: /etc/redpanda/redpanda.yaml
license_key: ""
node_uuid: kLUdm58LGq1f1MCzmn46v5gFgKU3EYMzuYGK2RuyJrcdXbRq4
organization: ""
redpanda:
  admin:
    address: 0.0.0.0
    port: 9644
  advertised_kafka_api:
    - address: kafka-broker
      name: plaintext
      port: 29092
    - address: localhost
      name: outside
      port: 9092
  auto_create_topics_enabled: true
  data_directory: /var/lib/redpanda/data
  developer_mode: true
  kafka_api:
    address: 0.0.0.0
    port: 9092
  node_id: 1
  rpc_server:
    address: 0.0.0.0
    port: 33145
  seed_servers: []
rpk:
  coredump_dir: /var/lib/redpanda/coredump
  enable_memory_locking: false
  enable_usage_stats: true
  overprovisioned: true
  tls:
    cert_file: ""
    key_file: ""
    truststore_file: ""
  tune_aio_events: false
  tune_clocksource: false
  tune_coredump: false
  tune_cpu: false
  tune_disk_irq: false
  tune_disk_nomerges: false
  tune_disk_scheduler: false
  tune_disk_write_cache: false
  tune_fstrim: false
  tune_network: false
  tune_swappiness: false
  tune_transparent_hugepages: false
  well_known_io: ""


INFO  2021-02-17 18:49:27,322 [shard 0] redpanda::main - application.cc:181 - Use `rpk config set redpanda.<cfg> <value>` to change values below:
INFO  2021-02-17 18:49:27,322 [shard 0] syschecks - Writing pid file "/var/lib/redpanda/data/pid.lock"
INFO  2021-02-17 18:49:27,330 [shard 0] storage - directories.h:33 - Checking `/var/lib/redpanda/data` for supported filesystems
ERROR 2021-02-17 18:49:27,331 [shard 0] syschecks - Path: `/var/lib/redpanda/data' is not on XFS. This is a non-supported setup. Expect poor performance.
INFO  2021-02-17 18:49:27,331 [shard 0] redpanda::main - application.cc:310 - Started HTTP admin service listening at {host: 0.0.0.0, port: 9644}
INFO  2021-02-17 18:49:27,639 [shard 0] redpanda::main - application.cc:395 - Partition manager started
INFO  2021-02-17 18:49:27,657 [shard 0] cluster - raft0_utils.h:32 - Current node is cluster root
INFO  2021-02-17 18:49:27,668 [shard 0] storage - segment.cc:609 - Creating new segment /var/lib/redpanda/data/redpanda/kvstore/0_0/0-0-v1.log
INFO  2021-02-17 18:49:27,674 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:757 - Starting
INFO  2021-02-17 18:49:27,696 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:787 - Recovered, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term:0
INFO  2021-02-17 18:49:27,718 [shard 0] cluster - state_machine.cc:29 - Starting state machine
INFO  2021-02-17 18:49:27,718 [shard 0] cluster - members_manager.cc:56 - starting cluster::members_manager...
INFO  2021-02-17 18:49:27,729 [shard 0] raft - [group_id:0, {redpanda/controller/0}] vote_stm.cc:244 - became the leader term:1
INFO  2021-02-17 18:49:27,729 [shard 0] storage - segment.cc:609 - Creating new segment /var/lib/redpanda/data/redpanda/controller/0_0/0-1-v1.log
INFO  2021-02-17 18:49:27,730 [shard 0] redpanda::main - application.cc:605 - Started RPC server listening at {host: 0.0.0.0, port: 33145}
INFO  2021-02-17 18:49:27,731 [shard 0] redpanda::main - application.cc:647 - Started Kafka API server listening at {{:{host: 0.0.0.0, port: 9092}}}
INFO  2021-02-17 18:49:27,731 [shard 0] redpanda::main - application.cc:661 - Successfully started Redpanda!

@BenPope
Copy link
Member

BenPope commented Feb 17, 2021

Looks like the configuraton didn't work:

  kafka_api:
    address: 0.0.0.0
    port: 9092

Needs to be:

  kafka_api:
    - address: 0.0.0.0
      name:  plaintext
      port: 29092
    - address: 0.0.0.0
      name:  outside
      port: 9092

@BenPope
Copy link
Member

BenPope commented Feb 18, 2021

OK, so the problem is:

ERROR 2021/02/17 18:49:25 svType != tvType; key=kafka_api, st=[]interface {}, tt=map[string]interface {}, sv=[map[address:0.0.0.0 name:plaintext port:29092] map[address:0.0.0.0 name:outside port:9092]], tv=map[address:0.0.0.0 port:9092]

It looks like it tries to update the kafka_api json node with a list, when it's already a map.

@BenPope
Copy link
Member

BenPope commented Feb 18, 2021

I've reopened #524

The easiest fix for now is to mount a configuration file that doesn't have kafka_api set:

./redpanda.yaml:

redpanda:
  auto_create_topics_enabled: true
  node_id: 1
rpk:
  enable_usage_stats: true
chmod 777 ./redpanda.yaml
docker run --mount type=bind,source="$(pwd)"/redpanda.yaml,target=/etc/redpanda/redpanda.yaml vectorized/redpanda:v21.2.2 redpanda start --kafka-addr "PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092" --advertise-kafka-addr "PLAINTEXT://kafka-broker:29092,OUTSIDE://localhost:9092"

@dotnwat dotnwat removed their assignment Feb 21, 2021
@dotnwat dotnwat added this to the v21.3.x milestone Feb 21, 2021
@criskurtin
Copy link

criskurtin commented Feb 23, 2021

Just stumbled upon this issue while I was trying to set up containerized redpanda to be accessible to consumers on the local machine. For anyone who needs a temporary fix in docker-compose form, here it is (assuming you have the redpanda.yml in the same directory as docker-compose.yml and you've already done chmod 777 redpanda.yml):

  kafka:
    image: 'vectorized/redpanda:latest'
    command: [redpanda, start, --kafka-addr, "PLAINTEXT://0.0.0.0:9092,OUTSIDE://0.0.0.0:29092", --advertise-kafka-addr, "PLAINTEXT://kafka:9092,OUTSIDE://localhost:29092"]
    ports:
    - 9092:9092
    - 29092:29092
    volumes:
    - type: bind
      source: ./redpanda.yml
      target: /etc/redpanda/redpanda.yaml

@BenPope
Copy link
Member

BenPope commented Feb 23, 2021

For anyone who needs a temporary fix in docker-compose form, here it is (assuming you have the redpanda.yml in the same directory as docker-compose.yml and you've already done chmod 777 redpanda.yml):

Looks great for a single broker, thanks for this.

One caveat: Looks like host networking is required for OUTSIDE, so won't work on MacOS.

@emaxerrno
Copy link
Contributor

emaxerrno commented Mar 9, 2021

Posting this here as progress - i tested w/ 21.3.4:

version: '3.8'

services:

  kafka-broker:
    image: vectorized/redpanda:v21.3.4
    ports:
      - 9092:9092
      - 29092:29092
    entrypoint: [/usr/bin/rpk, redpanda, start, --kafka-addr, "PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092", --advertise-kafka-addr, "PLAINTEXT://kafka-broker:29092,OUTSIDE://localhost:9092"]
  

  schema-registry:
    image: confluentinc/cp-schema-registry:6.1.0
    hostname: schema-registry
    depends_on:
      - kafka-broker
    ports:
      - 8081:8081
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-broker:29092

and got:

# docker-compose up -d                                                    
Creating network "schemaregistry_default" with the default driver
Creating schemaregistry_kafka-broker_1 ... done
Creating schemaregistry_schema-registry_1 ... done
# curl -X GET http://localhost:8081/schemas/ids/1
{"error_code":40403,"message":"Schema 1 not found"}% 

# curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"schema": "{\"type\": \"string\"}"}' \
     http://localhost:8081/subjects/Kafka-value/versions
{"id":1}% 

# curl -X GET http://localhost:8081/schemas/ids/1                         
{"schema":"\"string\""}%  

@emaxerrno
Copy link
Contributor

@0x5d can you close this ticket nwothat multiple listeners is in v21.3.5-beta3

@0x5d 0x5d closed this as completed Mar 22, 2021
@emaxerrno
Copy link
Contributor

I also added a ticket + example of docker compose in here #931

@devildev2018
Copy link

Hi There,

Need small help on configuring these values in helm

kafka_api:

  • address: "0.0.0.0"
    name: internal
    port: 9092
  • address: "0.0.0.0"
    name: external
    port: 9093

The default values.yaml doesn't contain internal. Kindly help in configuring the above values in helm chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants