Getting java.lang.IllegalStateException: handshake failed, mismatched cluster name Exception while running embedded Elasticsearch instance
See original GitHub issueI 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:
- Created 3 years ago
- Comments:16 (9 by maintainers)
Top GitHub Comments
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.
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.