Logstash doesn't run as a service only manually


(Kristoffer Fagerlund) #1

logstash is only listening to the confed port and receiving messages if Istart it manually with :
sudo bin/logstash --path.settings /etc/logstash -f /etc/logstash/conf.d/logstash.conf

Starting it as a service and it doesnt receive messages nor are listening to the cofed port
:/etc/logstash$ sudo systemctl status logstash.service

or sudo service logstash start

:/etc/logstash$ cat /etc/systemd/system/logstash.service
[Unit]
Description=logstash

[Service]
Type=simple
User=logstash
Group=logstash
Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
Prefixing the path with '-' makes it try to load, but if the file doesn't
exist, it continues onward.
EnvironmentFile=-/etc/default/logstash
EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"
Restart=always
WorkingDirectory=/
Nice=19
LimitNOFILE=16384

[Install]
WantedBy=multi-user.target


(Kristoffer Fagerlund) #2

Anyone have any idea why logstash as a service cant find the settingfile? Even tho I only use the default paths that was included in the installation ?


(Kristoffer Fagerlund) #3

I read one thread here were a user installed xpack and afterwards the logstash serivce failed due to altered rights of /etc/logstash , could that be my case also ?

When I tried chmod it didn't work, I even did 777 on /etc/logstash.

any tips?


(system) #4

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