Commit graph

102 commits

Author SHA1 Message Date
Pere Urbon-Bayes
5c83e41211 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
1ec6406ccd spacing
Fixes #4732
2016-03-11 20:28:59 +00:00
Will Bradley
cd936e8d21 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
96a5457c58 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
953ae230a5 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
950cc34e71 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:32:16 +00:00
Suyog Rao
5f36269d1f 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
7f944329ca 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
Aaron Mildenstein
e60f4d67bd Rotate .err and .stdout files too
As suggested in #1574, rotate the logstash.err and logstash.stdout
files also.

Fixes #4136
2015-11-04 17:29:02 +00:00
Aaron Mildenstein
65a5996187 Fix logrotate file perms for Debian systems
In some cases it seems that the file permissions for the logrotate
configuration file are not set properly. This should address those
cases.

Fixes #4136
2015-11-04 17:29:02 +00:00
Aaron Mildenstein
eec80944f9 Fix logrotate permissions after install
In some cases it seems that the file permissions for the logrotate
configuration file are not set properly.  This should address those
cases.

fixes #3490

Fixes #4135
2015-11-04 17:28:33 +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
Jordan Sissel
17e5f27ed9 Remove pkg/build.sh as it was old and unused.
Fixes #1735

Fixes #3345
2015-05-29 20:08:03 +00:00
Aaron Mildenstein
b26f2fc55e Fix permissions after install
/etc/logstash was getting 775 perms in the debian package.

This manually sets 755 to /etc/logstash

fixes #3305

Fixes #3331
2015-05-27 21:10:42 +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
Aaron Mildenstein
3986158bac First pass at cleaning out logstash web
All internal references, flags, kibana, vendor, everything must go!

If it referenced kibana or logstash-web, it is deprecated, and removed!

Operators are standing by...

Fixes #2661
2015-02-20 22:53:18 +00:00
Zhanpeng Chen
40665f02d6 fix nologin path
Fixes #2283
2015-01-05 22:55:02 +00:00
Jordan Sissel
b7c71cd9f4 Merge pull request #1287 from alappe/remove_parameter
Remove the log parameter as web doesn't allow it
2014-08-22 16:06:21 -07:00
Victor Garcia
6b20d179aa Adding delaycompress to logrotate
To avoid issues like:

/etc/cron.daily/logrotate:
gzip: stdin: file size changed while zipping

This change is harmless and will prevent errors like this one
2014-08-01 17:39:13 +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
Andreas Lappe
99627d42f3 Remove the log parameter as web doesn't allow it 2014-04-18 18:44:12 +02: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
Jordan Sissel
618a0e70a0 Send stdout/stderr to the log file configured.
This should help catch any weird crashes that occur before logstash's
logger takes over.
2014-04-09 16:34:45 +02:00
Jan Gaedicke
b91bf22fc7 fixes https://logstash.jira.com/browse/LOGSTASH-2040
stderror still open after calling /etc/init.d/logstash start
You should redirect stderror AND stdout of logstash to /dev/null, so all outputs are closed cleanly and automation tools reading the output of the init-script can quit cleanly.
2014-04-01 20:46:14 +02:00
Jan Gaedicke
942d3550a3 starting a already running service should return exit code 0
according to the Linux Standard Base Core Specification this shouldn't be 99 but 0
see http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
2014-04-01 20:46:14 +02:00
James Turnbull
53285b8862 Fixed RPM license linting error 2014-03-23 01:39:59 -04:00
Jordan Sissel
76aaf0cada Dont need 'build time' in the iteration 2014-03-19 21:00:52 +00:00
Faye Salwin
981f0b9073 Fix for the awk version in debian 7.3 (by not using awk) 2014-02-25 16:52:04 -08:00
Faye Salwin
69d5fb3583 add recommended options to fpm for centos, which should negate the need to set executable 2014-02-24 14:21:01 -08:00
Faye Salwin
3537c6b847 Tarball packages. Homogenized init. Common defaults. 2014-02-24 14:21:01 -08:00
Richard Pijnenburg
0558a8f834 Fixes for Init files
- Remove the START=true check from all sysv style init files.
- Set the java check to a which command
2014-02-13 17:08:39 +01:00
Jordan Sissel
c18afeb7ad Merge pull request #910 from sbagmeijer/master
Update logstash.spec
2014-02-03 16:02:07 -08:00
Pieter Lexis
3d2f303e22 Use Java 7 on debian if it's available 2014-02-01 13:40:29 +01:00
Jordan Sissel
b5509295c4 Depend on java6 at minimum. 2014-01-31 15:44:58 -08:00
Jordan Sissel
c60f2e49cd Ubuntu/Debian should depend on 'java-runtime-headless'
This fixes #893. The previous dependency "default-jre-headless" is just
a metapackage pointing at openjre6, but "java6-runtime-headless" is a
'Provides' entry that openjdk packages seem to provide for java versions
6 and 7. This should ensure we are correctly requesting *any* java 6+
implementation instead of requiring a specific java package.
2014-01-31 10:26:12 -08:00
Adam Peck
b0c36843cb Use instead of pgrep to get PID 2014-01-20 13:02:09 -07:00
Jordan Sissel
add4c98011 Add license/vendor info to rpms as well 2014-01-20 10:21:23 -08:00
Jordan Sissel
af332f2bd5 Add vendor and license data to the packages 2014-01-20 10:18:53 -08:00
Sjir Bagmeijer
3a4907a37a Update logstash.spec
Updated to version 1.3.2 and also added support for the ARM version of Fedora.
2014-01-04 11:58:44 +01:00
Richard Pijnenburg
84441699c5 Fix deb package name.
Replace + sign with - sign
2013-12-27 17:22:01 +01:00