Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit installation fails (sync db) #479

Closed
landam opened this issue Jan 13, 2016 · 11 comments
Closed

unit installation fails (sync db) #479

landam opened this issue Jan 13, 2016 · 11 comments

Comments

@landam
Copy link
Collaborator

landam commented Jan 13, 2016

When installing unit from scratch the installation process fails with

TASK [client-web : Sync database] **********************************************
fatal: [gislab-unit-roudnice]: FAILED! => {"changed": false, "cmd": "./manage.py syncdb --noinput --settings=djproject.settings", "failed": true, "msg": "[Errno 13] Permission denied", "rc": 13}

RUNNING HANDLER [client-web : service gislab-web restart] **********************

PLAY RECAP *********************************************************************
gislab-unit-roudnice       : ok=316  changed=262  unreachable=0    failed=1   
@imincik
Copy link
Collaborator

imincik commented Jan 13, 2016

Can't replicate using Vagrant.

Can you try to run "./manage.py syncdb --noinput --settings=djproject.settings" by hand ?

@imincik imincik added this to the version 1.0 milestone Jan 13, 2016
@imincik imincik self-assigned this Jan 13, 2016
@landam
Copy link
Collaborator Author

landam commented Jan 21, 2016

like this?

 sudo python /opt/gislab/system/clients/web/www/manage.py syncdb --noinput --settings=djproject.settings
Traceback (most recent call last):
  File "/opt/gislab/system/clients/web/www/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

@imincik
Copy link
Collaborator

imincik commented Jan 21, 2016

@landam, Python virtualenv must be activated before:

$ source /opt/gislab/clients/web/virtualenv/gislab-web/bin/activate

@landam
Copy link
Collaborator Author

landam commented Jan 22, 2016

/opt/gislab/clients/web/virtualenv/gislab-web/bin/activate

is not found at my unit. I used:

source /opt/gislab/system/clients/web/virtualenv/gislab-web/bin/activate
python /opt/gislab/system/clients/web/www/manage.py syncdb --noinput --settings=djproject.settings
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table django_content_type
Creating table django_session
Creating table viewer_gislabuser_groups
Creating table viewer_gislabuser_user_permissions
Creating table viewer_gislabuser
Creating table viewer_project_registry
Creating table storage_ball
Creating table storage_drawing
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

works OK. I tried ansible again and it failed with same error message.

TASK [client-web : Sync database] **********************************************
fatal: [gislab-unit-roudnice]: FAILED! => {"changed": false, "cmd": "./manage.py syncdb --noinput --settings=djproject.settings", "failed": true, "msg": "[Errno 13] Permission denied", "rc": 13}

PLAY RECAP *********************************************************************
gislab-unit-roudnice       : ok=287  changed=97   unreachable=0    failed=1   

@imincik
Copy link
Collaborator

imincik commented Jan 22, 2016

@landam , I have no idea. Can you SSH to machine and try to look where "Permission denied" is coming from (Django or from PostgreSQL database) ? Try to look at /storage/log/syslog

@imincik
Copy link
Collaborator

imincik commented Jan 22, 2016

@landam, can you try once again with GISLAB_DEBUG_INSTALL: yes ?

Also, please check your Ansible version - $ ansible --version

It seems that my Ansible is executing this command differently:

cmd": "python manage.py syncdb --noinput --settings=djproject.settings

@imincik
Copy link
Collaborator

imincik commented Jan 22, 2016

Similar issue: lorin/ansiblebook#5

@landam
Copy link
Collaborator Author

landam commented Jan 23, 2016

From documentation (all) I don't know where debug message should go, the output of ansible is the same, so probably somewhere else then to stdout?

I have

ansible 2.0.0.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

@imincik
Copy link
Collaborator

imincik commented Jan 23, 2016

@landam, Ansible 2 is most probably the issue. Please downgrade to Ansible 1. I hope it will be OK than.

@landam
Copy link
Collaborator Author

landam commented Jan 23, 2016

Thanks, I downgraded Ansible to 1.7 and it works.

@landam landam closed this as completed Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants