{"action":"created","issue":{"url":"https://api.github.com/repos/WeblateOrg/docker/issues/102","repository_url":"https://api.github.com/repos/WeblateOrg/docker","labels_url":"https://api.github.com/repos/WeblateOrg/docker/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/WeblateOrg/docker/issues/102/comments","events_url":"https://api.github.com/repos/WeblateOrg/docker/issues/102/events","html_url":"https://github.com/WeblateOrg/docker/issues/102","id":382238133,"node_id":"MDU6SXNzdWUzODIyMzgxMzM=","number":102,"title":"Celery not working after version-by-version upgrade from 3.2-1 to 3.2.2-3","user":{"login":"shindler","id":650703,"node_id":"MDQ6VXNlcjY1MDcwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/650703?v=4","gravatar_id":"","url":"https://api.github.com/users/shindler","html_url":"https://github.com/shindler","followers_url":"https://api.github.com/users/shindler/followers","following_url":"https://api.github.com/users/shindler/following{/other_user}","gists_url":"https://api.github.com/users/shindler/gists{/gist_id}","starred_url":"https://api.github.com/users/shindler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shindler/subscriptions","organizations_url":"https://api.github.com/users/shindler/orgs","repos_url":"https://api.github.com/users/shindler/repos","events_url":"https://api.github.com/users/shindler/events{/privacy}","received_events_url":"https://api.github.com/users/shindler/received_events","type":"User","site_admin":false},"labels":[{"id":248970254,"node_id":"MDU6TGFiZWwyNDg5NzAyNTQ=","url":"https://api.github.com/repos/WeblateOrg/docker/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-19T13:42:13Z","updated_at":"2018-12-01T19:51:27Z","closed_at":null,"author_association":"NONE","body":"Celery stopped working as expected after we have bumped up our docker based Weblate to version 3.2.2-3 (version by version from 3.2-1). We were getting same error regarding celery during updates from: 3.2.1-2 to 3.2.2-1, 3.2.2-1 to 3.2.2-2 and further to 3.2.2-3.\r\n\r\nStack trace given while trying to run callery (via bash; same given container startup):\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/dist-packages/kombu/utils/objects.py\", line 42, in __get__\r\n    return obj.__dict__[self.__name__]\r\nKeyError: 'scheduler'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.5/shelve.py\", line 111, in __getitem__\r\n    value = self.cache[key]\r\nKeyError: 'entries'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 515, in _create_schedule\r\n    self._store[str('entries')]\r\n  File \"/usr/lib/python3.5/shelve.py\", line 113, in __getitem__\r\n    f = BytesIO(self.dict[key.encode(self.keyencoding)])\r\nKeyError: b'entries'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/dist-packages/billiard/process.py\", line 327, in _bootstrap\r\n    self.run()\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 664, in run\r\n    self.service.start(embedded_process=True)\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 579, in start\r\n    humanize_seconds(self.scheduler.max_interval))\r\n  File \"/usr/local/lib/python3.5/dist-packages/kombu/utils/objects.py\", line 44, in __get__\r\n    value = obj.__dict__[self.__name__] = self.__get(obj)\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 623, in scheduler\r\n    return self.get_scheduler()\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 618, in get_scheduler\r\n    lazy=lazy,\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 458, in __init__\r\n    Scheduler.__init__(self, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 225, in __init__\r\n    self.setup_schedule()\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 486, in setup_schedule\r\n    self._create_schedule()\r\n  File \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 519, in _create_schedule\r\n    self._store[str('entries')] = {}\r\n  File \"/usr/lib/python3.5/shelve.py\", line 125, in __setitem__\r\n    self.dict[key.encode(self.keyencoding)] = f.getvalue()\r\n_dbm.error: cannot add item to database\r\nProcess Beat:\r\nTraceback (most recent call last):\r\nFile \"/usr/local/lib/python3.5/dist-packages/kombu/utils/objects.py\", line 42, in __get__\r\n    return obj.__dict__[self.__name__]\r\nKeyError: 'scheduler'\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\nFile \"/usr/lib/python3.5/shelve.py\", line 111, in __getitem__\r\n    value = self.cache[key]\r\nKeyError: 'entries'\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 515, in _create_schedule\r\n    self._store[str('entries')]\r\nFile \"/usr/lib/python3.5/shelve.py\", line 113, in __getitem__\r\n    f = BytesIO(self.dict[key.encode(self.keyencoding)])\r\nKeyError: b'entries'\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\nFile \"/usr/local/lib/python3.5/dist-packages/billiard/process.py\", line 327, in _bootstrap\r\n    self.run()\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 664, in run\r\n    self.service.start(embedded_process=True)\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 579, in start\r\n    humanize_seconds(self.scheduler.max_interval))\r\nFile \"/usr/local/lib/python3.5/dist-packages/kombu/utils/objects.py\", line 44, in __get__\r\n    value = obj.__dict__[self.__name__] = self.__get(obj)\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 623, in scheduler\r\n    return self.get_scheduler()\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 618, in get_scheduler\r\n    lazy=lazy,\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 458, in __init__\r\n    Scheduler.__init__(self, *args, **kwargs)\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 225, in __init__\r\n    self.setup_schedule()\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 486, in setup_schedule\r\n    self._create_schedule()\r\nFile \"/usr/local/lib/python3.5/dist-packages/celery/beat.py\", line 519, in _create_schedule\r\n    self._store[str('entries')] = {}\r\nFile \"/usr/lib/python3.5/shelve.py\", line 125, in __setitem__\r\n    self.dict[key.encode(self.keyencoding)] = f.getvalue()\r\n_dbm.error: cannot add item to database\r\nException ignored in:\r\n<bound method Shelf.__del__ of <shelve.DbfilenameShelf object at 0x7f587438db00>>\r\nTraceback (most recent call last):\r\nFile \"/usr/lib/python3.5/shelve.py\", line 162, in __del__\r\nself.close()\r\nFile \"/usr/lib/python3.5/shelve.py\", line 144, in close\r\nself.sync()\r\nFile \"/usr/lib/python3.5/shelve.py\", line 168, in sync\r\nself[key] = entry\r\nFile \"/usr/lib/python3.5/shelve.py\", line 125, in __setitem__\r\nself.dict[key.encode(self.keyencoding)] = f.getvalue()\r\n_dbm.error: cannot add item to database\r\n```\r\n\r\nlist versions ouput:\r\n```\r\n* Weblate 3.2.2\r\n * Python 3.5.3\r\n * Django 2.1.2\r\n * Celery 4.2.1\r\n * celery-batches 0.2\r\n * six 1.10.0\r\n * social-auth-core 1.7.0\r\n * social-auth-app-django 2.1.0\r\n * django-appconf 1.0.2\r\n * translate-toolkit 2.3.1\r\n * Whoosh 2.7.4\r\n * defusedxml 0.5.0\r\n * Git 2.11.0\r\n * Pillow 4.0.0\r\n * python-dateutil 2.5.3\r\n * lxml 3.7.1\r\n * django-crispy-forms 1.7.2\r\n * django_compressor 2.2\r\n * djangorestframework 3.9.0\r\n * user-agents 1.1.0\r\n * jellyfish 0.6.1\r\n * pytz 2018.7\r\n * pyuca 1.2\r\n * PyYAML 3.12\r\n * tesserocr 2.3.1\r\n * Mercurial 4.0\r\n * git-svn 2.11.0\r\n * Database backends: django.db.backends.postgresql\r\n * Cache backends: default:RedisCache, avatar:FileBasedCache\r\n * Platform: Linux 4.4.0-134-generic (x86_64)\r\n```\r\n\r\ncheck --deploy output\r\n```\r\nSystemCheckError: System check identified some issues:\r\n\r\nCRITICALS:\r\n?: (weblate.E018) Failed to download avatar: <urlopen error [Errno 99] Cannot assign requested address>\r\n\tHINT: https://docs.weblate.org/en/weblate-3.2.2/admin/optionals.html#avatars\r\n\r\nWARNINGS:\r\n?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.\r\n?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.\r\n?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.\r\n\r\nSystem check identified 4 issues (0 silenced).\r\n```\r\n\r\n**Additional context**\r\nWe have a custom task scheduled using `settings-override.py` with content:\r\n```\r\nCELERY_BEAT_SCHEDULE = {\r\n    'commit': {\r\n        'task': 'weblate.trans.tasks.commit_pending',\r\n\t'kwargs': {'hours': 0},\r\n        'schedule': 120,\r\n     }\r\n}\r\n```\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/66365440-celery-not-working-after-version-by-version-upgrade-from-3-2-1-to-3-2-2-3?utm_campaign=plugin&utm_content=tracker%2F21377293&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F21377293&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/WeblateOrg/docker/issues/comments/443453543","html_url":"https://github.com/WeblateOrg/docker/issues/102#issuecomment-443453543","issue_url":"https://api.github.com/repos/WeblateOrg/docker/issues/102","id":443453543,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQ1MzU0Mw==","user":{"login":"nijel","id":212189,"node_id":"MDQ6VXNlcjIxMjE4OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/212189?v=4","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"created_at":"2018-12-01T19:51:27Z","updated_at":"2018-12-01T19:51:27Z","author_association":"MEMBER","body":"Anyway the difference was Celery 4.2.0 versus 4.2.1, however I can't find any related change between those.\r\n\r\nThis issue was reported several times on Celery, but without any resolution - https://github.com/celery/celery/issues/3521 or https://github.com/celery/celery/issues/2862"}}
{"actor":{"display_login":"nijel"}}