title: Apache Kafka VirtualBox: Streaming data from VM to Host PC resulting in error connecting to node
body: <p>I recently started using Apache Kafka and was successful sending data from producer to consumer within Windows 10 and my Linux Mint 19.3 (VM) environments. Now I want to stream data from my VM to my Windows 10 environment.</p>
  
  <p>Both environments are able to ping each other.</p>
  
  <p>When I try to run my consumer on Windows 10, I get an "Error connecting to node VM-VirtualBox:9092'" followed by a "java.net.UnknownHostException: VM-VirtualBox". Strangely, Windows 10 is able to SEE the topics listed on the VM environment; and I am able to create and delete topics from Windows. But I just cannot connect.</p>
  
  <p>Could someone point out what I'm doing wrong?</p>
  
  <p>My server.properties include lines:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>broker.id=0
  Kafka Broker Advanced Configuration
  Snippet (Safety Valve)
  ############################# Socket Server Settings #############################
  # The address the socket server listens on. It will get the value returned from
  # java.net.InetAddress.getCanonicalHostName() if not configured.
  # FORMAT:
  # listeners = listener_name://host_name:port
  # EXAMPLE:
  # listeners = PLAINTEXT://your.host.name:9092
  #port=9092
  #advertised.host.name=localhost
  listeners=PLAINTEXT://0.0.0.0:9092
  advertised.listeners = PLAINTEXT://VM-VirtualBox:9092
  #advertised.listeners = PLAINTEXT://Windows10-7950:9092
  domain:9092</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've also posted this on Reddit: <a href="https://www.reddit.com/r/apachekafka/comments/emqbms/virtualbox_streaming_data_from_vm_to_host_pc/" rel="nofollow noreferrer">https://www.reddit.com/r/apachekafka/comments/emqbms/virtualbox_streaming_data_from_vm_to_host_pc/</a></p>