Commit graph

26 commits

Author SHA1 Message Date
Pere Urbon-Bayes
08fa879826 fix the usage of KILL_ON_STOP_TIMEOUT to stop a LS instance when suffering from backpreasure, also check back to usage of -eq
Fixes #5479
2016-06-10 12:05:51 -04:00
Cheyenne T. Greatorex
ccc8d79089 bug fix, changed == to =
Fixes #5202

Fixes #5203
2016-04-26 15:33:42 -04:00
Cheyenne T. Greatorex
160ef60d69 Fixed force kill variable name, added a default setting for it, and added code to the stop function to handle inability to stop when not forcing
Fixes #4991, #5168
2016-04-22 18:48:36 -07:00
skokhanovskiy
b1ef716a13 add reload support to the init script
Fixes #5088
2016-04-13 17:15:26 +00:00
Pere Urbon-Bayes
d4f2eef15e fix package stop function to use proper portable [ command insted of the bash [[ based one when trying to kill an stale instance
Fixes #4992
2016-04-04 18:10:03 +00:00
Will Bradley
26b70dca1b spacing
Fixes #4732
2016-03-11 20:28:59 +00:00
Will Bradley
141d43372b Handling undefined $KILL_ON_STOP_TIMEOUT
In cases where $KILL_ON_STOP_TIMEOUT is undefined, getting to line 99 will generate the following error:

```
/etc/init.d/logstash: line 99: [: : integer expression expected
```

I'm no shell scripting expert, but from some tinkering I landed upon changing

```
if [ "$KILL_ON_STOP_TIMEOUT" -eq 1 ] ;
```

to

```
if [[ $KILL_ON_STOP_TIMEOUT -eq 1 ]] ;
```

which appears to work for me.

Also, logstash often takes longer than 5 seconds to shut down for me, so adding a few more seconds to the countdown on line 93 might help.

Might fix https://github.com/elastic/logstash/issues/4457

Fixes #4732
2016-03-11 20:28:59 +00:00
Suyog Rao
e9cd1682f9 Fix configtest option in init scripts
No need to export all the JAVA* related environment variables
for configtest. It needs a minimal set of variables to execute
bin/logstash --config-test. This was indirectly causing issues
when used with JMX options in LS_JAVA_OPTS. JMX needs a remote port defined
and configtest was trying to connect to the port twice which caused
restart (#4319) to fail

Fixes #4319

Fixes #4759
2016-03-04 19:04:51 +00:00
Siddhartha Sahu
67c1b8021a Use the new LS_GC_LOG_FILE variable in init scripts
Follow up to pull request #4718

Fixes #4733
2016-02-29 19:40:27 +00:00
Aaron Mildenstein
d3db942b21 Fix order of --configtest arg
It should come before the `-f`, otherwise Logstash might bind a port and
start running, rather than only perform a configtest, then exit.

fixes 4737

Fixes #4738
2016-02-29 17:35:32 +00:00
Suyog Rao
b548bee16f Set LS_HEAP_SIZE correctly to 1g
Previously we had set heap size to 1g in a few places, but not everywhere

Fixes #4550
2016-01-22 17:17:34 +00:00
Suyog Rao
cb4c17b95b init: Remove overwrite of JAVA_OPTS
Fixes #4517

Fixes #4518
2016-01-21 17:34:07 +00:00
Robert Neumayer
a43709e8fb Fix configtest in sysv init script
Replace non-existing log function with echo.
Replace "exit 1" with "return 1" to make quiet function work.

Fixes #4321
2015-12-15 02:32:19 +00:00
ThomasdOtreppe
841b876778 Add configcheck to init and make sure to check config before restarting
Fixes #3645
2015-10-30 19:55:06 +00:00
Jordan Sissel
ed27fe1b68 Use echo instead of trace or emit.
This should fix a test failure on CentOS 6 where 'emit' gives 'command
not found' which, as the last command run in stop(), causes stop() to
always return exit code 127.

Fixes #3614
2015-07-16 02:21:58 +00:00
Aaron Mildenstein
00cf4d906c Manually merge changes to pleaserun
See https://github.com/jordansissel/pleaserun/pull/86

Fixes #3609
2015-07-14 20:26:08 +00:00
CoolAcid
0288697219 Use linux command id to get the list of groups - supports nss and pam
Fixes #1398
2015-07-06 23:44:41 +00:00
CoolAcid
de8bcd2a7c Take into account if there are not extra groups
Fixes #1398
2015-07-06 23:44:41 +00:00
CoolAcid
01cea40a9b Fix for chroot not getting supliemental groups
Fixes #1398
2015-07-06 23:44:41 +00:00
Pere Urbon-Bayes
193765ced2 adapt the lib.sh file to the use case proposed LS_JAVA_OPTS add to defualts while JAVA_OPTS override
updated the packaged to enable JAVA_OPTS to override the defaults

ammended JAVA_OPTS being exported

ammend warning wording

ammend the last commit

fix wording again

Fixes #2942
2015-04-17 13:49:19 +00:00
Pere Urbon-Bayes
cbaadb16f2 make the LS_JAVA_OPTS environment variable available to the client side, so the user is not force to use the default ones and they can rewrite it
remove stale code

cleanup the bash conditions for when a variable is defined or not

make sure LS_JAVA_OPTS override JAVA_OPTS when need

ammend unused var

rollback to previous use case of appending vars to JAVA_OPTS in the case of having LS_JAVA_OPTS

Fixes #2942
2015-04-17 13:49:19 +00:00
Igor Urazov
ac184d3927 Pass correct HOME env into chroot
Without this patch the logstash isn't able to start on Debian 7 when using file input, as both HOME and SINCEDB_DIR aren't set in chroot.
2014-05-22 14:44:12 -04:00
Jordan Sissel
8b21f24d38 Correctly set nice and ulimit -n
Previously, 'nice' was invoked incorrectly, and 'ulimit -n' would often
fail because growing it as a non-privileged user is denied.
2014-05-01 12:21:12 -07:00
Richard Pijnenburg
d76967c78b Add LS_LOG_DIR option
This option allows to set a different directory where the 3 logfiles will be placed.
2014-04-16 11:10:37 +02:00
Richard Pijnenburg
cdde296000 Fix minor bug in init script found after acceptance test 2014-04-15 15:50:31 +02:00
Richard Pijnenburg
c783816f44 Adding new sysv init style scripts based on pleaserun 2014-04-10 22:06:27 +02:00