Connecting to the elasticsearch via server

Hi,

I am using putty server. I have IP number. I want to connect elasticsearch but it can't connect.
I installed Elasticsearch 2.3.3 and I write service elasticsearch start on command line.

For example:
http://184.89.789.55:9200/ but it can't connect. What can I do?

Check that you set network.host and also check your logs.

put in your elasticsearch.yml file the following line: network.bind_host: 0.0.0.0

It works for me

I did.

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
# network.host: 192.168.0.1
network.host: 0.0.0.0
network.bind_host: 0.0.0.0
#
# 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>

After ,

service elasticsearch start

Result:

WARN No appenders could be found for logger (common).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
                                                           [  OK  ]

It couldn't connect.

It seems that it's not finding any logging configuration.
So my guess here is that elasticsearch is not finding any file in the config dir.
It probably fallbacks to default values???

1st you need to fix this logging/config path issue.

my elasticsearch log file:

[2016-06-03 07:01:17,038][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
[2016-06-03 07:01:17,204][INFO ][node                     ] [Silhouette] version[2.3.3], pid[27271], build[218bdf1/2016-05-17T15:40:04Z]
[2016-06-03 07:01:17,204][INFO ][node                     ] [Silhouette] initializing ...
[2016-06-03 07:01:17,756][INFO ][plugins                  ] [Silhouette] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2016-06-03 07:01:17,793][ERROR][bootstrap                ] Exception
java.lang.IllegalStateException: Failed to created node environment
	at org.elasticsearch.node.Node.<init>(Node.java:167)
	at org.elasticsearch.node.Node.<init>(Node.java:140)
	at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.nio.file.AccessDeniedException: /var/lib/elasticsearch/elasticsearch/nodes/1
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
	at java.nio.file.Files.createDirectory(Files.java:674)
	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
	at java.nio.file.Files.createDirectories(Files.java:767)
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:169)
	at org.elasticsearch.node.Node.<init>(Node.java:165)
	... 5 more

The error message looks obvious to me.

Check your files/dirs access rights. Or owners.

ok. So which files/dirs access for the chown and chmod? Also which indexes?

I don't understand you exactly?

The user who is running elasticsearch apparently needs to write in /var/lib/elasticsearch/elasticsearch/nodes/1. Actually in /var/lib/elasticsearch/

Check it.

I did.

cd /var/lib/elasticsearch
chmod 777 elasticsearch.

But It dosen't work true. When I start ES 2.3.3. , my error is:

error: permission denied on key 'vm.max_map_count'
Starting elasticsearch: log4j:WARN No appenders could be found for logger (common).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Also, When I tried this code:

[root@elasticsearch ~]# service elasticsearch status

Result:

elasticsearch (pid 29231) is running...

However when I tried for example: 187.45.789.56:9200, It dosen't work true.

ERR_CONNECTION_REFUSED

I cahnged network host. It works.

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
# network.host: 192.168.0.1
network.host: 179.56.897.47(it is my hostname)
# 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>

After I connected 179.56.897.47:9200

{
  "name" : "Jude the Entropic Man",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.3.3",
    "build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
    "build_timestamp" : "2016-05-17T15:40:04Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}