Tengo en mi clúster algunos microservicios que usan NestJs y funcionan perfectamente con elasticsearch en https sin ningún certificado. Ahora creo un microservicio expreso de NodeJs donde me estoy conectando de la misma manera, pero siempre me sale el error
ERROR reloadAllVariables ConnectionError: write EPROTO 140419788733768:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332: at ClientRequest.onError (/app/node_modules/@elastic/elasticsearch/lib/Connection.js:123:16) at ClientRequest.emit (events.js:400:28) at TLSSocket.socketErrorListener (_http_client.js:475:9) at TLSSocket.emit (events.js:400:28) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { meta: { body: null, statusCode: null, headers: null, meta: { context: null, request: [Object], name: 'elasticsearch-js', connection: [Object], attempts: 3, aborted: false } } }usando el código:
import { Client } from '@elastic/elasticsearch'; this.client = new Client({ node: 'https://myhost:9200', auth: { username: 'elastic', password: elasticSecret, }, ssl: { rejectUnauthorized: false }, });¿cualquier sugerencia? No usaré el certificado.
paquetes:
"@elastic/elasticsearch": "^7.16.0", "typescript": "^4.5.2" "express": "^4.17.1",