I met some problem while installing elk on 3 different server on Google cloud Platform.
First, I build 2 servers based on Debian GNU/Linux 9 (stretch),
after installing elasticsearch and kibana respectively,
I can $ curl -X GET http://localhost:9200 and get the result.
{
"name" : "elastic",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "fV_t9HRxTl2vrvZLF3EESA",
"version" : {
"number" : "7.1.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "7a013de",
"build_date" : "2019-05-23T14:04:00.380842Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Then because I want tocurl -X GET http://35.225.4.142:9200 through the internet and get the result like above situation.
So, the config I only modified at elasticsearch.yml as below:
network.host: 0.0.0.0
http.port: 9200
But when run sudo systemctl restart elasticsearch sudo systemctl status elasticsearch
Then get error as below:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-06-06 06:18:04 UTC; 978ms ago
Docs: http://www.elastic.co
Process: 13477 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, stat
us=78)
Main PID: 13477 (code=exited, status=78)
Jun 06 06:17:48 elastic systemd[1]: Started Elasticsearch.
Jun 06 06:17:48 elastic elasticsearch[13477]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0
and will likely be removed in a future release.
Jun 06 06:18:04 elastic systemd[1]: elasticsearch.service: Main process exited, code=exited, status=78/n/a
Jun 06 06:18:04 elastic systemd[1]: elasticsearch.service: Unit entered failed state.
Jun 06 06:18:04 elastic systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Did anybody encounter the same problem and fixed?
Please let me know
Thank you
Elasticsearch failed to start after some changes you made in the configuration. Can you share the output of journalctl -u elasticsearch.service with us ? This will contain necessary information as to what might went wrong. ( Please use </> or (```) to format the log output , you can use the preview panel on the right to see how your post looks like
yclin1822@elastic:~$ journalctl -u elasticsearch.service
-- Logs begin at Thu 2019-06-06 06:37:07 UTC, end at Thu 2019-06-06 06:41:10 UTC. --
Jun 06 06:39:08 elastic systemd[1]: Started Elasticsearch.
Jun 06 06:39:08 elastic elasticsearch[1650]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 a
nd will likely be removed in a future release.
Jun 06 06:40:51 elastic systemd[1]: Stopping Elasticsearch...
Jun 06 06:40:52 elastic systemd[1]: Stopped Elasticsearch.
Jun 06 06:40:52 elastic systemd[1]: Started Elasticsearch.
Jun 06 06:40:52 elastic elasticsearch[1840]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 a
nd will likely be removed in a future release.
Jun 06 06:41:08 elastic systemd[1]: elasticsearch.service: Main process exited, code=exited, status=78/n/a
Jun 06 06:41:08 elastic systemd[1]: elasticsearch.service: Unit entered failed state.
Jun 06 06:41:08 elastic systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Or use markdown style like:
```
CODE
```
This is the icon to use if you are not using markdown format:
There's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.
How about the elasticsearch.log contents ? ( not just 10 lines though, but a bit more and covering an attempt to start elasticsearch with the configuration that fails.)
This log output is with you using network.host: 127.0.0.1 though. We know that elasticsearch starts successfully like this and the reason that curl gives you a connection refused when trying to connect is elasticsearch binds to the localhost (127.0.0.1) and by definition is not accessible from outside the server.
What we need is the logs from when you set network.host: 0.0.0.0 and then elasticsearch fails to start.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.