Error: Operation not permitted

668 views
Skip to first unread message

Eiichi Shimotori

unread,
Apr 29, 2013, 1:58:42 PM4/29/13
to flu...@googlegroups.com
Hi,


I installed v1.1.13 on CentOS 6.4 from RPM repository.

When I started the td-agent service, I got the following error:


$ sudo service td-agent start

Starting td-agent: 2013-04-30 02:46:08 +0900 [error]: fluent/supervisor.rb:196:rescue in main_process: unexpected error error="Operation not permitted"

2013-04-30 02:46:08 +0900 [error]: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.33/lib/fluent/supervisor.rb:276:in `groups='

2013-04-30 02:46:08 +0900 [error]: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.33/lib/fluent/supervisor.rb:276:in `change_privilege'

2013-04-30 02:46:08 +0900 [error]: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.33/lib/fluent/supervisor.rb:85:in `block in start'

.....


The line 276 in supervisor.rb is "Process.groups = Process.groups | user_groups".

I debugged and found that Process.uid was the one of td-agent user on that line.


Also, executing "td-agent" directly is no problem.


Then I checked the init script and noticed that "DAEMON_ARGS=${DAEMON_ARGS---user td-agent}" on the line 33.

This option runs the process as td-agent user, but "Process.groups =" must be executed by root.


So this line should be changed to "DAEMON_ARGS=${DAEMON_ARGS-}".


And the td-agent service gave no error with this change.



Best regards,

Eiichi Shimotori



Masahiro Nakagawa

unread,
May 8, 2013, 5:50:04 AM5/8/13
to flu...@googlegroups.com
Hi Eiichi,

Sorry for the late reply.

I will test your suggestion.
Please wait.


Masahiro




--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Masahiro Nakagawa

unread,
Jun 20, 2013, 7:25:47 AM6/20/13
to flu...@googlegroups.com
I sent reply to eiichi directly, so re-send to ML.

In my env, I can't reproduce above error:

% rpm -qa | grep td-agent
td-agent-1.1.13-0.el6.x86_64
% cat /etc/redhat-release
CentOS release 6.4 (Final)

% sudo service td-agent start
Starting td-agent:                                         [  OK  ]
% sudo service td-agent stop 
Shutting down td-agent:                                    [  OK  ]

% sudo /etc/init.d/td-agent start
Starting td-agent:                                         [  OK  ]
% sudo /etc/init.d/td-agent stop 
Shutting down td-agent:                                    [  OK  ]

Am I missing something?



Eiichi Shimotori

unread,
Jun 20, 2013, 12:22:16 PM6/20/13
to flu...@googlegroups.com

Masahiro, thank you for checking.


Just in case, could you show me the content of /etc/sysconfig/td-agent?



Eiichi Shimotori

Masahiro Nakagawa

unread,
Jun 20, 2013, 12:50:00 PM6/20/13
to flu...@googlegroups.com
No /etc/sysconfig/td-agent .

Do you put own td-agent configuration into /etc/sysconfig ?


Masahiro

Eiichi Shimotori

unread,
Jun 21, 2013, 2:21:08 AM6/21/13
to flu...@googlegroups.com

My /etc/sysconfig/td-agent is:

PIDFILE=/var/run/td-agent/td-agent.pid

TD_AGENT_ARGS="/usr/sbin/td-agent --user td-agent --group td-agent --log /var/log/td-agent/td-agent.log"


"--user td-agent" must be the cause.

This is my fault. Sorry for that.


Eiichi Shimotori


Masahiro Nakagawa

unread,
Jun 21, 2013, 4:49:24 AM6/21/13
to flu...@googlegroups.com
No problem.

Thank you for using td-agent :)



Eiichi Shimotori


--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
Reply all
Reply to author
Forward
0 new messages