Commit Graph

86 Commits

Author SHA1 Message Date
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
Shay Banon 43809211d4 bin: elasticsearch script to support ES_HEAP_SIZE to easily set the heap size to a single value (min and max) and ES_HEAP_NEWSIZE to optionally set the new gen, closes #1671. 2012-02-06 22:09:32 +02:00
Shay Banon 78722a51f7 add a comment option to another jvm flag that only applies in 7 2012-01-26 13:52:43 +02:00
Damien Hardy a8af4e962b limit memory for plugin utility 2012-01-04 19:14:46 +02:00
Damien Hardy 5fa8dad4bf No need for plenty of RAM for plugin utility (RAM is often already taken by the elasticsearch service running beside) 2012-01-04 19:14:46 +02:00
Shay Banon 91b60f1d2f Generate pid file even when running in foreground mode, closes #1553. 2011-12-21 05:28:28 +02:00
Shay Banon 682be7c63a fix the script to really work with spaces in the path 2011-12-01 17:04:15 +02:00
Miquel Rodríguez Telep / Michael Rodríguez-Torrent c14db4dd21 Fix escaping of arguments with paths in the bash script 2011-12-01 16:29:19 +02:00
David Pilato 3ee92854bb Use command line parameters 2011-11-20 12:55:20 +02:00
David Pilato 20b92482b5 As recommanded by Shay : Don't modify ES_PARAMS Escape parameters 2011-11-20 12:55:20 +02:00
David Pilato 1bc7d8230b Use parameters given by user to launch ES 2011-11-20 12:55:20 +02:00
Shay Banon 875d552e2c Broken plugin script, closes #1474. 2011-11-16 21:01:41 +02:00
Shay Banon e0acf13a12 don't use CLASSPATH in plugin, and simplify plugin.bat 2011-11-13 19:16:01 +02:00
Shay Banon 49d976fc41 add a commented out option to force the JVM to use IPv4 stack 2011-09-23 00:57:57 +03:00
Shay Banon d00edfb165 better check for defaults on jline, only enable it if not on windows 2011-09-09 10:59:35 +03:00
David Pilato 3fa08968a2 CTRL+C is not working on windows XP and windows 7 2011-09-09 10:29:55 +03:00
Shay Banon 399139505f Don't include CLASSPATH env var in elasticsearch.bat script, closes #1287. 2011-08-30 15:41:04 +03:00
Shay Banon 5845baa3e0 remove the compressed oops option, as its enabled by default on latest jdks 2011-08-03 21:34:51 +03:00