Closed ndarville closed 12 years ago
The problem---online---was created, when dotCloud's deployment server did not run manage.py syncdb
in postinstall
for some reason. The issue is resolved for now, but I have yet to receive word from dotCloud that this was permanently fixed. As such, I won't close the issue, until I have heard word from them.
The problem was on dotCloud’s side:
OK, can you try it now, it looks like you didn't run
syncdb
, and when I ran that it created a bunch of tables for you.when I go to https://app-myuser.dotcloud.com it seems to be working now..
Not sure why the
postinstall
didn't run thesyncdb
for you.Might be worth doing another push to see what that does for you.
Or not. The problem has emerged again. I will try to look into this by running sh postinstall
locally. So far, this is what I get:
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Traceback (most recent call last):
File "_postinstall/mkadmin.py", line 2, in <module>
from wsgi import *
ImportError: No module named wsgi
Traceback (most recent call last):
File "_postinstall/definesite.py", line 4, in <module>
from wsgi import *
ImportError: No module named wsgi
Traceback (most recent call last):
File "_postinstall/mkcategorythreadpost.py", line 3, in <module>
from wsgi import *
ImportError: No module named wsgi
mkdir: cannot create directory `/home/dotcloud': Permission denied
mkdir: cannot create directory `/home/dotcloud': Permission denied
Copying '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin/img/changelist-bg.gif'
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 163, in handle_noargs
collected = self.collect()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 113, in collect
handler(path, prefixed_path, storage)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 303, in copy_file
self.storage.save(prefixed_path, source_file)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/storage.py", line 45, in save
name = self._save(name, content)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/storage.py", line 168, in _save
os.makedirs(directory)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/home/dotcloud'
And here is postinstall
:
#!/bin/sh
python manage.py syncdb --noinput
python _postinstall/mkadmin.py
python _postinstall/definesite.py
python _postinstall/mkcategorythreadpost.py
mkdir -p /home/dotcloud/data/media /home/dotcloud/data/static
python manage.py collectstatic --noinput
According to the prompt, the first line of syncdb
runs flawlessly. Then, two errors emerge:
ImportError: No module named wsgi
mkdir: cannot create directory '/home/dotcloud': Permission denied
OSError: [Errno 13] Permission denied: '/home/dotcloud'</code>
The problem disappeared again. ARGH
Happens on both Windows/MySQL(see Windows) and Ubuntu/postgreSQL (see Ubuntu).
The Cause
Sources allege that this is a “known issue” that just happens and should be ignored as such. You can disregard the log errors in the terminal, but it becomes a problem, when it stops your deployment to such PaaS as dotCloud (see dotCloud). This also seems to go against the belief that this is a browser quirk.
Someone suggests:
It is hard to imagine that this is something that merely needs monkey-patching. However, in the case of PaaS, tweaking the nginx config has been suggested as so:
If this is an error caused by timeouts, an attempt should be made to deploy the instance from another internet connection.
Related Stack Overflow Threads
Errors
dotCloud
Ubuntu
Windows
On Ubuntu Laptop on Different Network