I'm using Katello 2.1. I created a daily sync plan to synchronize my
repositories. They regularly failed because of the "too many open file"
error. I know I have to increase the file descriptor, but I don't know for
which process/user and in which systemd UNIT is concerned.
No one ever had encountered this situations and found a clean fix?
My workaround was to raise limits in /etc/security/limits.conf (I'm on
CENTOS 7)
soft nofile 8192
hard nofile 8192
But it raises the limit of opened files for any user. I'd want to be more
specific and specify the particular user with which the repo sync is
running. Is someone know which are the concerned users?
···
Le lundi 2 mars 2015 10:28:30 UTC+1, Nicolas Michel a écrit :
>
> Hi,
>
> I'm using Katello 2.1. I created a daily sync plan to synchronize my
> repositories. They regularly failed because of the "too many open file"
> error. I know I have to increase the file descriptor, but I don't know for
> which process/user and in which systemd UNIT is concerned.
>
> Can you help me?
>
> Here is the output of the particular job:
>
> Output:
>
> {"pulp_tasks"=>
> [{"exception"=>nil,
> "task_type"=>"pulp.server.tasks.repository.sync_with_auto_publish",
> "_href"=>"/pulp/api/v2/tasks/613eeed6-c3f4-45c7-86f3-e2b93788692a/",
> "task_id"=>"613eeed6-c3f4-45c7-86f3-e2b93788692a",
> "tags"=>
> ["pulp:repository:Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_-_Optional_RPMs_x86_64_6Server",
> "pulp:action:sync"],
> "finish_time"=>nil,
> "start_time"=>nil,
> "traceback"=>nil,
> "spawned_tasks"=>[],
> "progress_report"=>{},
> "queue"=>"reserved_resource_worker-0@hostname.dq",
> "state"=>"waiting",
> "result"=>nil,
> "error"=>nil,
> "_id"=>{"$oid"=>"54ddd8dd91efa65c060b6f7d"},
> "id"=>"54ddd8dd9a5b7f099bdad950"}],
> "poll_attempts"=>{"total"=>14, "failed"=>3}}
>
> Exception:
>
> Errno::EMFILE: Too many open files - getaddrinfo
>
> Backtrace:
>
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:763:in `initialize'
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:763:in `open'
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:763:in `block in connect'
> /opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
> /opt/rh/ruby193/root/usr/share/ruby/timeout.rb:100:in `timeout'
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:763:in `connect'
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:756:in `do_start'
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:745:in `start'
> /opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:44:in `transmit'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/base.rb:91:in `get_response'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/base.rb:82:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-1.3.0/lib/runcible/resources/task.rb:41:in `poll'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/pulp/abstract_async_task.rb:113:in `block in poll_external_task'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/pulp/abstract_async_task.rb:112:in `map'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/pulp/abstract_async_task.rb:112:in `poll_external_task'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/polling.rb:86:in `poll_external_task_with_rescue'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/polling.rb:15:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/cancellable.rb:9:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/pulp/abstract_async_task.rb:57:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:443:in `block (3 levels) in execute_run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:27:in `block in run'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:57:in `block (2 levels) in as_remote_user'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/katello/util/thread_session.rb:84:in `pulp_config'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:43:in `as_pulp_user'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:56:in `block in as_remote_user'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/katello/util/thread_session.rb:91:in `cp_config'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:38:in `as_cp_user'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:55:in `as_remote_user'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/remote_action.rb:27:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:16:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/keep_locale.rb:23:in `block in run'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
> /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.0/app/lib/actions/middleware/keep_locale.rb:23:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/world.rb:30:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:442:in `block (2 levels) in execute_run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:441:in `catch'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:441:in `block in execute_run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `block in with_error_handling'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `catch'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `with_error_handling'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:436:in `execute_run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:230:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/worker.rb:20:in `block in on_message'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
> /opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:82:in `on_envelope'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:72:in `receive'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `loop'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `block in run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `catch'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:13:in `block in initialize'
> /opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
>
>