I'm doing a new OSQA installation on WebFaction (using the OSQA Install Script) and I'm getting the following error when I browse to the URL:

500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

I've had a look at the Apache logs,

[Wed Apr 13 10:32:08 2011] [warn] mod_wsgi: Compiled for Python/2.6.
[Wed Apr 13 10:32:08 2011] [warn] mod_wsgi: Runtime using Python/2.6.5.
[Wed Apr 13 10:32:08 2011] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.2 Python/2.6.5 configured -- resuming normal operations
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1] mod_wsgi (pid=29403): Exception occurred processing WSGI script '/home/merspi/webapps/osqa/osqa.wsgi'.
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1] Traceback (most recent call last):
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/core/handlers/wsgi.py", line 230, in __call__
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     self.load_middleware()
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/core/handlers/base.py", line 40, in load_middleware
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     mod = import_module(mw_module)
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/utils/importlib.py", line 35, in import_module
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     __import__(name)
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/osqa/forum/middleware/extended_user.py", line 4, in <module>
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     from forum.views.auth import forward_suspended_user
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/osqa/forum/views/__init__.py", line 5, in <module>
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     import meta
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/osqa/forum/views/meta.py", line 17, in <module>
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     from forum.badges.base import BadgesMeta
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/osqa/forum/badges/__init__.py", line 5, in <module>
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     from base import BadgesMeta
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/osqa/forum/badges/base.py", line 12, in <module>
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     installed = dict([(b.cls, b) for b in Badge.objects.all()])
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/models/query.py", line 105, in _result_iter
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     self._fill_cache()
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/models/query.py", line 777, in _fill_cache
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     self._result_cache.append(self._iter.next())
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/models/query.py", line 271, in iterator
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     for row in compiler.results_iter():
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/models/sql/compiler.py", line 677, in results_iter
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     for rows in self.execute_sql(MULTI):
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/models/sql/compiler.py", line 732, in execute_sql
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     cursor.execute(sql, params)
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/backends/util.py", line 15, in execute
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     return self.cursor.execute(sql, params)
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]   File "/home/merspi/webapps/osqa/lib/python2.6/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1]     return self.cursor.execute(query, args)
[Wed Apr 13 11:32:43 2011] [error] [client 127.0.0.1] DatabaseError: current transaction is aborted, commands ignored until end of transaction block

It would appear that there's some database issue but the password is correct in settings_local.py. The really strange thing is that - it was working a few hours ago but I deleted the server and started over (repeating the same steps) and now it's spitting out this error message!

Apache port is correct in settings_local.py ('listen' in httpd.conf) - I don't know what else to check?

PostgreSQL database is working - settings are correct. I can access it via phpPgAdmin so I assume it must be OK.

Any ideas? What am I missing here?

Many thanks in advance.

asked 13 Apr '11, 11:31

JamesSpittal's gravatar image

JamesSpittal
1112
accept rate: 0%

It looks like incorrect installation. Are you sure you've went through this steps?

  1. python manage.py syncdb --all
  2. python manage.py migrate --fake
(13 Apr '11, 11:38) Jordan ♦♦

The installation is simply the install script for OSQA on WebFaction from here: https://wiki.webfaction.com/wiki/InstallScripts

It worked last time I ran it? I tried running both those commands:

[merspi@web195 osqa]$ python manage.py syncdb --all
Traceback (most recent call last):
  File "manage.py", line 2, in ?
    from django.core.management import execute_manager
(13 Apr '11, 11:41) James Spittal

I'd guess it's something to do with having uninstalled and then reinstalled.

I'd be tempted to purge the lot if you can, if you've only put OSQA onto this webfaction account, and haven't set up anything else there: go to your account panel, delete all apps; go into SSH, empty your webapps directory (don't delete webapps directory itself - just remove everything in it); go to phpPgAdmin, delete the OSQA databases; then start afresh.

And check out this recent question here too: http://meta.osqa.net/questions/7883/what-is-the-best-step-by-step-install-guide-for-osqa-on-webfaction

link

answered 13 Apr '11, 11:58

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674
accept rate: 21%

edited 13 Apr '11, 11:59

Giving that a try now. Have tried doing it a few times; I have a feeling it might be something to do with PostgresSQL. I get rid of the SQL database but I wonder if it might not be deleting properly?

Grrrr.

(13 Apr '11, 12:19) James Spittal

Yup, I think you'll have to try with a fresh database. Remove the old one completely and recreate it.

(13 Apr '11, 12:30) Jordan ♦♦

Success! Hoorah! In the end, the fix I used was using a different application name (rather than 'osqa', I used something different.)

Don't ask me why this fixed the problem, but it did!

link

answered 13 Apr '11, 12:30

James%20Spittal's gravatar image

James Spittal
66239
accept rate: 0%

OK. Now I'm having some trouble using the SX Importer. Will post a new question about that.

(13 Apr '11, 12:41) James Spittal
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×62
×49
×6

Asked: 13 Apr '11, 11:31

Seen: 628 times

Last updated: 13 Apr '11, 12:41

powered by OSQA