[Solved] Run Elasticsearch in network interface using IP@

Hello,

Now I am using ES, it's run on localhost (127.0.0.1);
I want to run it in network interface level (10.80.X.X);

I modified elasticsearch.yml
I tried this

discovery.zen.ping.unicast.hosts: ["10.85.X.X","127.0.0.1","[::1]"]

but it doesn't work !!

and this as well

network.host: 10.85.X.X

but it doesn't work !!

can you help me please !

1 Like

Is this a single node cluster?

yes it's a single node cluster

This is what I have...

network.host: YOUR_IP
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]

I tried that bu I got this Error

[2017-07-03T15:07:31,473][INFO ][o.e.n.Node               ] [ELK-test-1] initializing ...
[2017-07-03T15:07:31,648][INFO ][o.e.e.NodeEnvironment    ] [ELK-test-1] using [1] data paths, mounts [[/ (/dev/mapper/vg_system-Lv_root)]], net usable_space [44.7gb], net total_space [55.5gb], spins? [possibly], types [ext4]
[2017-07-03T15:07:31,649][INFO ][o.e.e.NodeEnvironment    ] [ELK-test-1] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-07-03T15:07:31,674][INFO ][o.e.n.Node               ] [ELK-test-1] node name [ELK-test-1], node ID [IdrZ8HDkQiiUQkgg9ZSR-g]
[2017-07-03T15:07:31,675][INFO ][o.e.n.Node               ] [ELK-test-1] version[5.4.1], pid[39220], build[2cfe0df/2017-05-29T16:05:51.443Z], OS[Linux/2.6.32-573.7.1.el6.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b11]
[2017-07-03T15:07:31,675][INFO ][o.e.n.Node               ] [ELK-test-1] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+DisableExplicitGC, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/home/elk/Elasticsearch/elasticsearch-5.4.1]
[2017-07-03T15:07:32,667][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [aggs-matrix-stats]
[2017-07-03T15:07:32,667][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [ingest-common]
[2017-07-03T15:07:32,667][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [lang-expression]
[2017-07-03T15:07:32,667][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [lang-groovy]
[2017-07-03T15:07:32,668][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [lang-mustache]
[2017-07-03T15:07:32,668][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [lang-painless]
[2017-07-03T15:07:32,668][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [percolator]
[2017-07-03T15:07:32,668][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [reindex]
[2017-07-03T15:07:32,668][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [transport-netty3]
[2017-07-03T15:07:32,668][INFO ][o.e.p.PluginsService     ] [ELK-test-1] loaded module [transport-netty4]
[2017-07-03T15:07:32,669][INFO ][o.e.p.PluginsService     ] [ELK-test-1] no plugins loaded
[2017-07-03T15:07:34,552][INFO ][o.e.d.DiscoveryModule    ] [ELK-test-1] using discovery type [zen]
[2017-07-03T15:07:35,151][INFO ][o.e.n.Node               ] [ELK-test-1] initialized
[2017-07-03T15:07:35,151][INFO ][o.e.n.Node               ] [ELK-test-1] starting ...
[2017-07-03T15:07:35,351][INFO ][o.e.t.TransportService   ] [ELK-test-1] publish_address {10.85.51.56:9300}, bound_addresses {10.85.51.56:9300}
[2017-07-03T15:07:35,360][INFO ][o.e.b.BootstrapChecks    ] [ELK-test-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [4] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [elk] is too low, increase to at least [2048]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
[2017-07-03T15:07:35,367][INFO ][o.e.n.Node               ] [ELK-test-1] stopping ...
[2017-07-03T15:07:35,400][INFO ][o.e.n.Node               ] [ELK-test-1] stopped
[2017-07-03T15:07:35,401][INFO ][o.e.n.Node               ] [ELK-test-1] closing ...
[2017-07-03T15:07:35,412][INFO ][o.e.n.Node               ] [ELK-test-1] closed

Can you post your elasticsearch.yml?

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: elasticsearch-test-1
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: "ELK-test-1"
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
##
# Set a custom port for HTTP:
#
http.port: 9200
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
network.host: 10.85.X.X #my IP@
#discovery.zen.minimum_master_nodes: 1 
# For more information, consult the network module documentation.
#
# --------------------------------- 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 master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

Please read https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html

My config has...

#The "elasticsearch" user will need write permission to these paths
path.data: /data
path.logs: /logs/elasticsearch

node.master: true
node.data: true

https://www.elastic.co/guide/en/elasticsearch/reference/5.4/bootstrap-checks.html
https://www.elastic.co/guide/en/elasticsearch/reference/5.4/important-settings.html

I found the solution, I set the following in elasticsearch.yml

network.host: 127.0.0.1
http.host: 0.0.0.0

I can access ES with an IP from browser.

thank you so much @dadoonet @stefan2017

11 Likes

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