Elasticsearch error

hello, i got some issues in elasticsearch.
when i curl -xget 'http://localhost:9200/_cluster/health?pretty=true'
i got error:

curl: (7) Failed to connect to localhost port 9200: Connection refused

then i check my elasticsearch’s status:

root@stagging-graylog:~$ sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendoem/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-03-20 10:32:10 WIB; 53min a
     Docs: http://www.elastic.co
  Process: 9365 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID_DIR}/elasticsearch.pid -Des.default.path.home=${ES_HOME} -Des.default.pault.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
  Process: 9362 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 9365 (code=exited, status=1/FAILURE)

Mar 20 10:32:10 stagging-graylog elasticsearch[9365]: 

Mar 20 10:32:10 stagging-graylog elasticsearch[9365]: #
Mar 20 10:32:10 stagging-graylog elasticsearch[9365]: # ------------------------
Mar 20 10:32:10 stagging-graylog elasticsearch[9365]: #
Mar 20 10:32:10 stagging-graylog elasticsearch[9365]: # Block initial recovery a
Mar 20 10:32:10 stagging-graylog systemd[1]: elasticsearch.service: Main process[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE

Mar 20 10:32:10 stagging-graylogsystemd[1]: elasticsearch.service: Unit entered[1]: elasticsearch.service: Unit entered failed state.

Mar 20 10:32:10 stagging-graylog systemd[1]: elasticsearch.service: Failed with[1]: elasticsearch.service: Failed with result 'exit-code'.

here the logs:

[2018-03-20 10:15:45,543][INFO ][node                     ] [Schemer] version[2.4.6], pid[8225], build[5376dca/2017-07-18T12:17:44Z]
[2018-03-20 10:15:45,546][INFO ][node                     ] [Schemer] initializializing ...
[2018-03-20 10:15:45,979][INFO ][plugins                  ] [Schemer] modules [reindex, lang-expression, lang-groovy], plugins [], sites []

[2018-03-20 10:15:46,005][INFO ][env                      ] [Schemer] using [1] data paths, mounts [[//dev/vda1)]], net usable_space [21.5gb], net total_space [28.4gb], spins? [possibly], types [ext4]
[2018-03-20 10:15:46,005][INFO ][env                      ] [Schemer] heap size [1015.6mb], compressed ordinary object pointers [true]
[2018-03-20 10:15:46,017][ERROR][bootstrap                ] Exception

java.lang.Error: java.security.AccessControlException: access denied ("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
        at com.twitter.jsr166e.Striped64.<clinit>(Striped64.java:319)
 at org.elasticsearch.common.metrics.CounterMetric.<init>(CounterMetretric.java:28)
 at org.elasticsearch.common.util.concurrent.EsAbortPolicy.<init>(EsAborPolicy.java:30)
 at org.elasticsearch.common.util.concurrent.EsExecutors.newFixed(EsExectors.java:80)
 at org.elasticsearch.threadpool.ThreadPool.rebuild(ThreadPool.java:510)
 at org.elasticsearch.threadpool.ThreadPool.build(ThreadPool.java:428)
at org.elasticsearch.threadpool.ThreadPool.<init>(ThreadPool.java:234)
        at org.elasticsearch.node.Node.<init>(Node.java:170)
        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:194)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)

Which version of Java are you using?

https://github.com/elastic/elasticsearch/issues/18761

mine is (build 9-internal+0-2016-04-14-195246.buildd.src)

Elasticsearch 2.x and Graylog 2.x don’t work with Java 9. You’ll have to downgrade to Java 8.

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