Update for the mailing list. In this last problem uwsgi was not installed in the correct location. I had to fix this manually, the fix was:
sudo pip uninstall uwsgi cd /opt/openwisp source env/bin/activate pip install uwsgi supervisorctl reload I couldn't understand if that's a generalised issue that happens for Ubuntu 15 or not. Anyway, I share this here so that if it happens again we know how to fix it. If anyone can test the playbook on a clean Ubuntu 15 VM and let me know if the issue can be replicated please let me know. Federico On Monday, March 6, 2017 at 8:13:51 PM UTC+1, Federico Capoano wrote: > > Try running manually these two commands: > > service nginx restart > supervisorctl reload > > Does the situation change? > > If not, I'm afraid the only way I can do some debugging is to get in. I'd > like to understand if this is a general issue that happens on ubuntu 15 or > not. > > Federico > > On Mon, Mar 6, 2017 at 8:08 PM Alvaro Mende wrote: > >> Dear Federico, >> >> Now the installation run like a charm (but, dont work as spected): >> >> >> root@crushmind:~/openwisp2-ansible-playbook# ansible-playbook -i hosts >> playbook.yml -u tabako -k --ask-sudo-pass >> SSH password: >> SUDO password[defaults to SSH password]: >> >> PLAY >> *************************************************************************** >> >> TASK [setup] >> ******************************************************************* >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : include] >> ******************************************** >> included: /etc/ansible/roles/openwisp.openwisp2/tasks/apt.yml for >> 132.148.88.35 >> >> TASK [openwisp.openwisp2 : Update APT package cache] >> *************************** >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : Install system packages] >> **************************** >> ok: [132.148.88.35] => (item=[u'sudo', u'python-software-properties', >> u'build-essential', u'sqlite3', u'supervisor', u'nginx', u'openssl', >> u'libssl-dev', u'libffi-dev', u'python-dev']) >> >> TASK [openwisp.openwisp2 : Install acl if acting as non-root user] >> ************* >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : ensure supervisor is started] >> *********************** >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : Install python2 packages] >> *************************** >> ok: [132.148.88.35] => (item=[u'python-pip', u'python-dev', >> u'python-virtualenv']) >> >> TASK [openwisp.openwisp2 : Install python3 packages] >> *************************** >> >> skipping: [132.148.88.35] => (item=[]) >> >> TASK [openwisp.openwisp2 : Install python wheel (optional, allowed to >> fail)] *** >> ok: [132.148.88.35] => (item=[u'python-wheel', u'python3-wheel']) >> >> TASK [openwisp.openwisp2 : Install python3-virtualenv] >> ************************* >> skipping: [132.148.88.35] => (item=[]) >> >> TASK [openwisp.openwisp2 : Install git if using development version of >> any openwisp module] *** >> skipping: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : include] >> ******************************************** >> included: /etc/ansible/roles/openwisp.openwisp2/tasks/pip.yml for >> 132.148.88.35 >> >> TASK [openwisp.openwisp2 : Update pip & related tools] >> ************************* >> changed: [132.148.88.35] => (item=pip) >> changed: [132.148.88.35] => (item=setuptools) >> ok: [132.148.88.35] => (item=wheel) >> >> >> TASK [openwisp.openwisp2 : Install stable version of >> django-netjsonconfig] ***** >> ok: [132.148.88.35] => (item=django-netjsonconfig) >> >> TASK [openwisp.openwisp2 : Install development version of >> django-netjsonconfig] >> skipping: [132.148.88.35] => (item=git+git:// >> github.com/openwisp/django-netjsonconfig#egg=django-netjsonconfig) >> >> TASK [openwisp.openwisp2 : Install development version of netjsonconfig] >> ******* >> skipping: [132.148.88.35] => (item=git+git:// >> github.com/openwisp/netjsonconfig#egg=netjsonconfig) >> >> TASK [openwisp.openwisp2 : Install extra django apps] >> ************************** >> ok: [132.148.88.35] => (item=django_extensions) >> >> TASK [openwisp.openwisp2 : Install uwsgi] >> ************************************** >> ok: [132.148.88.35] => (item=uwsgi) >> >> TASK [openwisp.openwisp2 : Install psycopg2] >> *********************************** >> skipping: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : Install MySQL-python] >> ******************************* >> skipping: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : Install raven (sentry client)] >> ********************** >> >> skipping: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : include] >> ******************************************** >> included: /etc/ansible/roles/openwisp.openwisp2/tasks/django.yml for >> 132.148.88.35 >> >> TASK [openwisp.openwisp2 : create /opt/openwisp2] >> ****************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : create "/opt/openwisp2/openwisp2"] >> ****************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : create "/opt/openwisp2/log"] >> ************************ >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : manage.py] >> ****************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : __init__.py] >> **************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : urls.py] >> ******************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : wsgi.py] >> ******************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : include] >> ******************************************** >> included: >> /etc/ansible/roles/openwisp.openwisp2/tasks/django_secret_key.yml for >> 132.148.88.35 >> >> TASK [openwisp.openwisp2 : upload generate_django_secret_key.py script] >> ******** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : generate new django SECRET_KEY] >> ********************* >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : get django SECRET_KEY] >> ****************************** >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : set permission to secret key file] >> ****************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : set secret_key fact] >> ******************************** >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : settings.py] >> **************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : migrate] >> ******************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : set permissions to sqlite db] >> *********************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : collectstatic] >> ************************************** >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : create_superuser.py] >> ******************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : create superuser (only if no superuser is >> present)] * >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : include] >> ******************************************** >> included: /etc/ansible/roles/openwisp.openwisp2/tasks/supervisor.yml for >> 132.148.88.35 >> >> TASK [openwisp.openwisp2 : uwsgi.ini] >> ****************************************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : supervisor uwsgi] >> *********************************** >> >> ok: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : include] >> ******************************************** >> included: /etc/ansible/roles/openwisp.openwisp2/tasks/nginx.yml for >> 132.148.88.35 >> >> TASK [openwisp.openwisp2 : create "/opt/openwisp2/public_html"] >> **************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : create "/opt/openwisp2/ssl"] >> ************************ >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : create SSL cert if not exists yet] >> ****************** >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : nginx site available] >> ******************************* >> changed: [132.148.88.35] >> >> TASK [openwisp.openwisp2 : nginx site enabled] >> ********************************* >> changed: [132.148.88.35] >> >> RUNNING HANDLER [openwisp.openwisp2 : reload supervisor] >> *********************** >> changed: [132.148.88.35] >> >> RUNNING HANDLER [openwisp.openwisp2 : restart nginx] >> *************************** >> changed: [132.148.88.35] >> >> PLAY RECAP >> ********************************************************************* >> 132.148.88.35 : ok=44 changed=24 unreachable=0 >> failed=0 >> >> >> >> >> >> then i open my browser, go to /admin and nothing! >> >> in the server the directory public_html is empty: >> >> *root@s132:/opt/openwisp2/public_html# ls -la* >> total 8 >> drwxr-xr-x 2 root root 4096 Mar 6 12:02 . >> drwxrwxr-x 8 root www-data 4096 Mar 6 12:02 .. >> >> >> *root@s132:/opt/openwisp2# du -h* >> 32K ./openwisp2 >> 12K ./ssl >> 4.0K ./env/local >> 16K ./env/lib/python2.7/distutils >> 52K ./env/lib/python2.7/site-packages/setuptools-34.3.1.dist-info >> 64K ./env/lib/python2.7/site-packages/pip-9.0.1.dist-info >> 64K ./env/lib/python2.7/site-packages/pip/compat >> 28K ./env/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches >> 152K ./env/lib/python2.7/site-packages/pip/_vendor/cachecontrol >> 88K ./env/lib/python2.7/site-packages/pip/_vendor/colorama >> 224K ./env/lib/python2.7/site-packages/pip/_vendor/pkg_resources >> 1.3M >> ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet >> 84K >> ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib >> 20K >> ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname >> 124K >> ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages >> 132K >> ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util >> 600K >> ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3 >> 1.9M ./env/lib/python2.7/site-packages/pip/_vendor/requests/packages >> 2.6M ./env/lib/python2.7/site-packages/pip/_vendor/requests >> 48K ./env/lib/python2.7/site-packages/pip/_vendor/progress >> 164K ./env/lib/python2.7/site-packages/pip/_vendor/packaging >> 304K ./env/lib/python2.7/site-packages/pip/_vendor/distlib/_backport >> 1.4M ./env/lib/python2.7/site-packages/pip/_vendor/distlib >> 132K >> ./env/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders >> 88K ./env/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers >> 124K ./env/lib/python2.7/site-packages/pip/_vendor/html5lib/filters >> 36K ./env/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie >> 28K >> ./env/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters >> 1.1M ./env/lib/python2.7/site-packages/pip/_vendor/html5lib >> 84K ./env/lib/python2.7/site-packages/pip/_vendor/webencodings >> 84K ./env/lib/python2.7/site-packages/pip/_vendor/lockfile >> 6.7M ./env/lib/python2.7/site-packages/pip/_vendor >> 196K ./env/lib/python2.7/site-packages/pip/req >> 20K ./env/lib/python2.7/site-packages/pip/models >> 28K ./env/lib/python2.7/site-packages/pip/operations >> 200K ./env/lib/python2.7/site-packages/pip/utils >> 108K ./env/lib/python2.7/site-packages/pip/vcs >> 180K ./env/lib/python2.7/site-packages/pip/commands >> 7.8M ./env/lib/python2.7/site-packages/pip >> 224K ./env/lib/python2.7/site-packages/pkg_resources >> 32K ./env/lib/python2.7/site-packages/pyparsing-2.2.0.dist-info >> 548K ./env/lib/python2.7/site-packages/setuptools/command >> 1.5M ./env/lib/python2.7/site-packages/setuptools >> 11M ./env/lib/python2.7/site-packages >> 11M ./env/lib/python2.7 >> 2.9M ./env/lib/python-wheels >> 14M ./env/lib >> 3.4M ./env/bin >> 4.0K ./env/include >> 17M ./env >> 12K ./log >> 4.0K ./public_html >> 16K ./static/django-netjsonconfig/css >> 176K ./static/django-netjsonconfig/js >> 196K ./static/django-netjsonconfig >> 68K ./static/ui/openwisp/images >> 72K ./static/ui/openwisp >> 76K ./static/ui >> 60K ./static/sortedm2m >> 8.0K ./static/django_extensions/css >> 48K ./static/django_extensions/js >> 8.0K ./static/django_extensions/img >> 68K ./static/django_extensions >> 68K ./static/admin/css >> 200K ./static/admin/js/vendor/xregexp >> 348K ./static/admin/js/vendor/jquery >> 552K ./static/admin/js/vendor >> 36K ./static/admin/js/admin >> 716K ./static/admin/js >> 12K ./static/admin/img/gis >> 92K ./static/admin/img >> 264K ./static/admin/fonts >> 1.2M ./static/admin >> 8.0K ./static/django-x509/css >> 12K ./static/django-x509 >> 1.6M ./static >> 19M . >> >> >> i feel so close!!!! hahaha please your help and like always thanks in >> advance for your time... >> >> best regards, >> Alvaro >> >> 2017-03-06 15:15 GMT-03:00 Federico Capoano: >> >>> It's really weird. The virualenv is built with python3 but something >>> believes it's running python2. >>> >>> Was this a fresh VM? >>> >>> Try adding: >>> >>> openwisp2_python: python2.7 >>> >>> To your playbook vars section. >>> >>> Then delete again /opt/openwisp2, run the playbook again and let me know. >>> >>> Federico >>> >> -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
