I try to start logstash as a deamon but for some reason it does not seem to read my logstash.conf which I placed in /etc/logstash/conf.d/ What could be the reason?
When I run it like sudo bin/logstash -f ./logstash.conf all works fine
sudo service logstash status
β logstash.service - LSB: Starts Logstash as a daemon.
Loaded: loaded (/etc/init.d/logstash; bad; vendor preset: enabled)
Active: active (running) since Thu 2016-06-02 22:58:56 EDT; 9min ago
Docs: man:systemd-sysv-generator(8)
Process: 5198 ExecStart=/etc/init.d/logstash start (code=exited, status=0/SUCCESS)
Tasks: 20
Memory: 175.1M
CPU: 18.598s
CGroup: /system.slice/logstash.service
ββ5206 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOn
Jun 02 22:58:56 michal-ubuntu systemd[1]: Starting LSB: Starts Logstash as a daemon....
Jun 02 22:58:56 michal-ubuntu logstash[5198]: logstash started.
Jun 02 22:58:56 michal-ubuntu systemd[1]: Started LSB: Starts Logstash as a daemon..
Jun 02 23:08:07 michal-ubuntu systemd[1]: Started LSB: Starts Logstash as a daemon..
I got same problem with my new installation, my all conf files dint work when i start the logstash as deamon (/etc/init.d/logstash start), but if i run it like "bin/logstash -f /etc/logstash/conf.d/" all works fine...
Its bug?
Following the /etc/init.d/logstash file (START SESSION).
start() {
LS_JAVA_OPTS="${LS_JAVA_OPTS} -Djava.io.tmpdir=${LS_HOME}"
HOME=${LS_HOME}
export PATH HOME LS_HEAP_SIZE LS_JAVA_OPTS LS_USE_GC_LOGGING LS_GC_LOG_FILE
chown doesn't grab the suplimental groups when setting the user:group - so we have to do it for it.
iIts running normal for me.
what i change (2 choices)
1 - You have to create a username/group called logstash
2 - Edit the file /etc/init.d/logstash and chance the options LS_USER=root and LS_GROUP=root
In my case, i made 2nd
To start the application with your SO you have to do this:
update-rc.d kibana defaults 95 10
update-rc.d logstash defaults 95 10
update-rc.d elasticsearch defaults 95 10
I guess Logstash team dev have to create the user/group when you install it by apt-get.
With Ubuntu Logstash is started with the logstash user and group.
Logstash would also fail to start as a daemon but would start when run as root.
The problem here was that java was not allowed to bind to ports below 1024.
Have you checked that your input config is not listening to ports below 1024?
If so you can use this command to allow java to do so.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.