Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix the URI does not specify a valid host name in ClientProtocolException:

When I execute the elastic search java API using jest client, I face the following error

org.apache.http.client.ClientProtocolException: URI does not specify a valid host name:localhost:9200/index/type/_search

I tries various possibilities to fix this error, but I am stuck. How can I fix this?

like image 227
mohan Avatar asked Oct 01 '15 09:10

mohan


1 Answers

You just need to add http:// at the beginning of the URI.

like image 54
Val Avatar answered Nov 16 '22 15:11

Val