Elasticsearch Rest Client - ConnectionClosedException when calling performRequestAsync Elasticsearch Rest Client - ConnectionClosedException when calling performRequestAsync elasticsearch elasticsearch

Elasticsearch Rest Client - ConnectionClosedException when calling performRequestAsync


The problem was the port was wrong. For REST requests the port should be 9200 (and not 9300 like it was configured). More info on elasticsearch ports.

I wish elasticsearch could make a more explicit error log or a hint like "are you connecting with the right port?" for when one tries to access the 9300 port with anything other than the built-in clients.