Elasticsearch从1.4.1升级到1.4.4后无法启动服务 [英] Cannot start service after Elasticsearch upgrade from 1.4.1 to 1.4.4

查看:545
本文介绍了Elasticsearch从1.4.1升级到1.4.4后无法启动服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用ELS 1.4.1在Windows 7版本x64上成功安装了Elasticsearch。升级到Kibana 4 RTM后,需要ELS 1.4.4。



为了进行升级,我执行了以下步骤:


  1. 已下载ELS 1.4.4

  2. 停止并删除ELS 1.4.1服务

  3. 已更名将弹出的目录安装到elasticsearch_bak

  4. 将1.4.4的zip提取到弹性搜索目录

  5. 比较/config/elasticsearch.yml和config / logging .yml并应用更改(在底部包含以下附加设置)



 #帮助Chrome正常工作
http.cors.allow-origin:/.*/
http.cors.enabled:true

启动服务后,会在几秒钟内停止。日志如下:



Java版本



(注意这是为了开发目的)

  java版本1.8.0_31
Java(TM)SE运行时环境(build 1.8.0_31-b13)
Java HotSpot(TM)客户端虚拟机(构建25.31-b07,混合模式,共享)



事件日志



 弹性搜索1.4.4(弹性搜索)服务以服务特定的错误终止服务不正确的功能.. 



elasticsearch-stderr-2015.05.20.log



  2015-02-20 08:49:13 Commons Daemon procrun stderr initialized 
线程main中的异常ror:无法初始化org.elasticsearch.Version中的类org.elasticsearch.Version
在org.elasticsearch.bootstrap .Bootstrap.buildErrorMessage(Bootstrap.java:254)
在org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:238)
在org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java :32)
数据区传递t o系统调用太小。

无法启动服务



elasticsearch-stdout-2015.05.20.log



  2015-02-20 08:46:03 Commons Daemon procrun stdout已初始化



elasticsearch.2015-02-20.log



  [2015-02-20 08:49:14] [info](prunsrv.c:1284)[8560]服务开始于1198 ms。 
[2015-02-20 08:49:14] [debug](prunsrv.c:844)[8560] reportServiceStatusE:4,0,0,0
[2015-02-20 08: 49:14] [debug](prunsrv.c:1528)[8560]等待工作完成...
[2015-02-20 08:49:14] [debug](prunsrv.c:1533 )[8560]工人完成。
[2015-02-20 08:49:14] [debug](prunsrv.c:1559)[8560]等待所有线程退出
[2015-02-20 08:49:14 ] [debug](prunsrv.c:844)[8560] reportServiceStatusE:3,0,0,0
[2015-02-20 08:49:14] [debug](prunsrv.c:1563)[ 8560] JVM被破坏。
[2015-02-20 08:49:14] [debug](prunsrv.c:844)[8560] reportServiceStatusE:1,1066,0,1
[2015-02-20 08: 49:14] [info](prunsrv.c:1598)[10064]运行服务完成。
[2015-02-20 08:49:14] [info](prunsrv.c:1764)[10064] Commons Daemon procrun完成
[2015-02-20 08:49:14] [信息](prunsrv.c:1764)[10064] Commons Daemon procrun完成
[2015-02-20 08:49:16] [错误](prunsrv.c:746)[10116]无法启动'elasticsearch 'service
[2015-02-20 08:49:16] [error](prunsrv.c:746)[10116]传递给系统调用的数据区太小了。
[2015-02-20 08:49:16] [info](prunsrv.c:754)[10116]开始服务完成。
[2015-02-20 08:49:16] [错误](prunsrv.c:1755)[10116] Commons Daemon procrun失败,退出值:5(无法启动服务)
[2015 -02-20 08:49:16] [error](prunsrv.c:1755)[10116]传递给系统调用的数据区太小了。

如果我从命令提示符运行弹性搜索,我会收到以下错误:

  c:\elk\elasticsearch\bin> elasticsearch 
线程main中的异常java.lang.NoClassDefFoundError:无法初始化类org.elasticsearch.Version
在org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:254)
在org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:238)
在org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)


解决方案

我有完全相同的问题,这里是我如何修复它。



这是我的设置



我正在使用 Windows Server 2008 R2 Enterprise - 64位版本。一切都适用于Java(JRE)版本 1.8.0_25 。弹性搜索被安装为Windows服务。



在发布之前,我将Java更新到版本 1.8.0_31 并重新启动机器。



以下是我采取的步骤的历史记录



重新启动机器我注意到ElasticSearch服务已停止。尝试启动它后,它再次停止。



以下是我在事件日志中找到的问题:



< blockquote>

Elasticsearch 1.4.1(elasticsearch-service-x64)服务终止服务特定的错误不正确的功能..


这是我在 elasticsearch-service-x64.2015-02-27.log 中的含义:



$ pre> [2015-02-27 14:38:29] [info] [4948] Commons Daemon procrun(1.0.15.0 64位)开始
[2015- 02-27 14:38:29] [info] [4948]运行'elasticsearch-service-x64'服务...
[2015-02-27 14:38:29] [信息] [3048]开始服务...
[2015-02-27 14:38:29] [错误] [3048]无法创建java C:\Program Files\Java\jre1.8.0_25\bin\server \jvm.dll
[2015-02-27 14:38:29] [错误] [3048]系统找不到指定的路径。
[2015-02-27 14:38:29] [错误] [3048] ServiceStart返回1
[2015-02-27 14:38:29] [错误] [3048]系统不能找到指定的路径。
[2015-02-27 14:38:29] [info] [4948]运行服务完成。
[2015-02-27 14:38:29] [info] [4948] Commons Daemon procrun完成

然后我已将 JAVA_HOME 系统变量的值更改为 C:\Program Files\Java\ jre1.8.0_31





问题是:

 线程main中的异常java.lang.NoClassDefFoundError:无法在org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java)初始化类org.elasticsearch.Version 
:254)
在org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:238)
在org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)



修复问题




  1. 我已经完全删除了文件夹 bin config lib 和 c code code code code code code code code code code $ c $ 目录,因为找到了你的索引!


  2. 解压缩相同的文件夹( bin config lib )从 elasticsearch-1.4.4.zip

  3. 在命令提示符(作为管理员)删除已安装的服务的SC DELETE elasticsearch-service-x64

  4. Ran F:\Services\elasticsearch\bin> service.bat install

     安装服务:elasticsearch-service-x64
    使用JAVA_HOME(64位):C:\Program Files\Java \jre1.8.0_31
    服务'elasticsearch-service-x64'已经安装。


  5. 开始服务


然后一切都开始正常工作




I have installed Elasticsearch successfully on Windows 7 version x64, using ELS 1.4.1. After upgrading to Kibana 4 RTM, it required ELS 1.4.4.

To carry out the upgrade, I performed the following steps:

  1. Downloaded ELS 1.4.4
  2. Stopped and removed the ELS 1.4.1 service
  3. Renamed the current install directory to elasticsearch_bak
  4. Extracted the 1.4.4 zip to the elasticsearch directory
  5. Compared the /config/elasticsearch.yml and config/logging.yml and applied the changes (which contains the following additional settings at the bottom)

# Helps Chrome work properly
http.cors.allow-origin: "/.*/"
http.cors.enabled: true

Upon starting the service, it stops within a few seconds. The logs are as follows:

Java Version

(Note this is for development purposes)

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode, sharing)

Event Log

The Elasticsearch 1.4.4 (elasticsearch) service terminated with service-specific error Incorrect function..

elasticsearch-stderr-2015.05.20.log

2015-02-20 08:49:13 Commons Daemon procrun stderr initialized
Exception in thread "main" ror: Could not initialize class org.elasticsearch.Version
    at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:254)
    at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:238)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
The data area passed to a system call is too small.

Failed to start service

elasticsearch-stdout-2015.05.20.log

2015-02-20 08:46:03 Commons Daemon procrun stdout initialized

elasticsearch.2015-02-20.log

[2015-02-20 08:49:14] [info]  ( prunsrv.c:1284) [ 8560] Service started in 1198 ms.
[2015-02-20 08:49:14] [debug] ( prunsrv.c:844 ) [ 8560] reportServiceStatusE: 4, 0, 0, 0
[2015-02-20 08:49:14] [debug] ( prunsrv.c:1528) [ 8560] Waiting for worker to finish...
[2015-02-20 08:49:14] [debug] ( prunsrv.c:1533) [ 8560] Worker finished.
[2015-02-20 08:49:14] [debug] ( prunsrv.c:1559) [ 8560] Waiting for all threads to exit
[2015-02-20 08:49:14] [debug] ( prunsrv.c:844 ) [ 8560] reportServiceStatusE: 3, 0, 0, 0
[2015-02-20 08:49:14] [debug] ( prunsrv.c:1563) [ 8560] JVM destroyed.
[2015-02-20 08:49:14] [debug] ( prunsrv.c:844 ) [ 8560] reportServiceStatusE: 1, 1066, 0, 1
[2015-02-20 08:49:14] [info]  ( prunsrv.c:1598) [10064] Run service finished.
[2015-02-20 08:49:14] [info]  ( prunsrv.c:1764) [10064] Commons Daemon procrun finished
[2015-02-20 08:49:14] [info]  ( prunsrv.c:1764) [10064] Commons Daemon procrun finished
[2015-02-20 08:49:16] [error] ( prunsrv.c:746 ) [10116] Failed to start 'elasticsearch' service
[2015-02-20 08:49:16] [error] ( prunsrv.c:746 ) [10116] The data area passed to a system call is too small.
[2015-02-20 08:49:16] [info]  ( prunsrv.c:754 ) [10116] Start service finished.
[2015-02-20 08:49:16] [error] ( prunsrv.c:1755) [10116] Commons Daemon procrun failed with exit value: 5 (Failed to start service)
[2015-02-20 08:49:16] [error] ( prunsrv.c:1755) [10116] The data area passed to a system call is too small.

If I run elasticsearch from the command prompt, I get this error:

c:\elk\elasticsearch\bin>elasticsearch
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version
        at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:254)
        at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:238)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

解决方案

I had the exact same issue and here is how I've fixed it.

Here is my setup

I am using Windows Server 2008 R2 Enterprise - 64-bit version. Everything worked fine with Java (JRE) version 1.8.0_25. Elastic search was installed as Windows Service.

Exactly before the issue I updated Java to version 1.8.0_31 and restarted the machine.

Here is the history of steps I took

Firstly after restarting the machine I've noticed that ElasticSearch service was stopped. After trying to start it it stopped again.

Here is what I get in my Events Log for the issue:

The Elasticsearch 1.4.1 (elasticsearch-service-x64) service terminated with service-specific error Incorrect function..

Here is what I had in my elasticsearch-service-x64.2015-02-27.log:

[2015-02-27 14:38:29] [info]  [ 4948] Commons Daemon procrun (1.0.15.0 64-bit) started
[2015-02-27 14:38:29] [info]  [ 4948] Running 'elasticsearch-service-x64' Service...
[2015-02-27 14:38:29] [info]  [ 3048] Starting service...
[2015-02-27 14:38:29] [error] [ 3048] Failed creating java C:\Program Files\Java\jre1.8.0_25\bin\server\jvm.dll
[2015-02-27 14:38:29] [error] [ 3048] The system cannot find the path specified.
[2015-02-27 14:38:29] [error] [ 3048] ServiceStart returned 1
[2015-02-27 14:38:29] [error] [ 3048] The system cannot find the path specified.
[2015-02-27 14:38:29] [info]  [ 4948] Run service finished.
[2015-02-27 14:38:29] [info]  [ 4948] Commons Daemon procrun finished

Then I've changed the value of JAVA_HOME system variable to C:\Program Files\Java\jre1.8.0_31

The issue then was:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version
        at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:254)
        at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:238)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

What fixed the problem

  1. I've completely deleted folders bin, config, lib and plugins from the ElasticSearch folder.

    Be sure to not to delete data directory because there are located your indexes!

  2. Unzipped the same folders (bin, config and lib) from elasticsearch-1.4.4.zip.
  3. Ran SC DELETE elasticsearch-service-x64 as administrator in Command Prompt (to delete the installed service)
  4. Ran F:\Services\elasticsearch\bin>service.bat install

    Installing service      :  "elasticsearch-service-x64"
    Using JAVA_HOME (64-bit):  "C:\Program Files\Java\jre1.8.0_31"
    The service 'elasticsearch-service-x64' has been installed.
    

  5. Started the service

And then everything started to work correctly.

这篇关于Elasticsearch从1.4.1升级到1.4.4后无法启动服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆