WARN [Controller id=0, targetBrokerId=0] Connection to node 0 (:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) code example
Example: Broker may not be available. (org.apache.kafka.clients.NetworkClient)
For standalone servers, change line from server.properties
listeners=PLAINTEXT://myhostname:9092
to
listeners=PLAINTEXT://localhost:9092