Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong socket permission since 1.6.27 #233

Closed
weirdan opened this issue Jan 21, 2020 · 7 comments · Fixed by #283
Closed

Wrong socket permission since 1.6.27 #233

weirdan opened this issue Jan 21, 2020 · 7 comments · Fixed by #283
Assignees

Comments

@weirdan
Copy link

weirdan commented Jan 21, 2020

Ever since Jan 14 google-fluentd fails to set proper permission on unix socket created by @type unix source:

$ ls -l /var/run/google-fluentd/google-fluentd.sock
srwxr-xr-x 1 root root 0 Jan 14 04:28 /var/run/google-fluentd/google-fluentd.sock
$ cat /etc/google-fluentd/config.d/socket.conf
<source>
  @type unix
  path /var/run/google-fluentd/google-fluentd.sock
</source>

This looks similar to fluent/fluentd#1019

@davidbtucker davidbtucker self-assigned this Feb 3, 2020
@GLStephen
Copy link

GLStephen commented Apr 26, 2020

We are also seeing this issue. This is a pretty fundamental issue. It looks like chumask: 0 here https://github.com/fluent/fluentd/blob/9c577a78e69fb3bc1fc1faf0ef425091b9180987/lib/fluent/supervisor.rb#L314 may only be set when the supervisor runs and it Google FluentD runs without supervisor.

@GLStephen
Copy link

GLStephen commented Apr 27, 2020

@jkohen & @igorpeshansky & @davidbtucker I can confirm that manually rolling back this change resolves the issue with permissions on the socket file.

#225

@qingling128
Copy link

Took a quick look.

It seems like that for standalone worker mode, Fluentd is setting chuser and chgroup, but not chumask.

https://github.com/fluent/fluentd/blob/c9dde7104ea8dfc2442fd73615bddac2d8c5f6c1/lib/fluent/supervisor.rb#L596

Filed a bug with the upstream Fluentd repo: fluent/fluentd#2984.

For the workaround, we can run the agent in supervisor mode.

@qingling128
Copy link

Looks like the upstream issue has been fixed by fluent/fluentd#2987.

Next step: Wait for a Fluentd release and upgrade to that version.

@nicolaiskogheim
Copy link

nicolaiskogheim commented Jul 27, 2020

The fix was released in v1.10.4 btw.

@jkschulz jkschulz assigned jkschulz and unassigned qingling128 Aug 12, 2020
@jkschulz
Copy link

jkschulz commented Aug 12, 2020

This is fixed by the upgrade to fluentd v1.11.2 in #283, which will be released in google-fluentd 1.8.0:

$ ls -l /var/run/google-fluentd/google-fluentd.sock
srwxrwxrwx 1 root root 0 Aug 12 16:36 /var/run/google-fluentd/google-fluentd.sock

@jkschulz
Copy link

This fix was released in 1.8.0 on Aug 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants