Can't run Logstash as a Service

i changed permissions to 3 files, and now i have this error, it doesn't find this file:

[ERROR][org.logstash.execution.AbstractPipelineExt] Logstash failed to create queue.
java.io.FileNotFoundException: /usr/share/logstash/queue_data/main/checkpoint.head.tmp (Permission denied)

As I said, this is all permissions issue because you ran logstash as root, you need to fix those permissions.

Logstash is probably trying to write on the folder /usr/share/logstash/queue_data/main/ to use the persistent queue, but does not have permissions to do it, fix the permissions to the folder /usr/share/logstash.

What does your logstash.yml file looks like? You can remove the path for the persistent queue so logstash will recreate it.

There is not much else to do, you will need to fix the permissions as they appear.

in my logstash.yml file i have:

path.queue: "/usr/share/logstash/queue_data"

i have to comment it?

I tried to chang permissions to /usr/share/logstash but i have the same problem

If you set path.queue, it means that you want to use the persistent queue, if you comment it logstash will use the memory queue instead.

To fix the permissions try to run:

sudo chown -R logstash:logstash /usr/share/logstash

This will change the permission for the logstash path and all the directories and files under it.

still the same error, can't fix the permissions :frowning:

So what i have to do with the persistent queue? Remove the path between the ""?

Do you want to use persistent queues? If you want you will need to find a way to fix the permissions or use another directory where the logstash user can write.

if you do not want to use persistent queues, you can use the default memory queue, just comment the path.queue line.

Also, if you change the permissions for the path you should not have the same error, are you getting the exactly same error for the same path or is another path?

Ok it's running as a service now, i changed another permission and it seems working fine
Now i'm gonna check it for the rest of the day

THANK U!!

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