Elasticsearch WARNING: Unable to revive connection" at custom kibana plugin

hi all,
writing custom plugin and see this error "Elasticsearch WARNING: 2019-04-22T15:18:41Z
Unable to revive connection: http://localhost:9200/"
My elasticsearch.hosts: ["http://my_ip_address:9200"] and curl access is ok
my code is simple:

const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://my_ip_address:9200' })

server.route({
	path: '/api/restable/',
	method: 'GET',
	async handler(req, h) {
		  client.search({
			index: 'kibana_sample_data_logs',
			body: {
				query: {
					match: {
						"clientip": '9.92.255.88'
					}
				}
			}
		})
	}
});

@spalger can we please get some help?

Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.