Commit Graph

103 Commits

Author SHA1 Message Date
Veres Lajos 4059e4ac86 typo fixes - https://github.com/vlajos/misspell_fixer
Closes #8323
2014-11-08 18:55:57 +01:00
Alexander Reelsen faff0f86f0 Plugins: Support usage of ES_JAVA_OPTS in plugin commands
As that environment variable can contain elasticsearch specific configuration
like the path to a configuration, it makes sense to support in both
elasticsearch commands.

Closes #8288
2014-10-30 13:41:08 +01:00
Costin Leau 9e7e37076f Introduce elasticsearch.in.bat (i.e. es.in for Windows)
Break-out common functionality between elasticsearch.bat and service.bat
Relates #8237

(cherry picked from commit 87095e79534bcef97b2b275322c924bd96b34e3b)
2014-10-28 16:33:20 +02:00
Ron DuPlain 1664355f32 Startup: Add ES_HOME to ES_INCLUDE search path
With this change, the elasticsearch script can be linked to another path
without having to set ES_INCLUDE to match the installation path.
Previously, the elasticsearch would find ES_HOME correctly even if linked
but could not find the include script, and finding it would be expected
behavior to me based on its current search path.

Closes #4958
2014-10-22 09:37:09 -07:00
Mahesh Paolini-Subramanya 4eca0499fa Plugin Manager: Properly quote $JAVA in bin/plugin
The all new Oracle Java 7 on OSX has a space in its path
resulting in bin/plugin failing to work

Closes #5765
2014-07-18 14:02:50 +02:00
David Pilato 0a58781d2d Modify command window title (windows)
When launching multiple nodes in MS Windows env, batch command window does not come by default with any title.

This patch add `Elasticsearch VERSION` as a title, where VERSION is the current elasticsearch version.

Same for `plugin.bat` and `service.bat`.

Closes #6336
Closes #6752
2014-07-09 18:15:13 +02:00
Robert Muir a3d5381392 Disable explicit GC by default
We don't rely upon GC to cleanup mappedbytebuffers, we unmap them
explicitly on close in lucene. But the JDK has crazy loops with
explicit GCs in exceptional cases to try to force unmapping.

In general we don't want any of our code or library code calling
this method: so its banned in forbidden-apis as well.
2014-06-27 14:09:44 +02:00
Alexander Reelsen 5fdb35fc54 Startup: Reset locale to en_US.UTF-8 in bin/elasticsearch
Because the NetworkExceptionHelper class relies on the english language in
order to extract information and decide whether a certain exception is a
network problem, we need to set the english locale on startup in order
to prevent other locales to circumvent this check.
2014-05-27 17:31:09 +02:00
Igal 76463ee2b2 [DOCS] Update service.bat
corrected typo, Exiting instead of Existing

Close #5885
2014-05-06 10:28:32 +02:00
Simon Willnauer fa16969360 Cleanup comments and class names s/ElasticSearch/Elasticsearch
* Clean up s/ElasticSearch/Elasticsearch on docs/*
 * Clean up s/ElasticSearch/Elasticsearch on src/* bin/* & pom.xml
 * Clean up s/ElasticSearch/Elasticsearch on NOTICE.txt and README.textile

Closes #4634
2014-01-07 11:21:51 +01:00
Shay Banon 09e0a940b3 use the correct d option in getopt instead of the removed f 2013-12-24 18:21:26 +01:00
Alexander Reelsen ababeaed38 Removed bashism in bin/elasticsearch
Using == in an if-statement works in bash but not in dash (used in ubuntu)
Replacing == with = results in strictl POSIX compliance.
2013-12-24 13:35:59 +01:00
Alexander Reelsen b713cf56ed Allow to provide parameters not only through -D but as long parameters
All getopt long style parameters are now set as es. properties,

elasticsearch --path.data=/some/path

results in -Des.path.data=/some/path

Closes #4393
2013-12-17 10:43:27 +01:00
Alexander Reelsen c30945a3d8 Start elasticsearch in the foreground by default
Instead of using the '-f' parameter to start elasticsearch in the
foreground, this is now the default modus.

In order to start elasticsearch in the background, the '-d' parameter
can be used.

Closes #4392
2013-12-17 10:39:22 +01:00
Diego Ongaro a4814c2f69 Print nice error in bin/elasticsearch if user needs to run maven
Before, people that cloned the repo and expected to be able to run
bin/elasticsearch would be met with an awful shell error: the shell
interprets Maven variables like ${project.build.finalName} as shell
variables yet can't handle names of the form ${x.y}. This commit
explicitly checks to make sure that Maven has done its substitutions
before continuing; if Maven hasn't been run, it gives a helpful error
message.

Fixes #2954.
2013-12-13 10:30:42 +01:00
Alexander Reelsen 7c96627d76 Remove bash specific calls
Make sure that every call in a shell script is supported by /bin/sh and not a bashism, like $()

Closes #4314
2013-12-03 10:23:40 +01:00
Costin Leau 97bdc8f9c2 fix issues with JAVA_OPTS/ES_JAVA_OPTS in service.bat
fix handling of non-empty JAVA_OPTS
remove usage of if/else that can be tripped by parenthesis in the variable
fixes #4127
closes #4086

(cherry picked from commit fb44e9aef76026f2269f1fdc8832a44f8c76ec8f)
2013-11-08 15:35:22 +02:00
Costin Leau 919720ab4f add detection of JRE server (JRE on Windows Server)
fixes #3928

(cherry picked from commit a176ffda6fd97b6efbce6cc4f02a824bf5a10a17)
2013-10-24 15:28:17 +03:00
Costin Leau 64e4883e2e add stop timeout and start mode for windows service.bat
fixes #3938
fixes #3962

(cherry picked from commit f1d6ccc5845ca8f93177c0de3da59a2f37f67818)
2013-10-24 15:27:32 +03:00
Costin Leau 2378e9a93c improve escaping of user paths
remove usage of if and () blocks as they clashed with user paths containing ()
postpone quotation of variables to prevent double escaping ("")
fix #3906

(cherry picked from commit 1cc095ec32a5b623f88c312f497ac5469887be97)
2013-10-14 23:59:52 +03:00
Costin Leau ffe502ddc2 remove unused setting 2013-09-27 00:35:34 +03:00
Costin Leau 971db7dd90 service.bat properly configures mem settings
service.bat converts X(m(s|x)|ss) to MB/KB and uses dedicated arguments to the underlying JVM DLL
empty/unset JAVA_OPTS no longer trips commons daemon
fixes #3785
2013-09-26 23:42:32 +03:00
Costin Leau 9fe99aa6e9 detect JRE (vs JDK) and invalid JAVA_HOME
fixes #3739
2013-09-19 17:32:33 +03:00
Costin Leau 709add033b escape spaces in JAVA_HOME
fix 3725
2013-09-18 17:11:17 +03:00
Costin Leau dcc45070bd Merge pull request #3702 from costin/master
add elasticsearch as a service for Windows platforms
2013-09-17 05:16:29 -07:00
Costin Leau 08bf131899 rework script to handle path with spaces
use service id for pid name
disable filtering on *.exe (caused corruption)
rename exe names and add more options to .bat
start/stop operations are now supported (and expected to be called) by service.bat
add more variables from the env to customize default behavior prior to installing the service
add manager option
fixes regarding batch flow
specify service id in description
minor readability improvement
include .exe only in ZIP archive
rename x64 service id to make it work out of the box
add elasticsearch as a service for Windows platforms
based on Apace Commons Daemon
supports both x64 and x86
2013-09-17 15:01:09 +03:00
Alexander Reelsen e1cbbbaa60 Elasticsearch startup script supports directories containing spaces
Closes #3712
2013-09-17 08:14:23 +02:00
Shay Banon 1c921aebe5 update plugin 2013-09-14 23:31:56 +02:00
Shay Banon d6a3fc09f0 better logging
trace log the low level details on recovery
2013-09-13 22:46:04 +02:00
David Pilato b5c9807ba2 Reverting change in bin/plugin due to d3980ee184f11efcbd2b38421f4946de9198fe20 commit 2013-09-11 16:34:08 +02:00
Shay Banon bbce6e8588 Rare race condition when introducing new fields into a mapping
Dynamic mapping allow to dynamically introduce new fields into an existing mapping. There is a (pretty rare) race condition, where a new field/object being introduced will not be immediately visible for another document that introduces it at the same time.

closes #3667, closes #3544
2013-09-11 07:08:57 -07:00
Alexander Reelsen 2b03bc83a4 Dont write pidfile twice on startup
There is no need to write the pidfile in the bin/elasticsearchshell script
as this happens already in the java code.

Also cleaning up the bin/elasticsearch shell script a bit (no need to return
an error code when exec is called, as this forks and exits the shell script
immediately).

Closes #3529
Closes #1745
2013-08-23 13:20:29 +02:00
Alexander Reelsen 343871fcf5 Allow bin/plugin to set -D JVM parameters
Currently the bin/plugin command did not allow one to set jvm parameters
for startup. Usually this parameters are not needed (no need to configure
heap sizes for such a short running process), but one could not set the
configuration path. And that one is important for plugins in order find
out, where the plugin directory is.

This is especially problematic when elasticsearch is installed as
debian/rpm package, because the configuration file is not placed in the
same directory structure the plugin shell script is put.

This pull request allows to call bin/plugin like this

bin/plugin -Des.default.config=/etc/elasticsearch/elasticsearch.yml -install mobz/elasticsearch-head

As a last small improvement, the PluginManager now outputs the directort
the plugin was installed to in order to avoid confusion.

Closes #3304
2013-08-02 09:19:57 +02:00
Alexander Reelsen c59b0b22e2 Debian/Redhat package improvments
This decision helps people who want to rollout the oracle java without having an openjdk java installed.

* Removed any hard dependency on Java in the debian package
* The debian init script does not check for an existing JAVA_HOME anymore
* Debian and RedHat initscripts now exit if they do not find a java binary (instead of starting elasticsearch in the background and swallowing the error as there is no way to log it in that case)
* Changed the debian init script to rely on the pid file instead of the argument name of process
* Added a useful error message in case no java binary is available (in elasticsearch shell script)

Closes #3304
Closes #3311
2013-07-15 16:03:24 +02:00
Phil Kates 8f5bca43fb Make elasticsearch.in.sh more configurable via env
It's easier to manage a configuration through environment variables than
through a config file if that config file has static values that need to
change each version (such as the ES_CLASSPATH). Trying to keep that in
Chef is tedious whereas just controlling these few settings with
environment variables like most of the other settings in here is simple
and straightforward.
2012-12-19 21:38:40 +01:00
Shay Banon 253d2d1304 add java opts to bat file as well 2012-10-23 23:54:10 +02:00
Scott MacVicar cf7ebfcebf Add $JAVA_OPTS to the plugin manager, useful for those who have proxies
Summary:
Facebook machines have on direct access to the internet. Need to tell java that we should use proxies.

Test Plan:
export JAVA_OPTS="-Dhttp.proxyHost=<ip> -Dhttp.proxyPort=8080"
2012-10-23 23:53:29 +02:00
Shay Banon c834bca43c use java to when no JAVA_HOME defined
remove using "which java", which will give a better error message when java is not available
2012-09-01 11:54:25 +02:00
Shay Banon 8dcee09868 expose the max direct memory allowed in jvm info, and guess better then receive buffer size predictor size based on it 2012-07-31 15:06:21 +02:00
Shay Banon 2b893fe1e5 Use bloom filter when flushing (applying deletes), closes #2058. 2012-06-26 16:45:29 +02:00
Shay Banon d5b84bb81b make sure we run in headless mode
applies mainly to the attachments (tika) plugin
2012-06-14 13:14:03 +02:00
Aurelien Requiem 18f4caaef7 lintian rule : executable-not-elf-or-script in /usr/share/elasticsearch/bin/elasticsearch.in.sh
* added a proper shell on top on the script
2012-06-11 12:29:08 +02:00
David Pilato 2ea77782a1 Parse elasticsearch.in.sh before setting JAVA dir as we could define JAVA_HOME in elasticsearch.in.sh 2012-05-24 12:37:25 +02:00
Shay Banon c56218a41f JDK 7 requires minimum of 256k stack size, update scripts to set it, closes #1892. 2012-04-29 17:17:15 +03:00
Shay Banon 70268a6c41 JDK 7 requires minimum of 160k stack size, update scripts to set it, closes #1892. 2012-04-29 17:13:36 +03:00
Stefan Fussenegger a96391224a fixed always returning 1 if launching in background without pidpath 2012-04-24 15:11:26 +03:00
Fredrik Sundberg bf10ef5b4b Fixes plugin install failure on Windows 7 / JDK 7u3 2012-04-15 14:32:00 +03:00
Shay Banon aa51a8af9c add back writing pid from shell as well as writing it from Java process, for some reason, it caused a strange failure in clinton test harness, we need to chase it down, but for now, lets bring this back 2012-02-26 20:43:30 +02:00
Shay Banon aee0e1dfb7 doc the ES_HEAP_SIZE 2012-02-06 22:13:15 +02:00
Shay Banon 70de95373c JVM Flags: Remove SurvivorRatio and MaxTenuringThreshold since the defaults are good with new JVMs, closes #1672. 2012-02-06 22:11:22 +02:00