Javascrip api request don't work when I change the cluster name

hi,

If I change the cluster name of elasticseach from "elasticsearch" to something else then the javascript API cannotspeak to ES anymore.
Kibana can't too by the way.

I'm not dinfing anything related to the cluster name in the API documentation.

I initialise my client this way :
module.exports = function(conf) { return new elasticsearch.Client({ host: conf.hostName + ':' + conf.port, log: conf.logLevel, apiVersion: conf.apiVersion }); };

this is the conf :

`module.exports = {
hostName: 'localhost',
port: '9200',
logLevel: 'debug',
apiVersion: '2.1'
}

`

Any idea?

Thanks.

Are you still able to send HTTP requests directly to the cluster via e.g. curl?

Well the problem was coming from logstash I had to add : cluster => MyClusterName in the configuration file.
Without doing it the data was send into ES but only worked once I renamed the clustername to elasticsearch.

This is not specified in logstash documentation : https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html

I am confused. What does Logstash got to do with the Kibana and JavaScript API you were having problems with? Which version of Logstash are you using?

I put my clustername to "somethingRandom", and insert data with logstash forwarder and logstash.
Then kibana say that it cannot find anything
When I make a request from the Javascript API my node-js server goes in some sort of infinite loop and the request is being log hundreds of times per second.

If I close everything, change the clustername back to "elasticsearch" then everything is working fine, without inserting anything new the data which I inserted when my cluster was named "somethingRandom" are accessible.

that is why I though that there was no problem from logstash, just that kibana and the JSapi needed the new cluster name.

I'm using logstash-1.5.4

The logstash link you are looking at is for the current version, not Logstash 1.5.4 . For version 2.x of Logstash, the Elasticsearch output plugin changed to use HTTP protocol by default, and the settings and configuration options therefore changed. If you are using the HTTP protocol, you do not need to specify any cluster name, so I do not understand why Kibana would have an issue with a changed cluster name.