I have a cluster consisting of twelve nodes (CentOS 7). It had ES 2.3.0 and I wanted to upgrade it to 2.4.0. I followed the rolling upgrades instructions for each node and thought it all went well. But if I did a curl localhost:9200 then I saw it was still using ES 2.3.0 instead of the new one.
So I did a yum remove elasticsearch on all nodes and then installed the latest version of elasticsearch. Updated the elasticsearch.yml files (clustername, nodename, netwerkhost 0.0.0.0, unicast nodes) and did a systemctl daemon-reload and then a service elasticsearch restart on all nodes. Then I tried on the master node a curl localhost:9200 but now it says:
curl: (7) Failed connect to localhost:9200; Connection refused.
I also tried this command which I've found after googling but it did not help: sudo chown -R elasticsearch:elasticsearch /var/lib/elasticsearch/
I have no idea why I can't get the cluster up and running and I have a gut feeling that I did not do logical things but I hope you guys can point me in the right direction.
I'm in /var/log/elasticsearch but I cannot find the log of today when it all happened. There is not one with the current date. The elasticsearch.log does not have any useful info. Any other ideas?
If I try to start ES manually:
Exception in thread "main" ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/usr/share/elasticsearch/config];
Likely root cause: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:225)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.nio.file.Files.walkFileTree(Files.java:2662)
at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:142)
at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:103)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:259)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
I did not properly start elasticsearch. I used this command: sudo service elasticsearch start and I got it up and running. I tried 'systemctl elasticsearch start' the whole time but it did not work. Sorry, pretty lame from myself for not trying the suggested commands.
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.