How to access elastic search in local network - windows 10 elastic search 5.0

I am trying to make the elasticsearch accessible to all the devices connected to my LAN. The system on which elastic search is installed get IP address randomly (e.g. - 192.168.1.10, 192.168.1.11 and so on ..)

Elasticsearch version: 5.0
OS - Windoes 10
Installed through MSI installed (At that time I did't mentioned network host)

Searched on web, tried may solutions but nothing worked, sharing some links I followed:


Please help and guide.

In the elasticsearch.yml configuration file, you could bind both the HTTP and the transport protocols to any site-local interfaces by adding this line:

network.host: _site_

The advantage of configuring it like this is that you don't need to know the exact IP address of your server in advance.

If that doesn't work you could also try:

network.host: _global_

The MSI installer places the elasticsearch.yml file in C:\ProgramData\Elastic\Elasticsearch\config by default.

2 Likes

Thanks a lot for reply.

I tried both but still not able to access elasticsearch through ip (e.g. 192.168.13.2:9200).

Here I am sharing other configurations in the yml file .. may be there are some dependencies:

bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: MyPC
path.data: C:\ProgramData\Elastic\Elasticsearch\data
path.logs: C:\ProgramData\Elastic\Elasticsearch\logs
transport.tcp.port: 9300

I appended network.host after transport.tcp.port.

Please guide me .. whats wrong with the settings ...

Can you post the log of Elasticsearch?

Are you sure there is no firewall interfering? Try disabling the Windows firewall.

I also tried this:
Turned off windows firewall.
Restarted the PC
Tried to access 192......:9200

Still not able to access.

I looked at "C:\ProgramData\Elastic\Elasticsearch\logs" and found that log was last updated 4 days back ..but I am regularly using the elasticsearch on local .. is that mean my changes are not applying of elasticsearch?.. here I am sharing the log..

[2017-11-02T09:08:34,045][INFO ][o.e.n.Node ] [MyPC] initializing ...
[2017-11-02T09:08:34,201][INFO ][o.e.e.NodeEnvironment ] [MyPC] using [1] data paths, mounts [[(C:)]], net usable_space [55.3gb], net total_space [136.3gb], spins? [unknown], types [NTFS]
[2017-11-02T09:08:34,201][INFO ][o.e.e.NodeEnvironment ] [MyPC] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-11-02T09:08:35,139][INFO ][o.e.n.Node ] [MyPC] node name [MyPC], node ID [BjBnU-I6SLix38dToNVvdQ]
[2017-11-02T09:08:35,139][INFO ][o.e.n.Node ] [MyPC] version[5.5.0], pid[4984], build[260387d/2017-06-30T23:16:05.735Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_144/25.144-b01]
[2017-11-02T09:08:35,139][INFO ][o.e.n.Node ] [MyPC] JVM arguments [-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, -Xmx2048m, -Xms2048m, -Delasticsearch, -Des.path.home=E:\Work\Elastic]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [aggs-matrix-stats]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [ingest-common]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [lang-expression]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [lang-groovy]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [lang-mustache]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [lang-painless]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [parent-join]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [percolator]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [reindex]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [transport-netty3]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] loaded module [transport-netty4]
[2017-11-02T09:08:38,170][INFO ][o.e.p.PluginsService ] [MyPC] no plugins loaded
[2017-11-02T09:08:40,858][INFO ][o.e.d.DiscoveryModule ] [MyPC] using discovery type [zen]
[2017-11-02T09:08:41,780][INFO ][o.e.n.Node ] [MyPC] initialized
[2017-11-02T09:08:41,780][INFO ][o.e.n.Node ] [MyPC] starting ...
[2017-11-02T09:08:42,263][INFO ][o.e.t.TransportService ] [MyPC] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2017-11-02T09:08:45,404][INFO ][o.e.c.s.ClusterService ] [MyPC] new_master {MyPC}{BjBnU-I6SLix38dToNVvdQ}{fNQ3ABySSj6QvG-PFPswvQ}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-11-02T09:08:46,185][INFO ][o.e.g.GatewayService ] [MyPC] recovered [10] indices into cluster_state
[2017-11-02T09:08:46,544][INFO ][o.e.h.n.Netty4HttpServerTransport] [MyPC] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2017-11-02T09:08:46,544][INFO ][o.e.n.Node ] [MyPC] started
[2017-11-02T09:08:49,013][INFO ][o.e.c.r.a.AllocationService] [MyPC] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[departments][2], [departments][4]] ...]).
[2017-11-02T13:07:17,398][INFO ][o.e.n.Node ] [MyPC] stopping ...
[2017-11-02T13:07:17,798][INFO ][o.e.n.Node ] [MyPC] stopped
[2017-11-02T13:07:17,799][INFO ][o.e.n.Node ] [MyPC] closing ...
[2017-11-02T13:07:17,869][INFO ][o.e.n.Node ] [MyPC] closed

Are you sure Elasticsearch was actually able to start? Can you access ES on http://localhost:9200 ? I would check the Windows event log to see if there's a problem with the service actually starting.

yes I am able to access http://localhost:9200 .. as you asked I went through windows log and there is no log not even info log related to elasticsearch .. I checked the services and status for elasticsearch is running .. can you please confirm I am looking at the right place for logs "C:\ProgramData\Elastic\Elasticsearch\logs"

Can you please post the full elasticsearch.yml configuration file (including the network.host setting)?

Here is the configuration:

bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: MyPC
path.data: C:\ProgramData\Elastic\Elasticsearch\data
path.logs: C:\ProgramData\Elastic\Elasticsearch\logs
transport.tcp.port: 9300
network.host: _site_

Did you by any chance change the ES_CONFIG environment variable? If this is set to something else than the default C:\ProgramData\Elastic\Elasticsearch\config Elasticsearch may be reading a different configuration file than the one you have been editing.

In fact, looking at the log, it seems that your Elasticsearch home is set to E:\Work\Elastic. You may find a config directory in there with the actual elasticsearch.yml configuration file that is being used by Elasticsearch.

Oh .. I see .. I will check in that folder and will update you ASAP.

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