ndarville / pony-forum

A modern alternative to ancient forum CMSes like vBulletin and PHPBB in Python on Django. (Alpha stage.) (NB: dotCloud have since removed their free Sandbox tier.)
http://pony-forum.com
26 stars 7 forks source link

Connection error on all platforms, online and offline #50

Closed ndarville closed 12 years ago

ndarville commented 12 years ago

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 doesn't seem like a DB error, seems like the naive implementation of the development http server having timing issue. If your requests take long enough it'll throw that error.

The Fix

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:

proxy_intercept_errors off;

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

  1. http://stackoverflow.com/questions/10639769/how-can-i-find-out-what-500-error-am-i-getting-in-django/10640521#10640521
  2. http://stackoverflow.com/questions/7912672/django-broken-pipe-in-debug-mode/7927004#7927004
  3. http://stackoverflow.com/questions/6929589/broken-pipe-in-django-dev-server-what-does-this-actually-mean/6937032#6937032

    Errors

    dotCloud

22:27:48 [www.0] psycopg2.OperationalError: could not connect to server: Connection refused 
22:27:48 [www.0] Is the server running on host "ponyforum-darville.dotcloud.com" and accepting 
22:27:48 [www.0] TCP/IP connections on port 29157? 
22:27:48 [www.0] could not connect to server: Connection refused 
22:27:48 [www.0] Is the server running on host "ponyforum-darville.dotcloud.com" and accepting 
22:27:48 [www.0] TCP/IP connections on port 29157? 
22:27:48 [www.0] could not connect to server: Connection refused 
22:27:48 [www.0] Is the server running on host "ponyforum-darville.dotcloud.com" and accepting 
22:27:48 [www.0] TCP/IP connections on port 29157? 
22:27:48 [www.0]

Ubuntu

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 86, in run
    self.finish_response()
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 127, in finish_response
    self.write(data)
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 210, in write
    self.send_headers()
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 268, in send_headers
    self.send_preamble()
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 192, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "/usr/lib/python2.7/socket.py", line 324, in write
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 43092)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 139, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
    self.wfile.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

Windows

(...)
----------------------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
    self.send_headers()
  File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
    self.send_preamble()
  File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\socket.py", line 324, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 50768)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 139
, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self.wfile.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
----------------------------------------
[11/Jun/2012 17:26:29] "GET /static/favicon.ico HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/css/style.css HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/css/reset.css HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/css/iphone.css HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/js/ios-orientationchange-fix.js HTTP/1.0" 30
4 0
[11/Jun/2012 17:26:29] "GET / HTTP/1.0" 200 202674
[11/Jun/2012 17:26:29] "GET /static/glyphish/123-id-card.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/146-gavel.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/28-star.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/44-shoebox.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/191-collection.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/158-wrench-2.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/96-book.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/06-magnify.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/54-lock.png HTTP/1.0" 304 0
[11/Jun/2012 17:26:29] "GET /static/glyphish/138-scales.png HTTP/1.0" 304 0
Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
Traceback (most recent call last):
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
    self.finish_response()
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
  File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
    self.write(data)
    self.send_headers()
  File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
  File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
Traceback (most recent call last):
    self.send_headers()
    self.send_preamble()
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
  File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
Traceback (most recent call last):
    self.send_preamble()
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
  File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble
  File "C:\Python27\lib\socket.py", line 324, in write
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.write(data)
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
    self.flush()
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
  File "C:\Python27\lib\socket.py", line 324, in write
    self.write(data)
Traceback (most recent call last):
  File "C:\Python27\lib\socket.py", line 303, in flush
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
    self.send_headers()
    self.flush()
  File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
  File "C:\Python27\lib\socket.py", line 303, in flush
    self.send_headers()
    self.finish_response()
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
  File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
    self.send_preamble()
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
  File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
  File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response
    self.send_headers()
- --------------------------------------- File "C:\Python27\lib\wsgiref\handlers
.py", line 192, in send_preamble

error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
E xception happened during processing of request from   self.send_preamble()
     self.write(data)
(  File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
' 1   'Date: %s\r\n' % format_date_time(time.time())
2 7 File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble
. 0 File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write
. 0   self.send_preamble()
. 1 File "C:\Python27\lib\socket.py", line 324, in write
'---------------------------------------- ,  File "C:\Python27\lib\wsgiref\handl
ers.py", line 192, in send_preamble

 50730   'Date: %s\r\n' % format_date_time(time.time())
E xception happened during processing of request from   'Date: %s\r\n' % format_
date_time(time.time())
)     self.flush()

   self.send_headers()
( ' File "C:\Python27\lib\socket.py", line 324, in write
1 27 File "C:\Python27\lib\socket.py", line 324, in write
. 0 File "C:\Python27\lib\socket.py", line 303, in flush
.T0raceback (most recent call last):
 .1' File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers
,     self.flush()
50734)    self.flush()

    self._sock.sendall(view[write_offset:write_offset+buffer_size])
  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
    self.send_preamble()
  File "C:\Python27\lib\socket.py", line 303, in flush
  File "C:\Python27\lib\socket.py", line 303, in flush
Traceback (most recent call last):
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
    self.finish_request(request, client_address)
  File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
- ---------------------------------------   self._sock.sendall(view[write_offset
:write_offset+buffer_size])
e
rror: [Errno 10053] An established connection was aborted by the software in you
r host machine
E xception happened during processing of request from File "C:\Python27\lib\sock
et.py", line 324, in write
     self.finish_request(request, client_address)
(    self.RequestHandlerClass(request, client_address, self)
'e1rror: [Errno 10053] An established connection was aborted by the software in
your host machine
2 7   self.flush()
. 0 File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
. 0 File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 1
39, in __init__
.1'----------------------------------------  File "C:\Python27\lib\socket.py", l
ine 303, in flush
,
   self.RequestHandlerClass(request, client_address, self)
  50724   super(WSGIRequestHandler, self).__init__(*args, **kwargs)
E xception happened during processing of request from   self._sock.sendall(view[
write_offset:write_offset+buffer_size])
- --------------------------------------- File "C:\Python27\lib\site-packages\dj
ango\core\servers\basehttp.py", line 139, in __init__
)  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
 e
rror: [Errno 10053] An established connection was aborted by the software in you
r host machine

 (   super(WSGIRequestHandler, self).__init__(*args, **kwargs)
E xception happened during processing of request from   self.finish()
'T1raceback (most recent call last):
2 7 File "C:\Python27\lib\SocketServer.py", line 641, in __init__
. 0 File "C:\Python27\lib\SocketServer.py", line 694, in finish
.0.1' ----------------------------------------,  ( File "C:\Python27\lib\SocketS
erver.py", line 582, in process_request_thread

    self.finish()
50728    self.wfile.flush()
'127.0. 0 File "C:\Python27\lib\SocketServer.py", line 694, in finish
. 1 File "C:\Python27\lib\socket.py", line 303, in flush
' E   self.finish_request(request, client_address)
xception happened during processing of request from) ,    self.wfile.flush()
  50726   self._sock.sendall(view[write_offset:write_offset+buffer_size])

 ( File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
)  File "C:\Python27\lib\socket.py", line 303, in flush
'e1rror: [Errno 10053] An established connection was aborted by the software in
your host machine
2T7.raceback (most recent call last):
0 .   self.RequestHandlerClass(request, client_address, self)
0. 1   self._sock.sendall(view[write_offset:write_offset+buffer_size])
'  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread

 File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 139,
 in __init__
, e-rror: [Errno 10053] An established connection was aborted by the software in
 your host machine
--------------------------------------- 50732   self.finish_request(request, cli
ent_address)
----------------------------------------T
raceback (most recent call last):
)
   super(WSGIRequestHandler, self).__init__(*args, **kwargs)

  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
Traceback (most recent call last):
    self.RequestHandlerClass(request, client_address, self)
    self.finish_request(request, client_address)
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 139
, in __init__
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self.finish_request(request, client_address)
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
    self.RequestHandlerClass(request, client_address, self)
    self.wfile.flush()
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 139
, in __init__
  File "C:\Python27\lib\socket.py", line 303, in flush
    self.RequestHandlerClass(request, client_address, self)
    self.finish()
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 139
, in __init__
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
    self.wfile.flush()
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
  File "C:\Python27\lib\socket.py", line 303, in flush
 -   self.finish()
---------------------------------------    self.finish()

 File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
    self.wfile.flush()
 -   self.wfile.flush()
---------------------------------------  File "C:\Python27\lib\socket.py", line
303, in flush
  File "C:\Python27\lib\socket.py", line 303, in flush

    self._sock.sendall(view[write_offset:write_offset+buffer_size])
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
--------------------------------------------------------------------------------

[11/Jun/2012 17:26:37] "GET /img/back.png HTTP/1.0" 404 372479
[11/Jun/2012 17:26:37] "GET /img/close.png HTTP/1.0" 404 372482
[11/Jun/2012 17:26:37] "GET /img/back_hover.png HTTP/1.0" 404 372497
[11/Jun/2012 17:26:37] "GET /img/djdt_vertical.png HTTP/1.0" 404 372506
[11/Jun/2012 17:26:37] "GET /img/indicator.png HTTP/1.0" 404 372494
[11/Jun/2012 17:26:37] "GET /img/close_hover.png HTTP/1.0" 404 372500

On Ubuntu Laptop on Different Network


11:33:19 [www.0] Deploying build revision git-dfcc6ce...
11:33:27 [www.0] Running postinstall script...
11:33:29 [www.0] /home/dotcloud/env/lib/python2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
11:33:29 [www.0]   import sha
11:33:29 [www.0] Traceback (most recent call last):
11:33:29 [www.0]   File "manage.py", line 9, in <module>
11:33:29 [www.0]     execute_from_command_line(sys.argv)
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
11:33:29 [www.0]     utility.execute()
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
11:33:29 [www.0]     self.fetch_command(subcommand).run_from_argv(self.argv)
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv
11:33:29 [www.0]     self.execute(*args, **options.__dict__)
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
11:33:29 [www.0]     output = self.handle(*args, **options)
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/base.py", line 371, in handle
11:33:29 [www.0]     return self.handle_noargs(**options)
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs
11:33:29 [www.0]     cursor = connection.cursor()
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/db/backends/__init__.py", line 308, in cursor
11:33:29 [www.0]     cursor = util.CursorWrapper(self._cursor(), self)
11:33:29 [www.0]   File "/home/dotcloud/env/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 177, in _cursor
11:33:29 [www.0]     self.connection = Database.connect(**conn_params)
11:33:29 [www.0] psycopg2.OperationalError: could not connect to server: Connection refused
11:33:29 [www.0]    Is the server running on host "ponyforum-darville.dotcloud.com" and accepting
11:33:29 [www.0]    TCP/IP connections on port 16178?
11:33:29 [www.0] could not connect to server: Connection refused
11:33:29 [www.0]    Is the server running on host "ponyforum-darville.dotcloud.com" and accepting
11:33:29 [www.0]    TCP/IP connections on port 16178?
11:33:29 [www.0] could not connect to server: Connection refused
11:33:29 [www.0]    Is the server running on host "ponyforum-darville.dotcloud.com" and accepting
11:33:29 [www.0]    TCP/IP connections on port 16178?
11:33:29 [www.0] 
11:33:30 [www.0] /home/dotcloud/env/lib/python2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
ndarville commented 12 years ago

Update

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.

ndarville commented 12 years ago

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 the syncdb for you.

Might be worth doing another push to see what that does for you.

ndarville commented 12 years ago

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:

ndarville commented 12 years ago

The problem disappeared again. ARGH