Connect to elastic Search from public ip

Hi,
I installed ES-5.0.0 and java 8 on centos 6.7 server.
I did changed network.host : ..***.*** elasticsearch.yml file but I can't connect ES.
How can I connect to elastic Search from public ip?

Exactly like you did.

But we can not help you if you don't give details such as logs, config file...

Also check if you have any firewall.

ok,

my elasticsearch.yml file network host setting:

elasticserach.yml file:

#network.host: 127.0.0.1
network.host: 95.173.178.186
#
# Set a custom port for HTTP:
#
#http.port: 9200
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 127.0.0.1
network.host: **.***.***.**
#
# Set a custom port for HTTP:
#
#http.port: 9200

I restarted elasticsearch.

log.file:

[2016-11-10T12:26:09,228][WARN ][o.e.b.JNANatives         ] unable to install syscall filter: 
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:361) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.JNANatives.trySeccomp(JNANatives.java:215) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Natives.trySeccomp(Natives.java:99) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:101) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:155) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:112) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:103) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.cli.Command.main(Command.java:62) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:73) [elasticsearch-5.0.0.jar:5.0.0]
[2016-11-10T12:26:09,454][INFO ][o.e.n.Node               ] [] initializing ...
[2016-11-10T12:26:09,667][INFO ][o.e.e.NodeEnvironment    ] [wbMXg4i] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [49.9gb], net total_space [384.6gb], spins? [possibly], types [ext4]

When I start ES It work true :

# service elasticsearch start
Starting elasticsearch:                                    [  OK  ] 

After I try control:

#service elasticsearch status
elasticsearch dead but subsys locked

What is the problem?

Nothing else after this line?

[2016-11-10T12:26:09,667][INFO ][o.e.e.NodeEnvironment    ] [wbMXg4i] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [49.9gb], net total_space [384.6gb], spins? [possibly], types [ext4]

all log:

[2016-11-10T13:56:25,392][WARN ][o.e.b.JNANatives         ] unable to install syscall filter: 
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
	at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:361) ~[elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.JNANatives.trySeccomp(JNANatives.java:215) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Natives.trySeccomp(Natives.java:99) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:101) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:155) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:112) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:103) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.cli.Command.main(Command.java:62) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-5.0.0.jar:5.0.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:73) [elasticsearch-5.0.0.jar:5.0.0]
[2016-11-10T13:56:25,622][INFO ][o.e.n.Node               ] [] initializing ...
[2016-11-10T13:56:25,867][INFO ][o.e.e.NodeEnvironment    ] [wbMXg4i] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [49.8gb], net total_space [384.6gb], spins? [possibly], types [ext4]
[2016-11-10T13:56:25,868][INFO ][o.e.e.NodeEnvironment    ] [wbMXg4i] heap size [1.9gb], compressed ordinary object pointers [true]
[2016-11-10T13:56:25,870][INFO ][o.e.n.Node               ] [wbMXg4i] node name [wbMXg4i] derived from node ID; set [node.name] to override
[2016-11-10T13:56:25,872][INFO ][o.e.n.Node               ] [wbMXg4i] version[5.0.0], pid[14265], build[253032b/2016-10-26T04:37:51.531Z], OS[Linux/2.6.32-573.3.1.el6.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_111/25.111-b15]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [aggs-matrix-stats]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [ingest-common]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [lang-expression]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [lang-groovy]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [lang-mustache]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [lang-painless]
[2016-11-10T13:56:27,419][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [percolator]
[2016-11-10T13:56:27,420][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [reindex]
[2016-11-10T13:56:27,420][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [transport-netty3]
[2016-11-10T13:56:27,420][INFO ][o.e.p.PluginsService     ] [wbMXg4i] loaded module [transport-netty4]
[2016-11-10T13:56:27,421][INFO ][o.e.p.PluginsService     ] [wbMXg4i] no plugins loaded
[2016-11-10T13:56:32,146][INFO ][o.e.n.Node               ] [wbMXg4i] initialized
[2016-11-10T13:56:32,147][INFO ][o.e.n.Node               ] [wbMXg4i] starting ...
[2016-11-10T13:56:32,450][INFO ][o.e.t.TransportService   ] [wbMXg4i] publish_address {95.173.178.186:9300}, bound_addresses {95.173.178.186:9300}
[2016-11-10T13:56:32,458][INFO ][o.e.b.BootstrapCheck     ] [wbMXg4i] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2016-11-10T13:56:32,462][ERROR][o.e.b.Bootstrap          ] [wbMXg4i] node validation exception
bootstrap checks failed
max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
[2016-11-10T13:56:32,558][INFO ][o.e.n.Node               ] [wbMXg4i] stopping ...
[2016-11-10T13:56:32,666][INFO ][o.e.n.Node               ] [wbMXg4i] stopped
[2016-11-10T13:56:32,667][INFO ][o.e.n.Node               ] [wbMXg4i] closing ...
[2016-11-10T13:56:32,688][INFO ][o.e.n.Node               ] [wbMXg4i] closed

Did you see that?

[2016-11-10T13:56:32,462][ERROR][o.e.b.Bootstrap          ] [wbMXg4i] node validation exception
bootstrap checks failed
max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]

I'm sorry but you are asking again and again the same question. Elasticsearch connecition

Is there anything you don't understand in the answers we are giving you?

Yes I know but I'm working on a new server with public ip.
Also I changed elasticsearch.yml but it didn^t work true so I asked again.

Now:
I increased in limit.conf file.
link :

https://www.elastic.co/guide/en/elasticsearch/reference/5.0/_maximum_number_of_threads_check.html

@elasticsearch        soft    nproc           2048

It works true . Thank you.
Best regard.

So before asking you did not read the logs and tried to solve the same issue you have seen and fixed 3 days ago on another server?

Actually I read logs and your response but I didn't uderstand.

Firstly I installed ES-5.0.0 on CENTOS 6.7. (on localhost:9200)
But I could not connect .
After I changed Es-5.0.0 elasticsearch.yml file with ES-2.4.1.
It was solved.
So I didn't try "Maximum number of threads check" setting:

Maximum number of threads check | Elasticsearch Guide [5.0] | Elastic

..

After I tried the same things on the open server this time. (on public host).
But I could not connect again.
After I changed Es-5.0.0 elasticsearch.yml file with ES-2.4.1.
But this time the problem has not been solved.

I asked again you. Because I didn't understand "Maximum number of threads check setting".
I hope you can give more detailed information on this subject. That's all.
Besides i can not explain the subject in english. I am sorry.

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