FS#56039 - [logstash] 5.6.3 fails to start, permission issue

Attached to Project: Community Packages
Opened by Jeremy M. (jskier) - Wednesday, 18 October 2017, 21:31 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Friday, 17 November 2017, 15:30 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Updating to 5.6.3 gives a permission error when trying to start service. Appears that the owner of the /usr/share/logstash/ directory is incorrect (set to root, not logstash).

Additional info:
* 5.6.3
* Attached systemd and journal of error


Steps to reproduce:
Update to 5.6.3, restart service, and it fails. Downgrade to 5.6.2 and it works fine. Changing ownership of logstash folder to logstash U/G also seems to workaround permission issue.

This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Friday, 17 November 2017, 15:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  logstash-6.0.0-1
Comment by Levente Polyak (anthraxx) - Thursday, 19 October 2017, 00:37 GMT
changing the permissions on that directory is not a good idea.
Can you undo it and test if removing the file /usr/share/logstash/logstash-core/versions-gem-copy.yml solves your issue?
Comment by Jeremy M. (jskier) - Thursday, 19 October 2017, 14:21 GMT
That seems to work, thanks. Is there a way to remove this file as part of the upgrade process?
Comment by Lemon Grab (lemongrab) - Sunday, 22 October 2017, 05:29 GMT
I'm having the same issue but the following steps still yield the same permission issue for me:

-delete versions-gem-copy.yml
-restart service
-FAILURE MESSAGE
-downgrade to 5.6.2
-restart service
-FAILURE MESSAGE
-downgrade to 5.6.1
-restart service
-FAILURE MESSAGE

/usr/share/logstash's permissions: drwxr-xr-x logstash logstash
/usr/share/logstash/logstash-core's permissions: drwxr-xr-x root root
Comment by Levente Polyak (anthraxx) - Sunday, 22 October 2017, 10:44 GMT
mentioned file doesn't even exist in 5.6.2 so what exactly is your runtime complaining about? "failure" doesn't quite help
Comment by Lemon Grab (lemongrab) - Sunday, 22 October 2017, 15:59 GMT
Hi, anthraxx. it's the same permission based error in the original post, even though the file doesn't exist, strangely enough. I've attached mine just in case there are discrepancies I've missed.
Comment by Lemon Grab (lemongrab) - Tuesday, 24 October 2017, 04:01 GMT
if there is a downgrade path that works or anything else that can get me closer to some sort of resolution, ideally as quickly as the one Jeremy M got, any advice on getting there would be much appreciated.
Comment by Jeremy M. (jskier) - Tuesday, 24 October 2017, 16:13 GMT
@anthraxx,

I tried this on a fresh VM and am able to reproduce what @lemongrab is seeing (remove the file, or change it's permissions; same permission on the same file). Not sure why it works on the box that was an upgrade (that is still running by the way, for days now). The yml file gets recreated if deleted, and I've tried just changing permissions. I'll look into this more when I have time.

@lemongrab, I'll try 5.6.2 again on the new fresh install. Curious, what file system are you running on? My fresh VM is btrfs, other box is ext4. Maybe this problem is bigger than logstash.
Comment by Lemon Grab (lemongrab) - Wednesday, 25 October 2017, 15:57 GMT
@jskier thanks for the response. My fs is ext4. I really hope that this gets resolved soon.
Comment by Lemon Grab (lemongrab) - Saturday, 28 October 2017, 00:38 GMT
RIP logstash for archlinux

I'm just going to use a docker image for this.
Comment by Levente Polyak (anthraxx) - Saturday, 28 October 2017, 09:02 GMT
in the meanwhile just:
touch /usr/share/logstash/logstash-core/versions-gem-copy.yml
chown logstash:logstash /usr/share/logstash/logstash-core/versions-gem-copy.yml
Comment by Massimiliano Torromeo (mtorromeo) - Friday, 17 November 2017, 15:30 GMT
While I agree that changing ownership of the whole directory is not optimal, that is how Elastic packages their own releases for RHEL/Debian and so I updated the ownership in 6.0.0.

Loading...