Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

444
Visualizações
Elasticsearch ERROR, The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined

AWS Elasticsearch cluster connects through nodejs.

const AWS = require('aws-sdk')
const elasticsearch = require('elasticsearch')
const awsHttpClient = require('http-aws-es')

let client = elasticsearch.Client({
    host: 'http://---.us-east-1.es.amazonaws.com/',
    connectionClass: awsHttpClient,
    amazonES: {
        region: 'us-east-1',
        credentials: new AWS.Credentials('----', '-----')
    }
});

client.search({
    index: 'orders',
    type: 'text',
    body: {
        query: {
            match: {
                source: 'ETH'
            }
        }
    }
})
.then(res => console.log("Error : ",res));

Elasticsearch ERROR: 2021-08-28T07:40:03Z Error: Request error, retrying POST http://-------.us-east-1.es.amazonaws.com/eth_orders/_search?type=text => The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined at Log.error (C:\Users\genie\node_modules\elasticsearch\src\lib\log.js:239:56) at checkRespForFailure (C:\Users\genie\node_modules\elasticsearch\src\lib\transport.js:298:18) at done (C:\Users\genie\node_modules\http-aws-es\connector.js:48:7) at processTicksAndRejections (internal/process/task_queues.js:95:5)

Elasticsearch WARNING: 2021-08-28T07:40:03Z Unable to revive connection: http://-----.us-east-1.es.amazonaws.com/

Elasticsearch WARNING: 2021-08-28T07:40:03Z No living connections

(node:18256) UnhandledPromiseRejectionWarning: Error: No Living connections at sendReqWithConnection (C:\Users\genie\node_modules\elasticsearch\src\lib\transport.js:266:15) at next (C:\Users\genie\node_modules\elasticsearch\src\lib\connection_pool.js:243:7) at processTicksAndRejections (internal/process/task_queues.js:77:11) (Use node --trace-warnings ... to show where the warning was created) (node:18256) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:18256) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I am getting these errors can anyone help out.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Doctypes are not available in latest Elasticsearch version so probably just remove type: 'text',

client.search({
    index: 'orders',
    body: {
        query: {
            match: {
                source: 'ETH'
            }
        }
    }
})
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda