- There are a lot of causes of this situation. In my case, this was because of absence of hostname of kafka server at client side.
- Added hostname of kafka server to the client machine. Suppose that the ip and hostname of kafka server are 22.214.171.124 and “kafkaserver”. I used Mac OSX client so I added this information to /private/etc/hosts file. You can easily find the location of host name management file in your OS.