Giter VIP home page Giter VIP logo

elasticsearch-servicewrapper's Introduction

DEPRECATED: The service wrapper is deprecated and not maintained. It no longer works with Elasticsearch 2.x. Many of the features have been added to Elastisearch itself, and purpose built deb, rpm packages, as well as windows service, are avaialble.

A service wrapper execution for elasticsearch using Java Service Wrapper.

Installation guide

Important: If you want to use service wrapper with elasticsearch 0.90 (and below), you need to switch to the 0.90 branch of this repository and then follow the installation instructions.

Simply place the service directory under the elasticsearch bin directory and edit the elasticsearch.conf file to point to the correct elasticsearch home path.

Elasticsearch can be run as a service using the elasticsearch script located under bin/service location. The script accepts a single parameter with the following values:

Parameter Description
console Run the elasticsearch in the foreground.
start Run elasticsearch in the background.
stop Stops elasticsearch if its running.
install Install elasticsearch to run on system startup (init.d / service).
remove Removes elasticsearch from system startup (init.d / service).

The service uses Java Service Wrapper which is a small native wrapper around the Java virtual machine which also monitors it.

Note, passing JVM level configuration (such as -X parameters) should be set within the elasticsearch.conf file.

The ES_HEAP_SIZE environment variable controls the maximum memory allocation for the JVM (set in megabytes). It defaults to 1024.

Running on 64-bit Windows

This requires a commercial license for Java Service Wrapper. Licenses are bound to a specific machine, so make sure you send the correct host id when ordering the license.

Once you have your license information, paste the extra wrapper.license.* lines into the elasticsearch.conf file. Then download the corresponding windows x86 64 bit build of the JSW.

Copy bin\wrapper.exe to bin\service\exec\elasticsearch-windows-x86-64.exe, and lib\wrapper.dll and lib\wrapper.jar to bin\service\lib in your elasticsearch directory. Also make sure you have a 64-bit JRE installed. The service can then be installed and started as described above.

elasticsearch-servicewrapper's People

Contributors

clintongormley avatar dadoonet avatar devatwork avatar kimchy avatar malcolmsparks avatar spinscale avatar thomasrose avatar yaotti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elasticsearch-servicewrapper's Issues

On a fresh install using console mode, log folder does not get created by wrapper

elk@server /opt/elk/elasticsearch$ tar xzf /opt/elk/downloads/elasticsearch-1.4.1.tar.gz -C .
elk@server /opt/elk/elasticsearch$ unzip elasticsearch-servicewrapper-master.zip -d /tmp/
Archive:  elasticsearch-servicewrapper-master.zip
4943d5a7cc87e4c06a5311c0edac6d8ac96d6025
   creating: /tmp/elasticsearch-servicewrapper-master/
 extracting: /tmp/elasticsearch-servicewrapper-master/.gitignore  
.
.
.
.


elk@server /opt/elk/elasticsearch$ vim /tmp/elasticsearch-servicewrapper-master/service/elasticsearch.conf 
elk@server /opt/elk/elasticsearch$ head -1 /tmp/elasticsearch-servicewrapper-master/service/elasticsearch.conf 
set.default.ES_HOME=/opt/elk/elasticsearch/elasticsearch-1.4.1
elk@server /opt/elk/elasticsearch$ $ cp -r /tmp/elasticsearch-servicewrapper-master/service /opt/elk/elasticsearch/elasticsearch-1.4.1/bin/
elk@server /opt/elk/elasticsearch$ $ cd elasticsearch-1.4.1/bin/service
elk@server /opt/elk/elasticsearch/elasticsearch-1.4.1/bin/service $ ./elasticsearch console
Running Elasticsearch...
wrapper  | Unable to write to the configured log directory: /opt/elk/elasticsearch/elasticsearch-1.4.1/logs (No such file or directory)
wrapper  |   The directory does not exist.
wrapper  | Unable to write to the configured log file: /opt/elk/elasticsearch/elasticsearch-1.4.1/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 64-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    | [2015-01-09 10:31:00,497][INFO ][node                     ] [Shocker] version[1.4.1], pid[7183], build[89d3241/2014-11-26T15:49:29Z]
jvm 1    | [2015-01-09 10:31:00,497][INFO ][node                     ] [Shocker] initializing ...
jvm 1    | [2015-01-09 10:31:00,501][INFO ][plugins                  ] [Shocker] loaded [], sites []
jvm 1    | [2015-01-09 10:31:02,385][INFO ][node                     ] [Shocker] initialized
jvm 1    | [2015-01-09 10:31:02,386][INFO ][node                     ] [Shocker] starting ...
jvm 1    | [2015-01-09 10:31:02,470][INFO ][transport                ] [Shocker] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.0.201:9300]}
jvm 1    | [2015-01-09 10:31:02,489][INFO ][discovery                ] [Shocker] elasticsearch/ho6WPOfZQBepa8_pbt4Lhg
jvm 1    | [2015-01-09 10:31:06,268][INFO ][cluster.service          ] [Shocker] new_master [Shocker][ho6WPOfZQBepa8_pbt4Lhg][w530][inet[/192.168.0.201:9300]], reason: zen-disco-join (elected_as_master)
jvm 1    | [2015-01-09 10:31:06,289][INFO ][http                     ] [Shocker] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.0.201:9200]}
jvm 1    | [2015-01-09 10:31:06,290][INFO ][node                     ] [Shocker] started
jvm 1    | [2015-01-09 10:31:06,312][INFO ][gateway                  ] [Shocker] recovered [0] indices into cluster_state
^Cwrapper  | INT trapped.  Shutting down.
jvm 1    | [2015-01-09 10:31:14,999][INFO ][node                     ] [Shocker] stopping ...
jvm 1    | [2015-01-09 10:31:15,029][INFO ][node                     ] [Shocker] stopped
jvm 1    | [2015-01-09 10:31:15,029][INFO ][node                     ] [Shocker] closing ...
jvm 1    | [2015-01-09 10:31:15,036][INFO ][node                     ] [Shocker] closed
wrapper  | <-- Wrapper Stopped

The folder does get created by elasticsearch process starting after the wrapper.
wrapper.log ends up in $ES_HOME

elk@server /opt/elk/elasticsearch/elasticsearch-1.4.1 $ find . -type f -name wrapper*
./wrapper.log

ElasticSearch failing to start

I have a problem with the es service wrapper.

First it was not working when I tried to install it:

/etc/init.d $ ./elasticsearch install
Unable to locate any of the following binaries:
  /home/user_name/elasticsearch-0.90.2/bin/service/exec/elasticsearch-linux-intel(r)xeon(r)[email protected]
  /home/user_name/elasticsearch-0.90.2/bin/service/exec/elasticsearch-linux-intel(r)xeon(r)[email protected]
  /home/user_name/elasticsearch-0.90.2/bin/service/exec/elasticsearch

It was due to this line.
I had to change it to (btw I use gentoo):

DIST_ARCH=`uname -m 2>/dev/null | $TREXE "[A-Z]" "[a-z]" | $TREXE -d ' '`

And it installed successfully.

But when I try to run it. I get the following:

/etc/init.d $ ./elasticsearch start
Starting ElasticSearch...
Waiting for ElasticSearch......................
WARNING: ElasticSearch may have failed to start.

The service.log shows the following:

~/elasticsearch-0.90.2 $ tail -n0 -f logs/service.log
STATUS | wrapper  | 2013/07/22 11:36:16 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2013/07/22 11:36:16 | Java Service Wrapper Community Edition 64-bit 3.5.14
STATUS | wrapper  | 2013/07/22 11:36:16 |   Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2013/07/22 11:36:16 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2013/07/22 11:36:16 |
WARN   | wrapper  | 2013/07/22 11:36:16 | The value of wrapper.java.command does not appear to be a java binary.
WARN   | wrapper  | 2013/07/22 11:36:16 | The use of scripts is not supported. Trying to continue, but some features may not work correctly..
STATUS | wrapper  | 2013/07/22 11:36:16 | Launching a JVM...
ERROR  | wrapper  | 2013/07/22 11:36:16 | JVM exited while loading the application.
INFO   | jvm 1    | 2013/07/22 11:36:16 | * run-java-tool was invoked directly
INFO   | jvm 1    | 2013/07/22 11:36:16 | * run-java-tool should only be used via symlinks to it
WARN   | wrapper  | 2013/07/22 11:36:20 | The value of wrapper.java.command does not appear to be a java binary.
WARN   | wrapper  | 2013/07/22 11:36:20 | The use of scripts is not supported. Trying to continue, but some features may not work correctly..
STATUS | wrapper  | 2013/07/22 11:36:21 | Launching a JVM...
ERROR  | wrapper  | 2013/07/22 11:36:21 | JVM exited while loading the application.
INFO   | jvm 2    | 2013/07/22 11:36:21 | * run-java-tool was invoked directly
INFO   | jvm 2    | 2013/07/22 11:36:21 | * run-java-tool should only be used via symlinks to it
WARN   | wrapper  | 2013/07/22 11:36:25 | The value of wrapper.java.command does not appear to be a java binary.
WARN   | wrapper  | 2013/07/22 11:36:25 | The use of scripts is not supported. Trying to continue, but some features may not work correctly..
STATUS | wrapper  | 2013/07/22 11:36:25 | Launching a JVM...
ERROR  | wrapper  | 2013/07/22 11:36:25 | JVM exited while loading the application.
INFO   | jvm 3    | 2013/07/22 11:36:25 | * run-java-tool was invoked directly
INFO   | jvm 3    | 2013/07/22 11:36:25 | * run-java-tool should only be used via symlinks to it
WARN   | wrapper  | 2013/07/22 11:36:30 | The value of wrapper.java.command does not appear to be a java binary.
WARN   | wrapper  | 2013/07/22 11:36:30 | The use of scripts is not supported. Trying to continue, but some features may not work correctly..
STATUS | wrapper  | 2013/07/22 11:36:30 | Launching a JVM...
ERROR  | wrapper  | 2013/07/22 11:36:30 | JVM exited while loading the application.
INFO   | jvm 4    | 2013/07/22 11:36:30 | * run-java-tool was invoked directly
INFO   | jvm 4    | 2013/07/22 11:36:30 | * run-java-tool should only be used via symlinks to it
WARN   | wrapper  | 2013/07/22 11:36:34 | The value of wrapper.java.command does not appear to be a java binary.
WARN   | wrapper  | 2013/07/22 11:36:34 | The use of scripts is not supported. Trying to continue, but some features may not work correctly..
STATUS | wrapper  | 2013/07/22 11:36:34 | Launching a JVM...
ERROR  | wrapper  | 2013/07/22 11:36:35 | JVM exited while loading the application.
INFO   | jvm 5    | 2013/07/22 11:36:35 | * run-java-tool was invoked directly
INFO   | jvm 5    | 2013/07/22 11:36:35 | * run-java-tool should only be used via symlinks to it
FATAL  | wrapper  | 2013/07/22 11:36:35 | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
FATAL  | wrapper  | 2013/07/22 11:36:35 |   There may be a configuration problem: please check the logs.
STATUS | wrapper  | 2013/07/22 11:36:35 | <-- Wrapper Stopped

how to enable remote debug mode

how to configure elasticsearch.conf to add remote debug feature, like "-Xdebug -Xrunjdwp:transport=dt_socket,address=9998,server=y,suspend=n"

Exit code issue

I found that when running elasticsearch status as root when RUN_AS_USER was set to a non-root user, the exit code was always zero (regardless of whether the process was running.) This would trip up other utilities that were trying to determine the running status of the service through that command.

Incompatibility with 1.0rc1

Version 1.0rc1 elasticsearch wrapper
same config works on 0.90.x (both 0.90.0 - 0.90.10)

from wrapper.log:

INFO | jvm 3 | 2014/01/29 11:33:39 | WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticSearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticSearchF

to recreate:
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.10.tar.gz
tar -xzvf elasticsearch-0.90.10.tar.gz
ln -s elasticsearch-0.90.10 elasticsearch
git clone https://github.com/elasticsearch/elasticsearch-servicewrapper.git
mv elasticsearch-servicewrapper elasticsearch/bin/service

elasticsearch/bin/service/elasticsearch start

Failed to Start on FreeBSD

Hello everybody, I have an error then I try to start wrapper via service utility under freeBSD 9.0 x64

My steps are:

  1. clone service directory to /opt/elasticsearch/bin/
  2. cd /opt/elasticsearch/bin/service
  3. ee ./elasticsearch.conf
  4. set.default.ES_HOME=/opt/elasticsearch
  5. ./elasticsearch install
  6. cd / (for clean experiment)
  7. service elasticsearch start
    and I have this:
    Starting ElasticSearch...
    Waiting for ElasticSearch........................
    WARNING: ElasticSearch may have failed to start.

but if I make this:
/opt/elasticsearch/bin/service/elasticsearch start
Starting ElasticSearch...
Waiting for ElasticSearch.......
running: PID:1838

everything is fine. But I need working service way, for autostarting in boot time

PS: Sorry for me English...

possible typo in rapper.app.parameter.1

is the "F" in "org.elasticsearch.bootstrap.ElasticSearchF" a typo ? (file service/elasticsearch.conf line 56)
I didn't really follow the class path but I was able to get the service running by removing it.

diff service/elasticsearch.conf service/elasticsearch.conf.new
56c56

< wrapper.app.parameter.1=org.elasticsearch.bootstrap.ElasticSearchF

wrapper.app.parameter.1=org.elasticsearch.bootstrap.ElasticSearch

Unable to start elasticsearch v1.2.2

WrapperSimpleApp Error: Class org.elasticsearch.bootstrap.ElasticsearchF found but could not be initialized: java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/ElasticsearchF : Unsupported major.minor version 51.0

Unable to start elasticsearch 1.0.0.RC2

I can start elasticsearch without using the service wrapper but when I use this wrapper, it is throwing the below errors:

STATUS | wrapper | 2014/02/03 12:18:23 | --> Wrapper Started as Console
STATUS | wrapper | 2014/02/03 12:18:23 | Java Service Wrapper Community Edition 64-bit 3.5.14
STATUS | wrapper | 2014/02/03 12:18:23 | Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2014/02/03 12:18:23 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2014/02/03 12:18:23 |
STATUS | wrapper | 2014/02/03 12:18:23 | Launching a JVM...
INFO | jvm 1 | 2014/02/03 12:18:23 | WrapperManager: Initializing...
INFO | jvm 1 | 2014/02/03 12:18:23 | WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticSearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticSearchF
INFO | jvm 1 | 2014/02/03 12:18:23 |
INFO | jvm 1 | 2014/02/03 12:18:23 | WrapperSimpleApp Usage:
INFO | jvm 1 | 2014/02/03 12:18:23 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class{/app_method}} [app_arguments]
INFO | jvm 1 | 2014/02/03 12:18:23 |
INFO | jvm 1 | 2014/02/03 12:18:23 | Where:
INFO | jvm 1 | 2014/02/03 12:18:23 | app_class: The fully qualified class name of the application to run.
INFO | jvm 1 | 2014/02/03 12:18:23 | app_arguments: The arguments that would normally be passed to the
INFO | jvm 1 | 2014/02/03 12:18:23 | application.
ERROR | wrapper | 2014/02/03 12:18:26 | JVM exited while loading the application.
STATUS | wrapper | 2014/02/03 12:18:28 | INT trapped. Shutting down.
STATUS | wrapper | 2014/02/03 12:18:28 | <-- Wrapper Stopped

Repo is missing 'elasticsearch-windows-x86-64.exe'

Hello,

The repo is missing the 64-bit file for windows in the exec dir. The batch file gives me these errors:

Unable to locate a Wrapper executable using any of the following names:
S:\apache\elasticsearch\elasticsearch-0.16.2\bin\service\\exec\elasticsearch-windows-x86-64.exe
S:\apache\elasticsearch\elasticsearch-0.16.2\bin\service\\exec\elasticsearch.exe
Press any key to continue . . .

Thanks!

Consider Changing Default Start Order From S20 to at least S56

When running ElasticSearch within Amazon EC2 and EBS backed volumes the default start order of S20 is too early and the EBS volumes are not actually mounted yet (S55ebs-mount).

Consider making the S20elasticsearch symlink S56elasticsearch to ensure that all EBS volumes have been correctly mounted prior to starting ElasticSearch.

If ElasticSearch starts prior to the EBS volumes being mounted ES detects that the mount point is / and the wrong device; instead of the proper mount point and device.

Use YAJSW instead of Tanuki?

I would recommend using YAJSW instead of Tanuki because then it would be platform agnostic and only dependent on the JDK you use, therefore no native wrapper required.

For example, here is how I implement it from Windows for a JBoss server:
https://gist.github.com/4366912

Can the wrapper be always released as a branch per ES version?

First of all, thanks for this service wrapper. Can I recommend creating branches per ES version based on compatibility, similar to the way https://github.com/elasticsearch/elasticsearch-cloud-aws does it.

This will allow anyone using your code to have confidence in which ES versions a given servicewrapper branch works.

I am in the process of upgrading from 0.90.2 to 1.3.4 and if I am simply sourcing master as part of my Ansible process then it leaves me exposed to potential breaking changes when you upgrade for another version of ES.

Missing elasticsearch-windows-x86-64.exe

Unable to locate a Wrapper executable using any of the following names:
C:\Development\Database\ElasticSearch\elasticsearch-0.90.0\bin\service\exec\elasticsearch-windows-x86-64.exe
C:\Development\Database\ElasticSearch\elasticsearch-0.90.0\bin\service\exec\elasticsearch.exe

Failed to start ES 2.1.1

as a fresher on ES, I meet the same problem ( lowercase 'ElasticsearchF ', yet ):

download the package, unzip to %ES_Home%/bin
edit elasticsearch.conf:
set.default.ES_HOME=/home/lwj/elasticsearch-2.1.1

cd to %ES_Home%/bin/service/, and run: ./elasticsearch start

[yarn@hpblade04 service]$ ./elasticsearch start
Starting Elasticsearch...
Waiting for Elasticsearch...............................
WARNING: Elasticsearch may have failed to start

Then I found these message in /home/lwj/elasticsearch-2.1.1/logs/service.log :
STATUS | wrapper | 2016/01/25 17:34:56 | Launching a JVM...
INFO | jvm 1 | 2016/01/25 17:34:56 | WrapperManager: Initializing...
INFO | jvm 1 | 2016/01/25 17:34:56 | WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticsearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticsearchF

anything needed to run service ?

elasticsearch-windows-x86-64.exe

Would you please add the elasticsearch-windows-x86-64.exe?

Unable to locate a Wrapper executable using any of the following names:
C:\Software\elasticsearch-0.19.4\bin\service\exec\elasticsearch-windows-x86-64.exe
C:\Software\elasticsearch-0.19.4\bin\service\exec\elasticsearch.exe

sh elasticsearch console run error

在最新版本的ES下安装了wrapper,却出现了这样的错误,请问什么原因呢?

WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticSearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticSearchF

image

Cant work with es2.0

When i install service in es2.0,and start,it fail.service.log:WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticsearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticsearchF

Architecture detections fails on Gentoo

Hi, just from a quick glance:

The wrapper tries to detect:

DIST_ARCH=`uname -p 2>/dev/null | tr '[A-Z]' '[a-z]' | tr -d ' '`
if [ "X$DIST_ARCH" = "X" ]
then
    DIST_ARCH="unknown"
fi
if [ "$DIST_ARCH" = "unknown" ]
then
    DIST_ARCH=`uname -m 2>/dev/null | tr '[A-Z]' '[a-z]' | tr -d ' '`
fi

This breaks (at least) on Gentoo Linux in VirtualBox, because:

$ uname -p 2>/dev/null | tr '[A-Z]' '[a-z]' | tr -d ' '
intel(r)core(tm)[email protected]
$ ./elasticsearch start
Unable to locate any of the following binaries:
  /home/vagrant/elasticsearch-0.16.3/bin/service/exec/elasticsearch-linux-intel(r)core(tm)[email protected]
  /home/vagrant/elasticsearch-0.16.3/bin/service/exec/elasticsearch-linux-intel(r)core(tm)[email protected]
  /home/vagrant/elasticsearch-0.16.3/bin/service/exec/elasticsearch

Erasing the uname -p line solves the problem for me, but considering the rather undefined behaviour of uname, I don't expect that to work on all platforms :).

Document that set.default.ES_MIN_MEM / ES_MAX_MEM must be megabytes

Please include a reminder in the service/elasticsearch.conf that ES_MIN_MEM and ES_MAX_MEM must be specified in megabytes. This was unexpected, since the standard java command-line options allow gigabytes (eg, "-Xmx8g -Xms8g").

It was hard to identify the problem, couldn't find any errors logged until I started the service with the "console" option, which output:

...
wrapper | JVM exited while loading the application.
jvm 1 | Error occurred during initialization of VM
jvm 1 | Incompatible minimum and maximum heap sizes specified

Suggested comment in elasticsearch.conf:

set.default.ES_HOME=

This may only be specified in megabytes ("1g" causes failure to start)

set.default.ES_MIN_MEM=512
set.default.ES_MAX_MEM=512

Default logfile setting and "Coding Error" messages

Running the service gives following warnings:

wrapper  | Coding Error.  String contains invalid string token for queued logging: Unable to write to the configured log directory: %s (%s)
wrapper  |   The directory does not exist.
wrapper  | Coding Error.  String contains invalid string token for queued logging: Unable to write to the configured log file: %s (%s)
wrapper  |   Falling back to the default file in the current working directory: %s

That warnings dissappear after replacing

wrapper.logfile=%ES_HOME%/work/logs/service.log

with

wrapper.logfile=%ES_HOME%/logs/service.log

Maybe it should be default setting?

Classloader fails to load some plugin classes when running on Windows

When elasticsearch is running on Windows as a service, some plugins might fail to load classes from the plugin classpath if these classes are loaded on non-bootstrap threads. The problem first was reported by a user of the jetty plugin, but later I was able to reproduce it with some analysis plugins as well. It seems that any plugin that loads a class in the plugin class path on non-bootstrap thread has this problem. To reproduce:

  • Install elasticsearch with ICU plugin on Windows using service wrapper
  • Start elasticsearch as a service (important: starting service wrapper in console mode doesn't seem to reproduce this issue)
  • Create a new index that uses ICU analyzer:
curl -XPUT localhost:9200/test-icu -d '{
    "index" : {
        "analysis" : {
            "analyzer" : {
                "collation" : {
                    "tokenizer" : "keyword",
                    "filter" : ["icu_normalizer"]
                }
            }
        }
    }
}'

On Windows the index creation fails with the following error:

[2012-08-02 10:29:11,377][WARN ][cluster.metadata         ] [Zebediah Killgrave] [test-icu] failed to create
org.elasticsearch.indices.IndexCreationException: [test-icu] failed to create index
    at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:291)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
    at org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/index/analysis/IcuNormalizerTokenFilterFactory
    at org.elasticsearch.index.analysis.IcuAnalysisBinderProcessor.processTokenFilters(IcuAnalysisBinderProcessor.java:33)
    at org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:228)
    at org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
    at org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)
    at org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)
    at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
    at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
    at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
    at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
    at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.index.analysis.IcuNormalizerTokenFilterFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 15 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.