Problem:
I have noticed, that during system startup after a reboot or after a foreman-maintain service stop & start, the pulpcore-resource-manager.service repeatedly tries to start, fails, and retries until it succeeds after a couple of minutes. Sometimes it takes two minutes, sometimes even 5. Each attempt takes about 5 seconds, thus you have 12 or even 60 failed starts…
Foreman and Proxy versions:
Foreman 2.3.4, Katello 3.18.2 on CentOS 7.9
Other relevant data:
Each cycle looks like this in the systemd journal:
May 28 17:37:23 foreman.dkrz.de systemd[1]: Started Pulp Resource Manager.
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: pulp: pulpcore.tasking.services.worker_watcher:INFO: Cleaning up shutdown worker 'resource-manager'.
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: Traceback (most recent call last):
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/bin/rq", line 11, in <module>
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: load_entry_point('rq==1.5.2', 'console_scripts', 'rq')()
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/click/core.py", line 829, in __call__
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return self.main(*args, **kwargs)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/click/core.py", line 782, in main
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: rv = self.invoke(ctx)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return _process_result(sub_ctx.command.invoke(sub_ctx))
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return ctx.invoke(self.callback, **ctx.params)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/click/core.py", line 610, in invoke
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return callback(*args, **kwargs)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/rq/cli/cli.py", line 78, in wrapper
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return ctx.invoke(func, cli_config, *args[1:], **kwargs)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/click/core.py", line 610, in invoke
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return callback(*args, **kwargs)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/rq/cli/cli.py", line 268, in worker
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: max_jobs=max_jobs, with_scheduler=with_scheduler)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/rq/worker.py", line 508, in work
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: self.register_birth()
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/pulpcore/tasking/worker.py", line 171, in register_birth
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: return super().register_birth(*args, **kwargs)
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: File "/usr/lib/python3.6/site-packages/rq/worker.py", line 273, in register_birth
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: raise ValueError(msg.format(self.name))
May 28 17:37:25 foreman.dkrz.de pulpcore-resource-manager[38626]: ValueError: There exists an active worker named 'resource-manager' already
May 28 17:37:25 foreman.dkrz.de systemd[1]: pulpcore-resource-manager.service: main process exited, code=exited, status=1/FAILURE
May 28 17:37:25 foreman.dkrz.de systemd[1]: Unit pulpcore-resource-manager.service entered failed state.
May 28 17:37:25 foreman.dkrz.de systemd[1]: pulpcore-resource-manager.service failed.
May 28 17:37:28 foreman.dkrz.de systemd[1]: pulpcore-resource-manager.service holdoff time over, scheduling restart.
May 28 17:37:28 foreman.dkrz.de systemd[1]: Stopped Pulp Resource Manager.
May 28 17:37:28 foreman.dkrz.de systemd[1]: Started Pulp Resource Manager.
...
May 28 17:39:28 foreman.dkrz.de systemd[1]: pulpcore-resource-manager.service: main process exited, code=exited, status=1/FAILURE
May 28 17:39:28 foreman.dkrz.de systemd[1]: Unit pulpcore-resource-manager.service entered failed state.
May 28 17:39:28 foreman.dkrz.de systemd[1]: pulpcore-resource-manager.service failed.
May 28 17:39:31 foreman.dkrz.de systemd[1]: pulpcore-resource-manager.service holdoff time over, scheduling restart.
May 28 17:39:31 foreman.dkrz.de systemd[1]: Stopped Pulp Resource Manager.
May 28 17:39:31 foreman.dkrz.de systemd[1]: Started Pulp Resource Manager.
May 28 17:39:33 foreman.dkrz.de pulpcore-resource-manager[39403]: pulp: pulpcore.tasking.services.worker_watcher:INFO: Cleaning up shutdown worker 'resource-manager'.
May 28 17:39:33 foreman.dkrz.de pulpcore-resource-manager[39403]: pulp: rq.worker:INFO: Worker rq:worker:resource-manager: started, version 1.5.2
May 28 17:39:33 foreman.dkrz.de pulpcore-resource-manager[39403]: pulp: rq.worker:INFO: *** Listening on resource-manager...
May 28 17:39:33 foreman.dkrz.de pulpcore-resource-manager[39403]: pulp: pulpcore.tasking.services.worker_watcher:INFO: Worker 'resource-manager' is back online.
May 28 17:39:33 foreman.dkrz.de pulpcore-resource-manager[39403]: pulp: rq.worker:INFO: Cleaning registries for queue: resource-manager