question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting java.lang.IllegalStateException: handshake failed, mismatched cluster name Exception while running embedded Elasticsearch instance

See original GitHub issue

I have created UAA service, Gateway and OtpService microservice using Jhipster. but when I ran Gateway and Otpservice , I am getting below exception related to Elastic search cluster. I am using embedded Elasticsearch instance. after throwing below exception services getting registered to Eureka server. I am expecting to run services without exception.

2020-04-26 02:25:11.623 WARN 3372 — [_connect]][T#6]] o.e.discovery.zen.UnicastZenPing : [1] failed send ping to {127.0.0.1:9300}{JgxF0kBVR-iIrOf73cnwVg}{127.0.0.1}{127.0.0.1:9300}

java.lang.IllegalStateException: handshake failed, mismatched cluster name [Cluster [internal-test-cluster-name146d2dde-6933-4fc3-abea-4e548dce1c15]] - {127.0.0.1:9300}{JgxF0kBVR-iIrOf73cnwVg}{127.0.0.1}{127.0.0.1:9300} at org.elasticsearch.transport.TransportService.handshake(TransportService.java:404) at org.elasticsearch.transport.TransportService.handshake(TransportService.java:367) at org.elasticsearch.discovery.zen.UnicastZenPing$PingingRound.getOrConnect(UnicastZenPing.java:366) at org.elasticsearch.discovery.zen.UnicastZenPing$3.doRun(UnicastZenPing.java:471) at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:723) at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

2020-04-26 02:25:11.623 WARN 3372 — [_connect]][T#3]] o.e.discovery.zen.UnicastZenPing : [1] failed send ping to {[::1]:9300}{QX-g01bdRo2aIjad08AccQ}{0:0:0:0:0:0:0:1}{[::1]:9300}


Jhipster info


INFO! Using JHipster version installed locally in current project’s node_modules INFO! Executing jhipster:info INFO! Options: from-cli: true Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
gatewayservice@0.0.0 D:\jhipster2\gateway
`-- generator-jhipster@6.2.0

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.tennabo.gatewayservice"
    },
    "jhipsterVersion": "6.2.0",
    "applicationType": "gateway",
    "baseName": "gatewayservice",
    "packageName": "com.tennabo.gatewayservice",
    "packageFolder": "com/tennabo/gatewayservice",
    "serverPort": "8085",
    "authenticationType": "uaa",
    "uaaBaseName": "authservice",
    "cacheProvider": "hazelcast",
    "enableHibernateCache": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "mysql",
    "prodDatabaseType": "mysql",
    "searchEngine": "elasticsearch",
    "messageBroker": false,
    "serviceDiscoveryType": "eureka",
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "skipClient": true,
    "testFrameworks": [
      "cucumber"
    ],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [],
    "enableTranslation": false,
    "blueprints": []
  }
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Environment and Tools

java version “1.8.0_221” Java™ SE Runtime Environment (build 1.8.0_221-b11) Java HotSpot™ 64-Bit Server VM (build 25.221-b11, mixed mode)

git version 2.23.0.windows.1

node: v10.16.0

npm: 6.14.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
pascalgrimaudcommented, May 5, 2020

It’s not the first time someone report a problem with embedded Elasticsearch. Maybe it’s time to switch definitively to the docker-compose Elasticsearch in dev too.

1reaction
mraiblecommented, Apr 26, 2020

I haven’t experienced this issue, but I have experienced problems when running ES embedded. The problem I experienced is ES fails to restart after it’s started once because it thinks the index is corrupted.

If you change your dev ES settings to use the prod settings and start ES in a Docker container, does it solve the problem?

The reason I ask is we might make that the default in JHipster 7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kubernetes [handshake failed, mismatched cluster name]
When setting up Elasticsearch cluster on Kubernetes with 2x data, 2x master and 2x client nodes (each container on sepearete physical node) ...
Read more >
Not able to create a cluster with ES 5.6? - Elasticsearch
First node cluster.name: e-2 path.logs: /opt/es/2/es_logs ... IllegalStateException: handshake failed, mismatched cluster name [Cluster ...
Read more >
Handshake failed for - how to solve related issues - Opster
How to troubleshoot Elasticsearch/OpenSearch log "Handshake failed for" a detailed guide including background on ES concepts: discovery.
Read more >
[Resolved]Impossible to change liferay 7.2 elastic search
When I'm having issues getting the syntax right, I often like to go into the UI, make the changes I want, and then...
Read more >
All configuration options - Quarkus
AWS Lambda Type Default AWS Lambda Common Type Default AWS Lambda Gateway REST API Type Default Agroal ‑ Database connection pool Type Default
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found