{"action":"created","issue":{"url":"https://api.github.com/repos/foxmask/django-th/issues/121","labels_url":"https://api.github.com/repos/foxmask/django-th/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/foxmask/django-th/issues/121/comments","events_url":"https://api.github.com/repos/foxmask/django-th/issues/121/events","html_url":"https://github.com/foxmask/django-th/issues/121","id":117221528,"number":121,"title":"Celery > PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/trigger_happy.log'","user":{"login":"nsteinmetz","id":33180,"avatar_url":"https://avatars.githubusercontent.com/u/33180?v=3","gravatar_id":"","url":"https://api.github.com/users/nsteinmetz","html_url":"https://github.com/nsteinmetz","followers_url":"https://api.github.com/users/nsteinmetz/followers","following_url":"https://api.github.com/users/nsteinmetz/following{/other_user}","gists_url":"https://api.github.com/users/nsteinmetz/gists{/gist_id}","starred_url":"https://api.github.com/users/nsteinmetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsteinmetz/subscriptions","organizations_url":"https://api.github.com/users/nsteinmetz/orgs","repos_url":"https://api.github.com/users/nsteinmetz/repos","events_url":"https://api.github.com/users/nsteinmetz/events{/privacy}","received_events_url":"https://api.github.com/users/nsteinmetz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-11-16T21:24:40Z","updated_at":"2015-11-17T20:57:57Z","closed_at":null,"body":"When I run manually the command from my th root folder, I have:\r\n\r\n```\r\n$ /usr/local/bin/celery -A django_th worker --autoscale=10,3 -l info\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.4/logging/config.py\", line 557, in configure\r\n    handler = self.configure_handler(handlers[name])\r\n  File \"/usr/lib/python3.4/logging/config.py\", line 725, in configure_handler\r\n    result = factory(**kwargs)\r\n  File \"/usr/lib/python3.4/logging/handlers.py\", line 150, in __init__\r\n    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)\r\n  File \"/usr/lib/python3.4/logging/handlers.py\", line 57, in __init__\r\n    logging.FileHandler.__init__(self, filename, mode, encoding, delay)\r\n  File \"/usr/lib/python3.4/logging/__init__.py\", line 1006, in __init__\r\n    StreamHandler.__init__(self, self._open())\r\n  File \"/usr/lib/python3.4/logging/__init__.py\", line 1030, in _open\r\n    return open(self.baseFilename, self.mode, encoding=self.encoding)\r\nPermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/trigger_happy.log'\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/bin/celery\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/__main__.py\", line 30, in main\r\n    main()\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/celery.py\", line 81, in main\r\n    cmd.execute_from_commandline(argv)\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/celery.py\", line 770, in execute_from_commandline\r\n    super(CeleryCommand, self).execute_from_commandline(argv)))\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/base.py\", line 311, in execute_from_commandline\r\n    return self.handle_argv(self.prog_name, argv[1:])\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/celery.py\", line 762, in handle_argv\r\n    return self.execute(command, argv)\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/celery.py\", line 694, in execute\r\n    ).run_from_argv(self.prog_name, argv[1:], command=argv[0])\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/worker.py\", line 179, in run_from_argv\r\n    return self(*args, **options)\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/base.py\", line 274, in __call__\r\n    ret = self.run(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/bin/worker.py\", line 213, in run\r\n    ).start()\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/worker/__init__.py\", line 95, in __init__\r\n    self.app.loader.init_worker()\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/loaders/base.py\", line 128, in init_worker\r\n    self.import_default_modules()\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/loaders/base.py\", line 116, in import_default_modules\r\n    signals.import_modules.send(sender=self.app)\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/utils/dispatch/signal.py\", line 166, in send\r\n    response = receiver(signal=self, sender=sender, **named)\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/fixups/django.py\", line 73, in on_import_modules\r\n    self.worker_fixup.validate_models()\r\n  File \"/usr/local/lib/python3.4/dist-packages/celery/fixups/django.py\", line 158, in validate_models\r\n    django_setup()\r\n  File \"/usr/local/lib/python3.4/dist-packages/django/__init__.py\", line 17, in setup\r\n    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)\r\n  File \"/usr/local/lib/python3.4/dist-packages/django/utils/log.py\", line 86, in configure_logging\r\n    logging_config_func(logging_settings)\r\n  File \"/usr/lib/python3.4/logging/config.py\", line 789, in dictConfig\r\n    dictConfigClass(config).configure()\r\n  File \"/usr/lib/python3.4/logging/config.py\", line 565, in configure\r\n    '%r: %s' % (name, e))\r\nValueError: Unable to configure handler 'file': [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/trigger_happy.log'\r\n```\r\nI guess the settings part you mention about Celery is in th/settings.py. Is there something more to be done on Celery side ? Or a django-celery app maybe to make the bridge ?"},"comment":{"url":"https://api.github.com/repos/foxmask/django-th/issues/comments/157505138","html_url":"https://github.com/foxmask/django-th/issues/121#issuecomment-157505138","issue_url":"https://api.github.com/repos/foxmask/django-th/issues/121","id":157505138,"user":{"login":"foxmask","id":208212,"avatar_url":"https://avatars.githubusercontent.com/u/208212?v=3","gravatar_id":"","url":"https://api.github.com/users/foxmask","html_url":"https://github.com/foxmask","followers_url":"https://api.github.com/users/foxmask/followers","following_url":"https://api.github.com/users/foxmask/following{/other_user}","gists_url":"https://api.github.com/users/foxmask/gists{/gist_id}","starred_url":"https://api.github.com/users/foxmask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxmask/subscriptions","organizations_url":"https://api.github.com/users/foxmask/orgs","repos_url":"https://api.github.com/users/foxmask/repos","events_url":"https://api.github.com/users/foxmask/events{/privacy}","received_events_url":"https://api.github.com/users/foxmask/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T20:57:57Z","updated_at":"2015-11-17T20:57:57Z","body":"If you use the default celery settings I made, wait until 22:00 to check all the celery tasks"}}