Can anyone knows: why am getting this error while installing openwisp2 in ubuntu 18.04

78 views
Skip to first unread message

Logunath K

unread,
Mar 30, 2023, 5:09:43 AM3/30/23
to OpenWISP
TASK [openwisp.openwisp2-dev : migrate] ********************************************************************************************************************************************************************
[WARNING]: Unable to use /var/www/.ansible/tmp as temporary directory, failing back to system: [Errno 13] Permission denied: '/var/www/.ansible'
fatal: [---------------]: FAILED! => {"changed": false, "cmd": "./manage.py migrate --noinput", "msg": "\n:stderr: Traceback (most recent call last):\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", line 354, in run_from_argv\n    self.execute(*args, **cmd_options)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", line 398, in execute\n    output = self.handle(*args, **options)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", line 86, in wrapped\n    saved_locale = translation.get_language()\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/translation/__init__.py\", line 254, in get_language\n    return _trans.get_language()\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/translation/__init__.py\", line 57, in __getattr__\n    if settings.USE_I18N:\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", line 82, in __getattr__\n    self._setup(name)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", line 69, in _setup\n    self._wrapped = Settings(settings_module)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", line 170, in __init__\n    mod = importlib.import_module(self.SETTINGS_MODULE)\n  File \"/opt/openwisp2/env/lib/python3.7/importlib/__init__.py\", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 1006, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 983, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 953, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"<frozen importlib._bootstrap>\", line 1006, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 983, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 967, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 677, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/opt/openwisp2/openwisp2/__init__.py\", line 1, in <module>\n    from .celery import app as celery_app\n  File \"/opt/openwisp2/openwisp2/celery.py\", line 3, in <module>\n    from celery import Celery\nImportError: cannot import name 'Celery' from 'celery' (/opt/openwisp2/env/lib/python3.7/site-packages/celery/__init__.py)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"./manage.py\", line 10, in <module>\n    execute_from_command_line(sys.argv)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line\n    utility.execute()\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/__init__.py\", line 413, in execute\n    self.fetch_command(subcommand).run_from_argv(self.argv)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/core/management/base.py\", line 367, in run_from_argv\n    connections.close_all()\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/db/utils.py\", line 208, in close_all\n    for alias in self:\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/connection.py\", line 73, in __iter__\n    return iter(self.settings)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/functional.py\", line 48, in __get__\n    res = instance.__dict__[self.name] = self.func(instance)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/connection.py\", line 45, in settings\n    self._settings = self.configure_settings(self._settings)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/db/utils.py\", line 144, in configure_settings\n    databases = super().configure_settings(databases)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/utils/connection.py\", line 50, in configure_settings\n    settings = getattr(django_settings, self.settings_name)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", line 82, in __getattr__\n    self._setup(name)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", line 69, in _setup\n    self._wrapped = Settings(settings_module)\n  File \"/opt/openwisp2/env/lib/python3.7/site-packages/django/conf/__init__.py\", line 170, in __init__\n    mod = importlib.import_module(self.SETTINGS_MODULE)\n  File \"/opt/openwisp2/env/lib/python3.7/importlib/__init__.py\", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 1006, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 983, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 953, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"<frozen importlib._bootstrap>\", line 1006, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 983, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 967, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 677, in _load_unlocked\n  File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/opt/openwisp2/openwisp2/__init__.py\", line 1, in <module>\n    from .celery import app as celery_app\n  File \"/opt/openwisp2/openwisp2/celery.py\", line 3, in <module>\n    from celery import Celery\nImportError: cannot import name 'Celery' from 'celery' (/opt/openwisp2/env/lib/python3.7/site-packages/celery/__init__.py)\n", "path": "/opt/openwisp2/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin", "syspath": ["/tmp/ansible_django_manage_payload_t6_yzlkx/ansible_django_manage_payload.zip", "/usr/lib/python36.zip", "/usr/lib/python3.6", "/usr/lib/python3.6/lib-dynload", "/usr/local/lib/python3.6/dist-packages", "/usr/lib/python3/dist-packages"]}

PLAY RECAP *************************************************************************************************************************************************************************************************
--------          : ok=79   changed=5    unreachable=0    failed=1    skipped=45   rescued=0    ignored=2 

Federico Capoano

unread,
Mar 30, 2023, 11:04:24 AM3/30/23
to open...@googlegroups.com
The main error is "[Errno 13] Permission denied: '/var/www/.ansible'".
Ensure you are escalating to root privileges with --become, more info at https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html .

I hope this helps.

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/7b4d73a5-703b-46a7-9053-16a79f654ef3n%40googlegroups.com.

Logunath K

unread,
Mar 31, 2023, 2:38:30 PM3/31/23
to open...@googlegroups.com
Thank you Federico. I install it  but PLAY RECAP *************************************************************************************************************************************************************************************************
[----------------]            : ok=110  changed=7    unreachable=0    failed=0    skipped=83   rescued=0    ignored=0 .  Without any errors it's installed. I am able to see dashboard                                                                                                                     

But https://------------------/admin/openwisp_users/organization/  -> am able to see DEFAULT org also and some side bar tabs works
But https://-----------------/admin/config/device/ -> It's not responding it will through SERVER ERROR 403 and some of the things not working like access credentials, vpn server, template.                                                                                                    I did sudo supervisorctl restart all and I checked nginx all are fine.               
I am attaching Log files of openwisp2: Is it the Static file related erros  or something else.             
image.png
Thanks in advance.


Federico Capoano

unread,
Apr 1, 2023, 11:03:27 AM4/1/23
to open...@googlegroups.com
That doesn't look right, it's complaining about a feature which is not shipped in the stable (released) version but only available in the development version.
What does your playbook look like? Can you paste the contents here please?

Fed

Reply all
Reply to author
Forward
0 new messages