-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cannot consume or produce data to topic on docker version 1.13.1 in kafka cluster with external apis #434
Comments
It sounds like you have similar issues to #432. If you haven't, I'd recommend reading the Connectivity Guide Someone had a similar issue with the resolvable address of the Swarm cluster and opened a PR: #377. Perhaps using the FQDN will solve your situation.
I think you are just mis-reading the output
It states that
This reads, "broker 3 is currently the leader for paritition 0 for test1 topic. It is only replicated on broker 3. Currently the in-sync replicas (ISRs) are broker 3" If you create a topic with |
Thanks for the reply. I misinterpreted the topic description. However, I am not sure about FQDN, because i haven't done anything different on the same set up with docker version 18x. |
The value will be = "docker info | grep ^Name: | cut -d' ' -f 2", it is used in the shell script to derive the Host Machine name and further the advertised listener is set with Host Machine Name in server.properties. I am using docker stack deploy command to create cluster. |
I'm asking what is the value, not how it is generated. Have you made sure that is returning the value you are expecting? (i.e. is it advertising a name that is resolvable by the client?, Does it match the expected "Host Machine" name). As previously stated, there were some updates to docker-compose that broke addressability. Checking the version is a simple check Have you performed basic network checks / can you access the ports on the derived hosts? Have you checked in Zookeeper to confirm the correct configuration is stored? Also, I don't see any pinning of brokers to physical host. Just a broker ID - so if you are not clearing state between restarting brokers there is a 50/50 chance that the broker is starting with the incorrect config and claiming to be responsible for offsets that it does not have on disk. However, with that being said, I don't think your |
Yes the value is as expected and it is as here docker5 is my machine name Yes ports are opened and I can see they are in a list of listening status using
Yes Zookeeper seems to be working fine as I can produce and consume data from inside the container on each node. BROKER_ID_COMMAND is only used to assign distinct broker.id on each node. Extracting numeric value from Host Machine Name. Same setup on with Docker version 18x and Docker Compose version 1.23.1, everything seems to be working. DO you there can be an issue with versions? There is a difference I see on both version is that
Docker 1.13.1, container is running as
I don't see the port opened when I do "docker ps" on nodes with docker 1.13.1. My Compose file from Docker 18x is as
|
I even upgraded to docker-compose version to 1.23.1 and still the same issue on set up with docker version 1.13.1 |
Not according to the docker-compose file you provided.
Given your hostname of How does your client resolve
Possibly. If you are using the For reference the build server uses:
From what I can see, this issue is nothing to do with the kafka-docker image. This seems more of a docker / docker-swarm / docker-compose / configuration issue. |
My Servers are hosted on Google Cloud in the same network. SO all nodes are accessible with in network. Yes, I also think that there is no issue with Kafka Image. It has to be docker version, because the same image is working fine on docker 18x. Thanks for your help!! |
OK. I will close the issue then. |
Clarification
This issues is regarding a configuration that is working with docker swarm and docker 18.x.x but does not work with docker 1.13.1
I am able to successfully produce and consume the data inside each kafka container running on each node. However, when it try to produce or consume data externally through APIs. I am not able to do so.
I have created kafka cluster with docker stack deploy using following configuration in yml file
Another strange behavior is that when I create a topic inside a kafka container with replication factor 1, it gets created with some random replication factor.
I built the same set up on docker version 18x and everything works fine. I can produce and consume data with external apis.
The text was updated successfully, but these errors were encountered: