First time here? Check out the FAQ!
1

Internal Server Error after Newest Update.

Hi,

I've updated askbot just now, and get the internal server error when I visit my site. The main page is somehow working, but everything else not. I think reason for working main page is probably caching.

With the same scheme I've updated last week and everything was fine.

I've Ubuntu with apache server.

Please help.

Commands I've used:

git fetch origin master:master-updated
git checkout master
git merge master-updated
git commit -m 'merged with the development repository'

then I've restarted apache.

How to get the previous (working) version?

here the full process:

# git fetch origin master:master-updated
remote: Counting objects: 162, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 96 (delta 80), reused 96 (delta 80)
Unpacking objects: 100% (96/96), done.
From git://github.com/ASKBOT/askbot-devel
   5e3f780..2aac331  master     -> master-updated
root@myserver:/home/mydjangoinstall# git checkout master
M       askbot/locale/en/LC_MESSAGES/django.mo
M       askbot/locale/en/LC_MESSAGES/django.po
M       askbot/locale/ru/LC_MESSAGES/django.mo
M       askbot/locale/ru/LC_MESSAGES/django.po
Already on 'master'
Your branch is ahead of 'origin/master' by 8 commits.
root@myserver:/home/mydjangoinstall# git merge master-updated
Updating 5e3f780..2aac331
Fast-forward
 askbot/doc/source/changelog.rst                    |    1 +
 askbot/doc/source/contributors.rst                 |    1 +
 askbot/forms.py                                    |   99 ++++++++++++++++----
 .../0126_add_field__auth_user__is_fake.py          |   19 ++++
 askbot/models/__init__.py                          |   20 ++++
 askbot/skins/common/media/js/post.js               |   27 ++++++
 askbot/skins/common/media/js/utils.js              |    1 +
 .../skins/common/templates/widgets/edit_post.html  |   41 +++++++-
 askbot/skins/default/media/style/style.css         |    4 +-
 askbot/skins/default/media/style/style.less        |   35 ++++++-
 askbot/skins/default/templates/answer_edit.html    |    2 +-
 askbot/skins/default/templates/macros.html         |    3 +-
 .../templates/question/new_answer_form.html        |    2 +-
 askbot/skins/default/templates/question_edit.html  |    3 +-
 .../skins/default/templates/widgets/ask_form.html  |    3 +-
 askbot/tests/form_tests.py                         |   27 ++++++
 askbot/urls.py                                     |    5 +
 askbot/views/commands.py                           |   23 +++++
 askbot/views/writers.py                            |   17 +++-
 19 files changed, 301 insertions(+), 32 deletions(-)
 create mode 100644 askbot/migrations/0126_add_field__auth_user__is_fake.py
root@myserver:/home/mydjangoinstall# git add <fixed files>
-bash: syntax error near unexpected token `newline'
root@myserver:/home/mydjangoinstall# git commit -m 'merged with the development repos                                                                                        itory'
# On branch master
# Your branch is ahead of 'origin/master' by 13 commits.
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   askbot/locale/en/LC_MESSAGES/django.mo
#       modified:   askbot/locale/en/LC_MESSAGES/django.po
#       modified:   askbot/locale/ru/LC_MESSAGES/django.mo
#       modified:   askbot/locale/ru/LC_MESSAGES/django.po
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       askbot/locale/ru/LC_MESSAGES/django.po.BackUP.24.07.2012
#       askbot/locale/ru/LC_MESSAGES/django.po.BackUp.25.07.2012
no changes added to commit (use "git add" and/or "git commit -a")
root@myserver:/home/mydjangoinstall# service apache2 reload
 * Reloading web server config apache2                                   [ OK ]
root@myserver:/home/mydjangoinstall# service apache2 restart
 * Restarting web server apache2                                             [ OK]

Edit:

nothing changes after using:

python manage ...
(more)
Toms's avatar
767
Toms
asked 2012-07-30 07:49:21 -0600, updated 2012-07-30 12:39:29 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Can you try with the debug mode on, and post your stacktrace ?

bgenevaux's avatar bgenevaux (2012-07-30 09:57:34 -0600) edit

@bgenevaux see my Edit 2. Thank you

Toms's avatar Toms (2012-07-30 10:09:57 -0600) edit

Could be an error in the merging. Search for consecutive angular brackets in your files.

Evgeny's avatar Evgeny (2012-07-30 10:19:44 -0600) edit

@Evgeny could you check, the Edit 3? Probably that is the reason? Some hint how to solve it?

Toms's avatar Toms (2012-07-30 11:31:09 -0600) edit
add a comment see more comments

2 Answers

1

I had this problem some time ago during a migration, it came from psycopg2 (the transaction began, but was neither commited nor rollbacked because there was a problem)

For me, it solved itself with another migration with some sql manipulations (but it was because the db I had to migrate was from 1 year ago with mysql ...)

Actually, I can't say anything other than try to find what failed in your queries, sorry ...

bgenevaux's avatar
201
bgenevaux
answered 2012-07-30 10:19:46 -0600
edit flag offensive 0 remove flag delete link

Comments

Thank you for your hint!

Toms's avatar Toms (2012-07-30 12:41:21 -0600) edit
add a comment see more comments
1

Maybe it's because you forgot to run migrations?

python manage.py migrate
Evgeny's avatar
13.2k
Evgeny
answered 2012-07-30 09:26:06 -0600
edit flag offensive 0 remove flag delete link

Comments

Hi Evgeny! unfortunately nothing happens. See my edit

Toms's avatar Toms (2012-07-30 09:54:12 -0600) edit
1

For some reason migration 126 failed. Try

python manage.py migrate askbot 0125 --fake
python manage.py migrate

Then you look inside the database and check whether the column exists. Look in DB error log - see which query failed and why.

Evgeny's avatar Evgeny (2012-07-30 11:32:55 -0600) edit

@Evgeny Thank You very much!! You are a godsend! :) Your last comment is the solution.

Toms's avatar Toms (2012-07-30 12:36:42 -0600) edit
add a comment see more comments