Open guitcastro opened 5 years ago
Is there a specific reason you need to use host network mode?
Any answers to this one? Seems we are facing the same issue even without the docker container.
@TonyTromp please show a SSCCE of downloading and starting everything.
If it didn't start correctly, you'd obviously seen more issues and comments here
The error in the first post is the fact that localhost is always going to be the schema registry itself, not Zookeeper or Kafka
I have a similar problem, but I have run everything using HashiCorp consul and nomad. More than that, I am trying to build PoC of a service mesh for standalone kafka cluster (1-zookeeper & 1-kafka-broker & 1-schema-registry).
I put all containers behind envoy proxy
, this feature comes from box - consul-connect
.
I have repository, where I put create readme file with steps to reproduce this problem. https://github.com/zhenik-poc/hashicorp-stacks/blob/master/learn/consul-connect/kafka/issue-734.md
I'm able to run Schema Registry in nomad.
Haven't tried Zookeeper or Kafka
But the issues you'll run into is each of the LISTENERS variables between kafka and the registry as well as other clients
As I've pointed out already localhost/127.0.0.1 is almost never the correct address when working with Docker services
KAFKA_LISTENERS should be 0.0.0.0
Understand what the advertised listeners are https://www.confluent.io/blog/kafka-listeners-explained/
For Nomad, use the Zookeeper Consul DNS name, not localhost. Use the correct ports, not 9181 (unless you changed it for some reason)
For Schema Registry, I would suggest not using Zookeeper and use the Kafka-based election mode (refer to the documentation)
Thank you @cricket007 for useful info and links.
As I said the case is a bit specific due to the use of consul-connect
. Env: zookeeper, kafka and schema registry. Each node behind envoy proxy and the communicate via loopback
and side_car proxy (envoy). Yes, I can use consul-dns
, but it is not the point.
The current problem is not a communication between nodes (I tested differently already, it works fine, except schema-registry via nomad). The concrete problem in the container's hostname
. I cannot override it by using nomad property hostname
, cause I use bridge network. I cannot use nomad property extra_hosts
due to bridge network also.
I understand that changing /etc/hosts
is adhoc solution and should be avoided. Which was described in blog post.
I think this issue is about how to resolve a hostname for node where schema-registry is deployed.
I wonder is it an issue when schema-registry deployed on k8s.
I'll keep digging.
k8s uses the service DNS name.
You should be able to use some similar nomad env var to get that information.
For debugging purposes, you may want to not use Consul connect until you have direct service interaction working. In particular, I don't think the Envoy Kafka protocol is fully complete yet
For debugging purposes, you may want to not use Consul connect until you have direct service interaction working. In particular, I don't think the Envoy Kafka protocol is fully complete yet
Yeah Filters for zookeeper at alpha stage . And Kafka broker filters supports 2.4 Kafka .
Thx for help.
I was running into issues until I set the hostname
parameter to localhost
, or I guess the same value as the SCHEMA_REGISTRY_HOST_NAME
variable.
I am trying to start the schema registry docker image with the following configs:
Although I am facing the following error:
Any ideias?