2016-03-11 3 views
0

J'ai mon ES 2.2 installé sur mon océan numérique droplet.My fichier de configuration ES ressemble ci-dessousConnection Refused ElasticSearch 2.2

# ---------------------------------- Network ----------------------------------- 
# 
# Set the bind address to a specific IP (IPv4 or IPv6): 
# 
network.host: "My Droplet Ip address" 
network.bind_host: 127.0.0.1 
http.publish_port: 9200 
http.port: 9200 
# 
# Set a custom port for HTTP: 
# 
# http.port: 9200 
# 
# For more information, see the documentation at: 
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html> 
# 
# http.cors.enabled: true 
#http.cors.allow-origin: "*" 

# --------------------------------- Discovery ---------------------------------- 
# 
# Pass an initial list of hosts to perform discovery when new node is started: 
# The default list of hosts is ["127.0.0.1", "[::1]"] 
# 
# discovery.zen.ping.unicast.hosts: ["host1", "host2"] 
# 
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes/2 + 1): 
# 
# discovery.zen.minimum_master_nodes: 3 
# 
# For more information, see the documentation at: 
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html> 
# 
# ---------------------------------- Gateway ----------------------------------- 
# 
# Block initial recovery after a full cluster restart until N nodes are started: 
# 
# gateway.recover_after_nodes: 3 
# 
# For more information, see the documentation at: 
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html> 

Maintenant, lorsque je tente de se courber -XGET localhost: 9200 fonctionne correctement mais quand je essayez d'accéder à mes ES de distance "est http://IpAddress:9200 me donne Connection refused aussi pelotonner -XGET IPAddress: 9200 me donne Connection refused

Ce fonctionnait très bien avec 1,4 ES mais avec 2.X il a commencé à me donner des problèmes de connexion

+0

Essayez de supprimer 'network.bind_host' et ne gardez que' network.host' avec votre adresse IP publique. – Val

+0

Cela a fonctionné. Précédemment j'ai fait la même chose mais n'ai pas édité mon port –

Répondre

1

Vous avez deux s olutions:

A. Vous pouvez modifier network.bind_host à votre adresse IP publique

de B. Vous supprimer network.bind_host et ne garder network.host avec votre adresse IP publique. Ce dernier définira à la fois network.bind_host et network.publish_host sur votre adresse IP publique.

Assurez-vous également de supprimer tous les espaces au début de vos lignes.

+0

Maintenant Son fonctionnement mais quand j'ajoute ci-dessous http.cors.enabled: vrai et http.cors.allowed.origin: "*" ES ne redémarre pas 11 mars 00:03:03 ubuntu-1gb-sfo1-01 elasticsearch [9710]: attendu , mais trouvé BlockMappingStart Mar 11 00:03:03 ubuntu-1gb-sfo1-01 elasticsearch [9710]: dans 'lecteur' , ligne 67, colonne 3: Mar 11 00:03:03 ubuntu-1gb-sfo1-01 Recherche élastique [9710]: http.cors.enabled: true Mar 11 00:03:03 ubuntu-1gb-sfo1-01 elasticsearch [9710]:^ –

+0

Vous devriez de préférence mettre à jour votre question avec la trace que vous obtenez, c'est plus facile à lire que dans les commentaires. – Val

+0

Va ouvrir un nouveau sujet –