Open asrar7787 opened 3 years ago
No solution for this problem?
You should launch both ElasticSearch and ElasticHQ under the same network, for example:
docker network create elastic
docker run --name Elastic –net elastic --privileged=true --restart=always \
-p 9200:9200 -p 9300:9300 \
-v ~/apps/docker/elasticsearch/data:/usr/share/elasticsearch/data \
-v ~/apps/docker/elasticsearch/config:/usr/share/elasticsearch/config \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx1024m" \
-d docker.elastic.co/elasticsearch/elasticsearch:7.15.1
docker run -d -p 5000:5000 –net elastic \
-e HQ_DEFAULT_URL='http://elastic:9200' \
-e HQ_ENABLE_SSL=False \
--name elastichq elastichq/elasticsearch-hq
Is there any way to connect to ElasticSearch installed on host as opposed to docker container?
I'm using http://host.docker.internal:9200 and it works like a charm. Link to official documentation
General information
Issue Description
I installed Elasticsearch v7.6.2 with via brew and I am starting the elasticsearch cluster with one node using CLI command instead of using brew's service start command.
I can curl and see the elasticsearch cluster health is OK as below:
curl -X GET http://localhost:9200/_cluster/health\?\=pretty
I cloned ElasticHQ's github repo's master branch and followed the guide here - https://docs.elastichq.org/installation.html#install-elastichq
After staring the ElasticHQ service I can see the main page at http://localhost:5000. But when I refresh the page it just keeps showing
Found 0 clusters
And if I enter the cluster address
http://localhost:9200/
and clickConnect
it shows the following error in browser console:No matter what I am doing I am not able to get the ElasticHQ to connect to Elasticsearch cluster.
Any suggestions/advice would be great help.
Source Code / Logs
Here's my node configs with CORS configs at the bottom:
Here's the
application.log
details: