Curl command : localhost connection refused

You already have asked this in Curl: (7) Failed to connect to xn--localhost-499d port 9200: Connection refused, please keep it to the one thread.