user1723583
user1723583

Reputation: 573

jhipster: elasticsearch node not available

I'm using jhipster (version 4.14.3) to generate a web app. The problem is that in production mode, the app cannot connect to the elastic search service which is running well on port 9200. Any help would be appreciated.

application-prod.yml:

data:
    elasticsearch:
        cluster-name: elasticsearch
        cluster-nodes: localhost:9300

elasticsearch.yml:

cluster.name: elasticsearch
path.data: C:\Program Files\elasticsearch-6.2.4\data
path.logs: C:\Program Files\elasticsearch-6.2.4\logs
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300

Exception details:

org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are avail
able: [{#transport#-1}{localhost}{127.0.0.1:9300}]
        at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(T
ransportClientNodesService.java:326)
        at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNo
desService.java:223)
        at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyCl
ient.java:55)
        at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:295)
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56)

Upvotes: 0

Views: 774

Answers (1)

freemanpolys
freemanpolys

Reputation: 1998

It's usually a version problem. Edit the src/main/docker/elasticsearch.yml in your jhipster project folder and install the same version of ElasticSearch server.

Upvotes: 1

Related Questions