How to run source builded elasticsearch?


#1

i checkout out elasticsearch sources with version v2.4.6, then compile sources using command:

mvn clean install -Dcheckstyle.skip=true -DskipTests

then i execute ./bin/elasticsearch, but failed, follow is the error infomation:

@MacBook-Pro-2:~/Documents/idea_java/elasticsearch/distribution/tar/target/bin$ ./elasticsearch
Exception in thread "main" ElasticsearchException[Failed to load logging configuration]; nested: NoSuchFileException[/Users/yangshengbing/Documents/idea_java/elasticsearch/distribution/tar/target/config];
Likely root cause: java.nio.file.NoSuchFileException: /Users/yangshengbing/Documents/idea_java/elasticsearch/distribution/tar/target/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 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:45)
Refer to the log for complete error details.


(David Pilato) #2

Once you have the package version like the tar, you need to "install" it, ie untar the file in another dir, then launch.

May I ask why you'd like to compile an old version which will not change in the future?


#3

after version 5.X, elasticsearch uses gradle as the build managemeng tool. i checked out version 6.0.0 and version v6.2.4, both build failed because can not download some dependencies. i did not ever use gradle, but i am familier with maven, and v2.4.6 build success.

yes, i execute the ./bin/elasticsearch start program is undown untared dir . according the error infomation, it seems like that eslapsed config dir and config files?


(David Pilato) #4

But why not just downloading the version from elastic.co website?


(system) #5

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