{"action":"created","issue":{"url":"https://api.github.com/repos/celery/celery/issues/4457","repository_url":"https://api.github.com/repos/celery/celery","labels_url":"https://api.github.com/repos/celery/celery/issues/4457/labels{/name}","comments_url":"https://api.github.com/repos/celery/celery/issues/4457/comments","events_url":"https://api.github.com/repos/celery/celery/issues/4457/events","html_url":"https://github.com/celery/celery/issues/4457","id":282804088,"node_id":"MDU6SXNzdWUyODI4MDQwODg=","number":4457,"title":"Connection to broker lost. Trying to re-establish the connection: OSError: [Errno 9] Bad file descriptor","user":{"login":"cajbecu","id":327832,"node_id":"MDQ6VXNlcjMyNzgzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/327832?v=4","gravatar_id":"","url":"https://api.github.com/users/cajbecu","html_url":"https://github.com/cajbecu","followers_url":"https://api.github.com/users/cajbecu/followers","following_url":"https://api.github.com/users/cajbecu/following{/other_user}","gists_url":"https://api.github.com/users/cajbecu/gists{/gist_id}","starred_url":"https://api.github.com/users/cajbecu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cajbecu/subscriptions","organizations_url":"https://api.github.com/users/cajbecu/orgs","repos_url":"https://api.github.com/users/cajbecu/repos","events_url":"https://api.github.com/users/cajbecu/events{/privacy}","received_events_url":"https://api.github.com/users/cajbecu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-18T08:52:17Z","updated_at":"2018-06-07T15:47:40Z","closed_at":null,"author_association":"NONE","body":"## Checklist\r\n\r\n- [ ] I have included the output of ``celery -A proj report`` in the issue.\r\n      (if you are not able to do this, then at least specify the Celery\r\n       version affected).\r\n- [x] I have verified that the issue exists against the `master` branch of Celery.\r\n\r\n## Software\r\ncelery==4.1.0\r\nkombu==4.1.0\r\namqp==2.2.2\r\nPython 3.6.1\r\nbroker: rabbitmq 3.6.14\r\nresult backend: redis\r\n\r\n## Steps to reproduce\r\n1. celery -A proj worker -Q Q1 --autoscale=10,1 -Ofair --without-gossip --without-mingle --heartbeat-interval=60 -n Q1\r\n2. celery lost connection to broker\r\n3. after restarting affected worker the connection is successfully re-established and the worker starts processing tasks\r\n\r\n## Expected behavior\r\ncelery should re-establish connection to broker\r\n\r\n## Actual behavior\r\ncelery tries to re-establish connection to broker but fails with this error message (which is repeated every second) until manually restarted:\r\n```\r\n[user] celery.worker.consumer.consumer WARNING 2017-12-18 00:38:27,078 consumer: \r\nConnection to broker lost. Trying to re-establish the connection...\r\nTraceback (most recent call last):\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/consumer/consumer.py\", line 320, in start\r\n    blueprint.start(self)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/bootsteps.py\", line 119, in start\r\n    step.start(parent)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/consumer/consumer.py\", line 596, in start\r\n    c.loop(*c.loop_args())\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/loops.py\", line 47, in asynloop\r\n    obj.controller.register_with_event_loop(hub)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/worker.py\", line 217, in register_with_event_loop\r\n    description='hub.register',\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/bootsteps.py\", line 151, in send_all\r\n    fun(parent, *args)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/components.py\", line 178, in register_with_event_loop\r\n    w.pool.register_with_event_loop(hub)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/concurrency/prefork.py\", line 134, in register_with_event_loop\r\n    return reg(loop)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/concurrency/asynpool.py\", line 476, in register_with_event_loop\r\n    for fd in self._fileno_to_outq]\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/celery/concurrency/asynpool.py\", line 476, in <listcomp>\r\n    for fd in self._fileno_to_outq]\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/kombu/async/hub.py\", line 207, in add_reader\r\n    return self.add(fds, callback, READ | ERR, args)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/kombu/async/hub.py\", line 158, in add\r\n    self.poller.register(fd, flags)\r\n  File \"/home/user/.envs/user/lib/python3.6/site-packages/kombu/utils/eventio.py\", line 67, in register\r\n    self._epoll.register(fd, events)\r\nOSError: [Errno 9] Bad file descriptor\r\n```"},"comment":{"url":"https://api.github.com/repos/celery/celery/issues/comments/395470175","html_url":"https://github.com/celery/celery/issues/4457#issuecomment-395470175","issue_url":"https://api.github.com/repos/celery/celery/issues/4457","id":395470175,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTQ3MDE3NQ==","user":{"login":"ryanpetrello","id":214912,"node_id":"MDQ6VXNlcjIxNDkxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/214912?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanpetrello","html_url":"https://github.com/ryanpetrello","followers_url":"https://api.github.com/users/ryanpetrello/followers","following_url":"https://api.github.com/users/ryanpetrello/following{/other_user}","gists_url":"https://api.github.com/users/ryanpetrello/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanpetrello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanpetrello/subscriptions","organizations_url":"https://api.github.com/users/ryanpetrello/orgs","repos_url":"https://api.github.com/users/ryanpetrello/repos","events_url":"https://api.github.com/users/ryanpetrello/events{/privacy}","received_events_url":"https://api.github.com/users/ryanpetrello/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T15:47:40Z","updated_at":"2018-06-07T15:47:40Z","author_association":"CONTRIBUTOR","body":"I work on an open source project that uses celery and is encountering this bug also.  One thing we've discovered is that you can cause celery to break out of this failure by sending it `SIGHUP`."}}
{"actor":{"display_login":"ryanpetrello"}}