Init.d missing - CentOS 6.8 - 5.0.0rc1

Running CentOS 6.8, installing 5.0.0 RC1 through yum following the instructions in the docs ( and the init.d scripts are missing for starting/stopping logstash.

Using the following repo config, had to turn gpgcheck off as it appears 5.0.0rc1 is not signed:

name=Elastic repository for 5.x packages

Installed logstash using sudo yum install logstash

Running Transaction
  Installing : 1:logstash-5.0.0~rc1-1.noarch                                1/1
chmod: cannot access `/etc/logrotate.d/logstash': No such file or directory
Using provided startup.options file: /etc/logstash/startup.options
Successfully created system startup script for Logstash

Try to chkconfig it like the docs say:

# chkconfig --add logstash
error reading information on service logstash: No such file or directory

It definitely did not create any file in /etc/init.d:

# ls -la /etc/init.d/logstash
ls: cannot access /etc/init.d/logstash: No such file or directory

It did create a file in /etc/init:

 # cat /etc/init/logstash.conf
description     "logstash"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]

umask 022
#nice 19
#chroot /
#chdir /
#limit core <softlimit> <hardlimit>
#limit cpu <softlimit> <hardlimit>
#limit data <softlimit> <hardlimit>
#limit fsize <softlimit> <hardlimit>
#limit memlock <softlimit> <hardlimit>
#limit msgqueue <softlimit> <hardlimit>
#limit nice <softlimit> <hardlimit>
#limit nofile <softlimit> <hardlimit>
#limit nproc <softlimit> <hardlimit>
#limit rss <softlimit> <hardlimit>
#limit rtprio <softlimit> <hardlimit>
#limit sigpending <softlimit> <hardlimit>
#limit stack <softlimit> <hardlimit>

exec chroot --userspec logstash:logstash / /usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"

This is a fresh OS install and fresh logstash install.

Java version:

 # java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

Previous Logstash package versions did install a generic init.d script. Starting with 5.0, DEB and RPM installations of Logstash install the specific kind of startup script called for by the linux distribution. See

So, for CentOS 6.8, that would be Upstart. Start Logstash with sudo initctl start logstash.

All of these setup changes are documented at, along with the rest of the changes and differences between 5.0 and previous versions.

Well that explains that,

That did the trick, first thing using upstart, everything else on the system is still old sysv

Even running the ps -p 1 shows init on this system so why i assumed there would be an init.d file based on the documentation for installing:

Configure Logstash to automatically start during bootup. If your distribution is using SysV init (check with ps -p 1), then you will need to run:
chkconfig --add logstash

Yeah. I don't know why RedHat did that. As you've discovered, it's a hybrid approach that uses init, but also uses upstart. Logstash detects the upstart, so that's what it's using. It's actually more effective, so there's that.

Yes, I ran into this same thing. It seems off that not all components of the stack have the same start up method.

Thank you for the info, while it does state that in the doc, I kept thinking "it must be wrong, not of the others use that method."

That was my thinking too, it seemed odd with all the unification of the stack with 5.0.0 that one of the components would start different, it still bothers me but i can get over it.

Hi jaaplaya.

I had similar problems as well.
I have not checked the rpm and github for sample code of /etc/init/logstash.

It seems that it is not official recommended startup method, but since I had code for SysV in the past pull request, I coped by rewriting the DAEMON variable of this code.
It will be helpful.

I think that you can solve the problem by modifying the spec file at rpm generation or by modifying
However, I can not judge because there is no official rpm build environment.

[USER@SERVER ~]$ rpm -qp --scripts logstash-5.0.1.rpm 
preinstall scriptlet (using /bin/sh):
# create logstash group
if ! getent group logstash >/dev/null; then
  groupadd -r logstash

# create logstash user
if ! getent passwd logstash >/dev/null; then
  useradd -r -g logstash -d /usr/share/logstash \
    -s /sbin/nologin -c "logstash" logstash
postinstall scriptlet (using /bin/sh):
chown -R logstash:logstash /usr/share/logstash
chown -R logstash /var/log/logstash
chown logstash:logstash /var/lib/logstash
sed -i \
  -e 's|# path.config:|path.config: /etc/logstash/conf.d|' \
  -e 's|# path.logs:|path.logs: /var/log/logstash|' \
  -e 's|#| /var/lib/logstash|' \
/usr/share/logstash/bin/system-install /etc/logstash/startup.options
preuninstall scriptlet (using /bin/sh):
# CentOS/RHEL and SuSE
if [ $1 -eq 0 ]; then
  # Upstart
  if [ -r "/etc/init/logstash.conf" ]; then
    if [ -f "/sbin/stop" ]; then
      /sbin/stop logstash >/dev/null 2>&1 || true
      /sbin/service logstash stop >/dev/null 2>&1 || true
    if [ -f "/etc/init/logstash.conf" ]; then
      rm /etc/init/logstash.conf
  # SYSV
  elif [ -r "/etc/init.d/logstash" ]; then
    /sbin/chkconfig --del logstash
    if [ -f "/etc/init.d/logstash" ]; then
      rm /etc/init.d/logstash
  # systemd
    systemctl stop logstash >/dev/null 2>&1 || true
    if [ -f "/etc/systemd/system/" ]; then
      rm /etc/systemd/system/

    if [ -f "/etc/systemd/system/logstash.service" ]; then
      rm /etc/systemd/system/logstash.service
  if getent passwd logstash >/dev/null ; then
    userdel logstash

  if getent group logstash > /dev/null ; then
    groupdel logstash