I created 3 zookeeper instances and configured like below in all 3 and respective id in myid file:
server.1=localhost:2888:3888 server.2=localhost:2881:3881 s