The below error can occur when one tries to create a new HA cluster with pcs package. Corosync fails to start with the below description.
The error can be resolved by editing /etc/hosts file and by commenting the first two lines for localhost. At the end I appended a new line that maps localhost with a specific IPv4 IP but this could be unnecessary.
After that when one tries to create and enable the cluster the result would be successful.
pcs cluster setup centos-cluster centos-box1 centos-box2 --start --enable