Well thanks for the reply. However this is not the answer i was looking for. i have resolved the error by just redirecting my metricbeat data to the elastic search instance of other machine on the same network.
This was done by mentionining the IP of that machine in metricbeat.yml file for the property mentioned below:
output.elasticsearch:
hosts:[ip of other machine:port]