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

Vagrant provision fails in manage.py collectstatic and manage.py syncdb #776

Closed
thinkh opened this issue Nov 24, 2015 · 4 comments
Closed

Comments

@thinkh
Copy link

thinkh commented Nov 24, 2015

Running vagrant provision in the terminal results in the following log:

user@ubuntu:~/refinery-platform$ vagrant provision
==> default: Running provisioner: shell...
    default: Running: /tmp/vagrant-shell20151124-11175-1bd9008.sh
==> default: stdin: is not a tty
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: ruby-dev is already the newest version.
==> default: git is already the newest version.
==> default: 0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
==> default: Successfully installed librarian-puppet-2.2.1
==> default: 1 gem installed
==> default: Running provisioner: puppet...
==> default: Running Puppet with default.pp...
==> default: stdin: is not a tty
==> default: Notice: Compiled catalog for refinery.jku.at in environment production in 10.81 seconds
==> default: Warning: /Apt_key[Add key: F7B8CEA6056E8E56 from Apt::Source rabbitmq]: The id should be a full fingerprint (40 characters), see README.
==> default: Notice: /Stage[main]/Ui/Exec[npm_local_modules]/returns: executed successfully
==> default: Notice: /Stage[main]/Ui/Exec[bower_modules]/returns: executed successfully
==> default: Notice: /Stage[main]/Ui/Exec[grunt]/returns: executed successfully
==> default: Notice: /Stage[main]/Main/Exec[apache2-wsgi]/returns: executed successfully
==> default: Notice: /Stage[main]/Main/Exec[refinery-apache2]/returns: executed successfully
==> default: Notice: /Stage[main]/Main/Service[apache2]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Timezone/File[/etc/timezone]/content: content changed '{md5}28076efbe3eee21644ce11cb2e942a1a' to '{md5}99161e1c63ea65c29f328748a3b3440c'
==> default: Notice: /Stage[main]/Timezone/Exec[update_timezone]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Ui/Exec[collectstatic]/returns: Unknown command: 'collectstatic'
==> default: Notice: /Stage[main]/Ui/Exec[collectstatic]/returns: Type 'manage.py help' for usage.
==> default: Error: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py collectstatic --clear --noinput returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Ui/Exec[collectstatic]/returns: change from notrun to 0 failed: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py collectstatic --clear --noinput returned 1 instead of one of [0]
==> default: Notice: /Stage[main]/Main/Exec[supervisord]: Dependency Exec[collectstatic] has failures: true
==> default: Warning: /Stage[main]/Main/Exec[supervisord]: Skipping because of failed dependencies
==> default: Notice: /Stage[main]/Timezone/File[/etc/localtime]/ensure: ensure changed 'file' to 'link'
==> default: Notice: /Stage[main]/Owl2neo4j/Exec[owl2neo4j_wget]/returns: executed successfully
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns: Traceback (most recent call last):
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/vagrant/refinery/manage.py", line 10, in <module>
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     execute_from_command_line(sys.argv)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     utility.execute()
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     self.fetch_command(subcommand).run_from_argv(self.argv)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     klass = load_command_class(app_name, subcommand)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 77, in load_command_class
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     module = import_module('%s.management.commands.%s' % (app_name, name))
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     __import__(name)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 8, in <module>
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/core/management/sql.py", line 9, in <module>
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     from django.db import models
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/db/__init__.py", line 11, in <module>
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     self._setup(name)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in _setup
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     self._wrapped = Settings(settings_module)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     mod = importlib.import_module(self.SETTINGS_MODULE)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/home/vagrant/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     __import__(name)
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/vagrant/refinery/config/settings/dev.py", line 3, in <module>
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     from .base import *
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/vagrant/refinery/config/settings/base.py", line 429, in <module>
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     LIBS_DIR = get_setting("LIBS_DIR")
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:   File "/vagrant/refinery/config/settings/base.py", line 32, in get_setting
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns:     raise ImproperlyConfigured("Missing setting '{0}'".format(name))
==> default: Notice: /Stage[main]/Main/Exec[syncdb]/returns: django.core.exceptions.ImproperlyConfigured: Missing setting 'LIBS_DIR'
==> default: Error: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py syncdb --migrate --noinput returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Main/Exec[syncdb]/returns: change from notrun to 0 failed: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py syncdb --migrate --noinput returned 1 instead of one of [0]
==> default: Notice: /Stage[main]/Main/Exec[create_superuser]: Dependency Exec[syncdb] has failures: true
==> default: Warning: /Stage[main]/Main/Exec[create_superuser]: Skipping because of failed dependencies
==> default: Notice: /Stage[main]/Main/Exec[init_refinery]: Dependency Exec[syncdb] has failures: true
==> default: Warning: /Stage[main]/Main/Exec[init_refinery]: Skipping because of failed dependencies
==> default: Notice: /Stage[main]/Main/Exec[create_user]: Dependency Exec[syncdb] has failures: true
==> default: Warning: /Stage[main]/Main/Exec[create_user]: Skipping because of failed dependencies
==> default: Notice: Finished catalog run in 174.67 seconds
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

The following two logs are the errors:

==> default: Error: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py collectstatic --clear --noinput returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Ui/Exec[collectstatic]/returns: change from notrun to 0 failed: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py collectstatic --clear --noinput returned 1 instead of one of [0]
==> default: Error: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py syncdb --migrate --noinput returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Main/Exec[syncdb]/returns: change from notrun to 0 failed: /home/vagrant/.virtualenvs/refinery-platform/bin/python /vagrant/refinery/manage.py syncdb --migrate --noinput returned 1 instead of one of [0]

Running vagrant provision again results in the same error messages.

@hackdna hackdna added this to the Kingston milestone Nov 24, 2015
@hackdna hackdna self-assigned this Nov 24, 2015
@hackdna
Copy link
Member

hackdna commented Nov 24, 2015

This error is caused by missing LIBS_DIR setting in refinery/config/config.json. Please add it directly ("LIBS_DIR": "/opt",) or overwrite the file using refinery/config/config.json.sample then run vagrant provision again.

@thinkh
Copy link
Author

thinkh commented Nov 24, 2015

I added the missing LIBS_DIR setting and ran the provision again. The result is that I still get the same errors.

@hackdna
Copy link
Member

hackdna commented Nov 24, 2015

OK. Just to make sure the setting is added correctly, could you delete refinery/config/config.json and rerun vagrant provision? This will re-create it from the sample file.

@thinkh
Copy link
Author

thinkh commented Nov 24, 2015

Deleting the file and provisioning again worked without error messages. Thanks!

@thinkh thinkh closed this as completed Nov 24, 2015
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