Comments (28)
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\""}%
from redpanda.
thanks @raphaelauv for the report. We'll take a look. cc: @dotnwat
from redpanda.
@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
- we have an issue with ipv6 and how the broker is binding to its listening port.
- the redpanda broker inside docker appears to be advertising an empty host. @0x5d is working on this via #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.
from redpanda.
@raphaelauv #100 just landed which fixes this issue.
from redpanda.
we should try this now that #25 and #126 merged.
from redpanda.
thanks @raphaelauv we'll update when its done. turned out to be more work than we anticipated, but i'd say early next week.
from redpanda.
Multiple listeners went in on #186 . Will tag here w/ release.
from redpanda.
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"
from redpanda.
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"
from redpanda.
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
from redpanda.
@raphaelauv fixed in the latest release https://github.com/vectorizedio/redpanda/releases/latest
let us know if you run into issues again.
from redpanda.
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
from redpanda.
@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.
from redpanda.
I pulled the latest container for redpanda still the same error
from redpanda.
@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.
from redpanda.
Thank for the hack ( host networking ) but multiple listeners is a necessary feature for my kafka stack. I will wait until it's ready.
from redpanda.
Hi, I just tried my example ( from first post ) with the release v21.2.2 , it's not working
from redpanda.
@raphaelauv what @BenPope said :)
We have a few users using confluent schema registry successfully now:
from redpanda.
@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
from redpanda.
@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
from redpanda.
Do you have the logs for Redpanda?
from redpanda.
[{{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!
from redpanda.
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
from redpanda.
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.
from redpanda.
For anyone who needs a temporary fix in docker-compose form, here it is (assuming you have the
redpanda.yml
in the same directory asdocker-compose.yml
and you've already donechmod 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.
from redpanda.
@0x5d can you close this ticket nwothat multiple listeners is in v21.3.5-beta3
from redpanda.
I also added a ticket + example of docker compose in here #931
from redpanda.
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.
from redpanda.
Related Issues (20)
- CI Failure (key symptom) in `OMBValidationTest.test_max_partitions` HOT 1
- CI Failure (key symptom) in `SimpleSelfTest.test_cloud` HOT 1
- CI Failure (key symptom) in `RollingRestartTest.test_restart_pod` HOT 1
- CI Failure (key symptom) in `RollingRestartTest.test_rolling_restart` HOT 1
- CI Failure (key symptom) in `RedpandaCloudSelfTest.test_healthy` HOT 1
- CI Failure (key symptom) in `HTObserveTest.test_cloud_observe` HOT 1
- CI Failure (key symptom) in `SchemaRegistryTest.test_restarts`
- CI Failure (key symptom) in `OMBValidationTest.test_common_workload` HOT 1
- CI Failure (key symptom) in `WriteCachingMetricsTest.test_request_metrics`
- CI Failure (key symptom) in `CreateTopicReplicaDistributionTest.test_topic_aware_distribution`
- CI Failure (key symptom) in `RollingRestartTest.test_rolling_restart`
- CI Failure (key symptom) in `CloudStorageTimingStressTest.test_cloud_storage_with_partition_moves`
- [v23.3.x] rm_stm/tests: add test for producer expiration without data batches HOT 1
- [v23.2.x] rm_stm/tests: add test for producer expiration without data batches
- [v24.1.x] rm_stm/tests: add test for producer expiration without data batches
- [v24.1.x] Go runtime panic using `rpk cloud cluster select` HOT 2
- [v24.1.x] rm_stm: consider transactions without data batches for expiration HOT 1
- [v23.3.x] Oversized allocation: 655360 bytes in `even_topic_distributon_constraint::rebuild_indexes`
- [v24.1.x] Oversized allocation: 655360 bytes in `even_topic_distributon_constraint::rebuild_indexes` HOT 1
- CI Failure (key symptom) in `test_raft_rpunit` - "test_linarizable_barrier": critical check success has failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redpanda.