Issue with HighLevelRestClient with the host = xyz.com:8080/elasticsearch

If i'm using xyz.com as the host with HighLevelRestClient, it says unable to parse response body .
If I'm using xyz.com:8080/elasticsearch as the host with HighLevelRestClient, it says UnknownHostException.

I'm not sure what i'm missing here.

What is running on port 8080?

it is a kibana host for elasticsearch. I've tried using TransportClient in place of HighLevelRestClient using xyz.com bit it gives the exception : cannot find any configured nodes.
I think the issue here is how to give this entire url host in the request?

Sorry but I don't understand.

Kibana runs by default on 5601.
Elasticsearch runs by default on 9200.

What is supposed to run on 8080 or 80?
What are you trying to do here?

I'll try to explain my issue clearly
I have given a host from the client which says like : xyz.com:8080/elasticsearch

If I only use "xyz.com", it gives me ElasticSearchException "Invalid request payload JSON format" & that is true also because I havn't specified "/elasticsearch
" anywhere.
But if I give the host as complete URL i.e. xyz.com:8080/elasticsearch (which works fine with POSTMAN) , it gives unknown host exception. :frowning_face:

How can I specify the part of the URL i.e. "/elasticsearch" which is after the host in my Java spring code? I
PS. I'm using HighLevelRestClient

Do you have a reverse proxy or something similar which translate localhost:9200 to xyz.com:8080/elasticsearch?

What is the output of:

curl xyz.com:8080/elasticsearch

I don't know how to do curl, but on hitting it on browser, I get the response with tagline "You Know, for Search"

How do you start elasticsearch? What are the logs?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.