{"action":"created","issue":{"url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka/issues/21","repository_url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka","labels_url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka/issues/21/comments","events_url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka/issues/21/events","html_url":"https://github.com/bitnami/bitnami-docker-kafka/issues/21","id":352103784,"node_id":"MDU6SXNzdWUzNTIxMDM3ODQ=","number":21,"title":"Cannot produce message to Kafka container from Windows host","user":{"login":"charithf","id":18265003,"node_id":"MDQ6VXNlcjE4MjY1MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/18265003?v=4","gravatar_id":"","url":"https://api.github.com/users/charithf","html_url":"https://github.com/charithf","followers_url":"https://api.github.com/users/charithf/followers","following_url":"https://api.github.com/users/charithf/following{/other_user}","gists_url":"https://api.github.com/users/charithf/gists{/gist_id}","starred_url":"https://api.github.com/users/charithf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charithf/subscriptions","organizations_url":"https://api.github.com/users/charithf/orgs","repos_url":"https://api.github.com/users/charithf/repos","events_url":"https://api.github.com/users/charithf/events{/privacy}","received_events_url":"https://api.github.com/users/charithf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-20T11:58:02Z","updated_at":"2018-08-20T16:33:27Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm logging this issue just to get some support. I'm not sure whether this is a configuration issue.\r\n\r\n- I am using https://github.com/bitnami/bitnami-docker-kafka\r\n- I have created a simple zookeeper/kafka instance via docker-compose\r\n\r\n```\r\nservices:\r\nzookeeper:\r\nimage: 'bitnami/zookeeper:latest'\r\nports:\r\n- '2181:2181'\r\nvolumes:\r\n- 'C:/RandD/KafkaRun/bitnami2/zookeeper_data:/bitnami'\r\nenvironment:\r\n- ALLOW_ANONYMOUS_LOGIN=yes\r\nkafka:\r\nimage: 'bitnami/kafka:latest'\r\nports:\r\n- '9092:9092'\r\nvolumes:\r\n- 'C:/RandD/KafkaRun/bitnami2/kafka_data:/bitnami'\r\nenvironment:\r\n- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181\r\n- KAFKA_BROKER_ID=1\r\n- KAFKA_LOG_RETENTION_HOURS=1\r\n- ALLOW_PLAINTEXT_LISTENER=yes\r\n```\r\n\r\nFrom the host when i check the available topics list it works and shows me the list\r\n\r\nI tried running the following command from windows host to produce \r\n%KAFKA_HOME%\\bin\\windows\\kafka-console-producer.bat --broker-list localhost:9092 --topic audit21\r\nI get the following error:\r\n[2018-08-20 10:50:06,391] ERROR Error when sending message to topic audit21 with key: null, value: 19 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)\r\norg.apache.kafka.common.errors.TimeoutException: Expiring 2 record(s) for audit21-0: 2305 ms has passed since batch creation plus linger time\r\n\r\nI'm not sure what i am doing wrong here as i have exposed/mapped the ports in the compose file"},"comment":{"url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka/issues/comments/414380381","html_url":"https://github.com/bitnami/bitnami-docker-kafka/issues/21#issuecomment-414380381","issue_url":"https://api.github.com/repos/bitnami/bitnami-docker-kafka/issues/21","id":414380381,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDM4MDM4MQ==","user":{"login":"codejnki","id":700104,"node_id":"MDQ6VXNlcjcwMDEwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/700104?v=4","gravatar_id":"","url":"https://api.github.com/users/codejnki","html_url":"https://github.com/codejnki","followers_url":"https://api.github.com/users/codejnki/followers","following_url":"https://api.github.com/users/codejnki/following{/other_user}","gists_url":"https://api.github.com/users/codejnki/gists{/gist_id}","starred_url":"https://api.github.com/users/codejnki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codejnki/subscriptions","organizations_url":"https://api.github.com/users/codejnki/orgs","repos_url":"https://api.github.com/users/codejnki/repos","events_url":"https://api.github.com/users/codejnki/events{/privacy}","received_events_url":"https://api.github.com/users/codejnki/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T16:33:27Z","updated_at":"2018-08-20T16:33:27Z","author_association":"NONE","body":"I think it has to do with the way kafka specifically works and how kafka clients learn about the brokers.\r\n\r\nWhen a kafka client connects you give it the --bootstrap.server option, then kafka tells the client about the names of the other machines.  Kafka by default gives out the host name.  If that hostname isn't resolvable outside the docker network, then bad times ensue.   "}}
{"actor":{"display_login":"codejnki"}}