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

"Permission denied" error while running fab vagrant highstate #113

Closed
tobiasmcnulty opened this issue Jul 22, 2014 · 6 comments
Closed

"Permission denied" error while running fab vagrant highstate #113

tobiasmcnulty opened this issue Jul 22, 2014 · 6 comments

Comments

@tobiasmcnulty
Copy link
Member

[33.33.33.10] out: ----------
[33.33.33.10] out:           ID: syncdb
[33.33.33.10] out:     Function: cmd.run
[33.33.33.10] out:         Name: /var/www/myvoice/manage.sh syncdb --noinput
[33.33.33.10] out:       Result: False
[33.33.33.10] out:      Comment: Command "/var/www/myvoice/manage.sh syncdb --noinput" run
[33.33.33.10] out:      Changes:   
[33.33.33.10] out:               ----------
[33.33.33.10] out:               pid:
[33.33.33.10] out:                   809
[33.33.33.10] out:               retcode:
[33.33.33.10] out:                   1
[33.33.33.10] out:               stderr:
[33.33.33.10] out:                   Traceback (most recent call last):
[33.33.33.10] out:                     File "/var/www/myvoice/source/manage.py", line 10, in <module>
[33.33.33.10] out:                       execute_from_command_line(sys.argv)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
[33.33.33.10] out:                       utility.execute()
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
[33.33.33.10] out:                       self.fetch_command(subcommand).run_from_argv(self.argv)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
[33.33.33.10] out:                       commands = get_commands()
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
[33.33.33.10] out:                       apps = settings.INSTALLED_APPS
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
[33.33.33.10] out:                       self._setup(name)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 50, in _setup
[33.33.33.10] out:                       self._configure_logging()
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 80, in _configure_logging
[33.33.33.10] out:                       logging_config_func(self.LOGGING)
[33.33.33.10] out:                     File "/usr/lib/python2.7/logging/config.py", line 777, in dictConfig
[33.33.33.10] out:                       dictConfigClass(config).configure()
[33.33.33.10] out:                     File "/usr/lib/python2.7/logging/config.py", line 575, in configure
[33.33.33.10] out:                       '%r: %s' % (name, e))
[33.33.33.10] out:                   ValueError: Unable to configure handler 'file': [Errno 13] Permission denied: '/vagrant/myvoice.log'
[33.33.33.10] out:               stdout:
[33.33.33.10] out:                   
[33.33.33.10] out: ----------
@tobiasmcnulty
Copy link
Member Author

Nevermind, this is probably on our end...

@vkurup
Copy link
Contributor

vkurup commented Jul 22, 2014

Hmm... I wouldn't be so sure. I think I've run into this error before, but had assumed it was my error.

@tobiasmcnulty
Copy link
Member Author

In this case the issue was that the log path I was using was inside the project directory. Since Vagrant uses your local code, my local log (from runserver) was showing up inside the vagrant box. Both local environments (vagrant and runserver) use the same settings, so I changed them to use /tmp/projectname.log as the logfile. This seems to have solved it.

@tobiasmcnulty
Copy link
Member Author

Just as I hit send, another one came in:

[33.33.33.10] out: ----------
[33.33.33.10] out:           ID: collectstatic
[33.33.33.10] out:     Function: cmd.run
[33.33.33.10] out:         Name: /var/www/myvoice/manage.sh collectstatic --noinput
[33.33.33.10] out:       Result: False
[33.33.33.10] out:      Comment: Command "/var/www/myvoice/manage.sh collectstatic --noinput" run
[33.33.33.10] out:      Changes:   
[33.33.33.10] out:               ----------
[33.33.33.10] out:               pid:
[33.33.33.10] out:                   2379
[33.33.33.10] out:               retcode:
[33.33.33.10] out:                   1
[33.33.33.10] out:               stderr:
[33.33.33.10] out:                   Traceback (most recent call last):
[33.33.33.10] out:                     File "/var/www/myvoice/source/manage.py", line 10, in <module>
[33.33.33.10] out:                       execute_from_command_line(sys.argv)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
[33.33.33.10] out:                       utility.execute()
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
[33.33.33.10] out:                       self.fetch_command(subcommand).run_from_argv(self.argv)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
[33.33.33.10] out:                       self.execute(*args, **options.__dict__)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 280, in execute
[33.33.33.10] out:                       translation.activate('en-us')
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 130, in activate
[33.33.33.10] out:                       return _trans.activate(language)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate
[33.33.33.10] out:                       _active.value = translation(language)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation
[33.33.33.10] out:                       default_translation = _fetch(settings.LANGUAGE_CODE)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch
[33.33.33.10] out:                       app = import_module(appname)
[33.33.33.10] out:                     File "/var/www/myvoice/env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
[33.33.33.10] out:                       __import__(name)
[33.33.33.10] out:                   ImportError: No module named debug_toolbar
[33.33.33.10] out:               stdout:

I can probably fix it, I'm not sure what the intended behavior is, here; use dev requirements for vagrant or production?

@tobiasmcnulty tobiasmcnulty reopened this Jul 22, 2014
@mlavin
Copy link
Contributor

mlavin commented Oct 3, 2014

The intended behavior is to use vagrant as a local version of a production environment not to be a replacement for the local runserver.

@mlavin
Copy link
Contributor

mlavin commented May 8, 2015

#155 makes the change for Vagrant to use production-like settings and requirements. Closing this issue.

@mlavin mlavin closed this as completed May 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants