# Facing issue while starting multiple instance of logstash

**URL:** <https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491>\
**Category:** Logstash\
**Created:** [September 14, 2017, 9:19am UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491 "2017-09-14T09:19:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sukeerthi\_bj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sukeerthi\_bj](https://discuss.elastic.co/u/sukeerthi_bj)\
**Post date:** [September 14, 2017, 9:19am UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/1 "2017-09-14T09:19:49Z")

</div>

Hi,

I created a separate folder for new instance of logstash as mentioned in below link

> [@\[SOLVED\] Multiple Instances for Logstash](https://discuss.elastic.co/t/solved-multiple-instances-for-logstash/65539/2):
>
> There's a terrific way to do this. You should make a duplicate of the /etc/logstash directory somewhere, or at least copy log4j2.properties, logstash.yml, and startup.options to a new directory. You should edit the configuration in logstash.yml and startup.options so that path.data and path.logs are separate from the others, so as not to cause collisions. I use a subdirectory of /var/log/logstash. You need to define where path.config is, which is your path to logstash pipeline configuration…

but getting logstash status as failed

systemctl status logstash-suk.service  
● logstash-suk.service - logstash-suk  
Loaded: loaded (/etc/systemd/system/logstash-suk.service; disabled; vendor preset: disabled)  
Active: failed (Result: start-limit) since Thu 2017-09-14 14:35:18 IST; 14min ago  
Main PID: 11874 (code=exited, status=217/USER)  
[root@bmvt logstash]# cd /etc/systemd/system/

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 14, 2017, 9:38am UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/2 "2017-09-14T09:38:59Z")

</div>

And what's the contents of the unit file for this service?

---

<div class="post-metadata">

**Author:** ![sukeerthi\_bj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sukeerthi\_bj](https://discuss.elastic.co/u/sukeerthi_bj)\
**Post date:** [September 14, 2017, 9:44am UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/3 "2017-09-14T09:44:27Z")

</div>

**## \> ################################################################################**  
**## \> # These settings are ONLY used by $LS\_HOME/bin/system-install to create a custom**  
\*\*## \> # startup script for Logstash. It sh  
ould automat

> **Summary**
>
> This text will be hidden

ically use the init system\*\*  
**## \> # (systemd, upstart, sysv, etc.) that your Linux distribution uses.**  
**## \> #**  
**## \> # After changing anything here, you need to re-run $LS\_HOME/bin/system-install**  
**## \> # as root to push the changes to the init script.**  
**## \> ################################################################################**  
\*\*## \> \*\*  
**## \> # Override Java location**  
**## \> JAVACMD=/usr/bin/java**  
\*\*## \> \*\*  
**## \> # Set a home directory**  
**## \> LS\_HOME=/usr/share/logstash**  
\*\*## \> \*\*  
**## \> # logstash settings directory, the path which contains logstash.yml**  
**## \> LS\_SETTINGS\_DIR=/home/build/sukeerthi/logstash**  
\*\*## \> \*\*  
**## \> # Arguments to pass to logstash**  
**## \> LS\_OPTS="--path.settings ${LS\_SETTINGS\_DIR}"**  
\*\*## \> \*\*  
**## \> # Arguments to pass to java**  
**## \> LS\_JAVA\_OPTS=""**  
\*\*## \> \*\*  
**## \> # pidfiles aren't used the same way for upstart and systemd; this is for sysv users.**  
**## \> LS\_PIDFILE=/var/run/logstash.pid**  
\*\*## \> \*\*  
**## \> # user and group id to be invoked as**  
**## \> LS\_USER=logstash**  
**## \> LS\_GROUP=logstash**  
\*\*## \> \*\*  
**## \> # Enable GC logging by uncommenting the appropriate lines in the GC logging**  
**## \> # section in jvm.options**  
**## \> LS\_GC\_LOG\_FILE=/var/log/logstash/gc.log**  
\*\*## \> \*\*  
**## \> # Open file limit**  
**## \> LS\_OPEN\_FILES=16384**  
\*\*## \> \*\*  
**## \> # Nice level**  
**## \> LS\_NICE=19**  
\*\*## \> \*\*  
**## \> # Change these to have the init script named and described differently**  
**## \> # This is useful when running multiple instances of Logstash on the same**  
**## \> # physical box or vm**  
**## \> SERVICE\_NAME="logstash-suk"**  
**## \> SERVICE\_DESCRIPTION="logstash-suk"**  
\*\*## \> \*\*  
**## \> # If you need to run a command or script before launching Logstash, put it**  
**## \> # between the lines beginning with `read` and `EOM`, and uncomment those lines.**  
**## \> ###**  
**## \> ## read -r -d '' PRESTART \<\< EOM**  
**## \> ## EOM**

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 14, 2017, 10:02am UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/4 "2017-09-14T10:02:32Z")

</div>

Um, what? That's not a systemd unit file.

---

<div class="post-metadata">

**Author:** ![sukeerthi\_bj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sukeerthi\_bj](https://discuss.elastic.co/u/sukeerthi_bj)\
**Post date:** [September 14, 2017, 11:05am UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/5 "2017-09-14T11:05:05Z")

</div>

[Manager]  
#LogLevel=info  
#LogTarget=journal-or-kmsg  
#LogColor=yes  
#LogLocation=no  
#DumpCore=yes  
#CrashShell=no  
#ShowStatus=yes  
#CrashChVT=1  
#CPUAffinity=1 2  
#JoinControllers=cpu,cpuacct net\_cls,net\_prio  
#RuntimeWatchdogSec=0  
#ShutdownWatchdogSec=10min  
#CapabilityBoundingSet=  
#SystemCallArchitectures=  
#TimerSlackNSec=  
#DefaultTimerAccuracySec=1min  
#DefaultStandardOutput=journal  
#DefaultStandardError=inherit  
#DefaultTimeoutStartSec=90s  
#DefaultTimeoutStopSec=90s  
#DefaultRestartSec=100ms  
#DefaultStartLimitInterval=10s  
#DefaultStartLimitBurst=5  
#DefaultEnvironment=  
#DefaultCPUAccounting=no  
#DefaultBlockIOAccounting=no  
#DefaultMemoryAccounting=no  
#DefaultLimitCPU=  
#DefaultLimitFSIZE=  
#DefaultLimitDATA=  
#DefaultLimitSTACK=  
#DefaultLimitCORE=  
#DefaultLimitRSS=  
#DefaultLimitNOFILE=  
#DefaultLimitAS=  
#DefaultLimitNPROC=  
#DefaultLimitMEMLOCK=  
#DefaultLimitLOCKS=  
#DefaultLimitSIGPENDING=  
#DefaultLimitMSGQUEUE=  
#DefaultLimitNICE=  
#DefaultLimitRTPRIO=  
#DefaultLimitRTTIME=

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 14, 2017, 12:30pm UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/6 "2017-09-14T12:30:28Z")

</div>

That's more like it, but everything's commented out so I don't see how it could possibly do something useful.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 12, 2017, 12:31pm UTC](https://discuss.elastic.co/t/facing-issue-while-starting-multiple-instance-of-logstash/100491/7 "2017-10-12T12:31:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
