在Ubuntu 12.04上安装ElasticSearch [英] Installing ElasticSearch on Ubuntu 12.04
问题描述
当我运行它时出现问题 - 通过调用:
$ / usr / local / share / elasticsearch / bin / elasticsearch
或使用服务包装器( $ rselasticsearch console
)
输出记录到 wrapper.log
并包含在下面。我认为我可能会遇到JAVA的家庭/类路径问题,但不确定。
任何帮助最感谢!
运行ElasticSearch ...
wrapper |无法写入配置的日志目录:/ usr / local / share / elasticsearch / logs(没有这样的文件或目录)
wrapper |该目录不存在。
wrapper |无法写入配置的日志文件:/usr/local/share/elasticsearch/logs/service.log(没有这样的文件或目录)
wrapper |回到当前工作目录中的默认文件:wrapper.log
wrapper | - > Wrapper作为控制台开始
wrapper | Java Service Wrapper社区版32位3.5.14
wrapper |版权所有(C)1999-2011 Tanuki Software,Ltd.保留所有权利。
wrapper | http://wrapper.tanukisoftware.com
wrapper |
wrapper |启动JVM ...
jvm 1 | WrapperManager:初始化...
jvm 1 | WrapperSimpleApp错误:无法找到类org.elasticsearch.bootstrap.ElasticSearchF:java.lang.ClassNotFoundException:org.elasticsearch.bootstrap.ElasticSearchF
jvm 1 |
jvm 1 | WrapperSimpleApp用法:
jvm 1 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class {/ app_method}} [app_arguments]
jvm 1 |
jvm 1 |其中:
jvm 1 | app_class:要运行的应用程序的完全限定类名。
jvm 1 | app_arguments:通常会传递给
jvm 1 |的参数应用。
wrapper | JVM在加载应用程序时退出。
...
wrapper |连续发射5次,每次持续时间不到300秒。放弃。
wrapper |可能存在配置问题:请检查日志。
wrapper | < - Wrapper Stopped
更新
鉴于我们现在在2016年,在Ubuntu上运行ES的最简单的方法是使用Docker。 docker run 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
...
**这是最后一节截至20/5/2014。要获得更新版本,请访问此页面,右键单击TAR链接(在下载部分),复制链接并替换第一行中的wget参数。
I have a VM running Ubuntu 12.04, and am trying to install ElasticSearch. I have followed this gist in the best 'learn X the hard way' spirit, and everything installs fine - packages are downloaded, untarred, copied to right place etc.
The problem comes when I run it - either by calling:
$ /usr/local/share/elasticsearch/bin/elasticsearch
or by using the service wrapper ($ rselasticsearch console
)
The output is logged to wrapper.log
and is included below. I think that I may be having JAVA home / classpath issues, but am not sure.
Any help most gratefully received!
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
Update
Given that we are now in 2016, the easiest way to run ES on Ubuntu is to use Docker. docker run elasticsearch
will download the latest and run it in the foreground, and obviously you can run it as a daemon, or run a specific version (e.g. elasticsearch:1.7.2
), and set the ports etc.
Word of warning to anyone trying what I did before - the URL specified in the Gist is to the source version, not the compiled version, hence there being no *.class files.
You can use the Gist as is, but substitute the latest download URL from the ElasticSearch site instead of the github URL that is there at the moment, e.g.:
....
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
...
** This is the lastest version as of 20/5/2014. To get more updated version, visit this page, right click on the TAR link (under Downloads Section), copy the link and replace the wget argument in the first line.
这篇关于在Ubuntu 12.04上安装ElasticSearch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!