我有一个运行Ubuntu 12.04的VM,并且正在尝试安装ElasticSearch。我本着最好的“艰苦学习X”的精神遵循了这个要旨,并且一切都安装正确- 软件包已下载,解压缩,复制到正确的位置等。
当我运行它时,问题就来了-通过调用:
$ /usr/local/share/elasticsearch/bin/elasticsearch
或使用服务包装器($ rselasticsearch console)
$ rselasticsearch console
输出记录到wrapper.log并包含在下面。我认为我可能遇到JAVA home / classpath问题,但不确定。
wrapper.log
非常感谢任何帮助!
Running ElasticSearch... wrapper | Unable to write to the configured log directory: /usr/local/share/elasticsearch/logs (No such file or directory) wrapper | The directory does not exist. wrapper | Unable to write to the configured log file: /usr/local/share/elasticsearch/logs/service.log (No such file or directory) wrapper | Falling back to the default file in the current working directory: wrapper.log wrapper | --> Wrapper Started as Console wrapper | Java Service Wrapper Community Edition 32-bit 3.5.14 wrapper | Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved. wrapper | http://wrapper.tanukisoftware.com wrapper | wrapper | Launching a JVM... jvm 1 | WrapperManager: Initializing... jvm 1 | WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticSearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticSearchF jvm 1 | jvm 1 | WrapperSimpleApp Usage: jvm 1 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class{/app_method}} [app_arguments] jvm 1 | jvm 1 | Where: jvm 1 | app_class: The fully qualified class name of the application to run. jvm 1 | app_arguments: The arguments that would normally be passed to the jvm 1 | application. wrapper | JVM exited while loading the application. ... wrapper | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up. wrapper | There may be a configuration problem: please check the logs. wrapper | <-- Wrapper Stopped
更新资料
鉴于我们现在已经到了2016年,在Ubuntu上运行ES的最简单方法是使用Docker。docker run elasticsearch将下载最新版本并在前台运行它,显然您可以将其作为守护程序运行,或运行特定版本(例如elasticsearch:1.7.2)并设置端口等。
docker run elasticsearch
elasticsearch:1.7.2
警告任何尝试我以前做过的事情的人-Gist中指定的URL是源版本,而不是编译版本,因此没有* .class文件。
您可以按原样使用Gist,但可以使用ElasticSearch网站上的最新下载URL代替当前的github URL,例如:
.... wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz -O elasticsearch.tar.gz tar -xf elasticsearch.tar.gz rm elasticsearch.tar.gz sudo mv elasticsearch-* elasticsearch sudo mv elasticsearch /usr/local/share ...
**这是截至2014年5月20日的最新版本。要获取更多更新的版本,请访问此页面,右键单击TAR链接(在“下载”部分下),复制该链接并在第一行中替换wget参数。