[apache-zookeeper] Zookeeper connection error

I faced the same issue and found it was due to zookeeper cluster nodes needs ports opened to communicate with each other.

server.1=xx.xx.xx.xx:2888:3888

server.2=xx.xx.xx.xx:2888:3888

server.3=xx.xx.xx.xx:2888:3888

once i allowed these ports through aws security group and restarted. All worked fine for me