2304: [Page not found] after upgrade to 1.6.1

eddieh*******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Oct. 8, 2011
What version are you running?
1.6.1

What's the URL of the page containing the problem?
http://mysite/p4reviewboard/

What steps will reproduce the problem?
1. install ReviewBoard 1.6.1
2. service apache2 restart
3. Browse http://mysite/p4reviewboard/, the page shows incorrect rb-site upgrade command: [rb-site upgrade /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.1.dev-py2.7.egg/reviewboard/data]
4. I ran [rb-site upgrade /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.1.dev-py2.7.egg/reviewboard/data] and then found this command maybe not correct, so I ran again upgrade command as previous upgrade: [rb-site upgrade /var/www/p4reviewboard]

What is the expected output? What do you see instead?
The problem is after I upgrade to 1.6.1, my review board always return "404 Page not found" to any of links to http://mysite/p4reviewboard/.
The error message:
====
Using the URLconf defined in djblets.util.rooturl, Django tried these URL patterns, in this order:

    ^ ^admin/
    ^ ^media/(?P<path>.*)$
    ^ ^account/
    ^ ^reports/
    ^ ^s/(?P<local_site_name>[A-Za-z0-9\-_.]+)/
    ^ ^$ [name='root']
    ^ ^api/
    ^ ^r/
    ^ ^dashboard/$ [name='dashboard']
    ^ ^users/$ [name='all-users']
    ^ ^users/(?P<username>[A-Za-z0-9@_\-\.]+)/$ [name='user']
    ^ ^users/(?P<username>[A-Za-z0-9@_\-\.]+)/infobox/$ [name='user-infobox']
    ^ ^groups/$ [name='all-groups']
    ^ ^groups/(?P<name>[A-Za-z0-9_-]+)/$ [name='group']
    ^ ^groups/(?P<name>[A-Za-z0-9_-]+)/members/$ [name='group_members']
    ^ ^account/logout/$ [name='logout']

The current URL, p4reviewboard/, didn't match any of these.
====


What operating system are you using? What browser?
Ubuntu 11.4, Firefox, chrome

Please provide any additional information below.
I used to upgrade from 1.5 to 1.6 and everything was fine, but this time after upgrade to 1.6.1, my server is totally broken. Even I remove entire reviewboard folder (/var/www/p4reviewboard) and database and use rb-site install to install a new reviewboard, the problem still exist. I also rollback to 1.6 and the problem is still the same. It seems django somehow don't remember the location of mysite's installation path (/var/www/p4reviewboard) so the hint of "rb-site upgrade [path]" is not correct. I also checked my apache2 site-enabled configuration, it's correct as another workable server.
chipx86
#1 chipx86
Nothing significant changed between RB 1.6.0 and 1.6.1, so I wouldn't expect there to be a problem there. However, there was a Django 1.3.1 security release, and perhaps something happened to break you.

I'm working to reproduce this here, and will update if I discover anything.
  • -Priority-Medium
    +Priority-High
    +Component-Deployment
  • +chipx86
chipx86
#2 chipx86
Try changing your Apache config so that ScriptAlias goes from:

    WSGIScriptAlias "/p4reviewboard/" "/var/www/...../reviewboard.wsgi"

to:

    WSGIScriptAlias "/p4reviewboard" "/var/www/...../reviewboard.wsgi/p4reviewboard"

Let me know if that fixes it.
  • +NeedInfo
#3 eddieh*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks your prompt response.
I'm using mod_python, and later now I found a workaround by set the site at host root direction (in conf, change to <Location>"/").
Then I tried to install a new rb site using wsgi and followed your change, but same problem is still there.
chipx86
#4 chipx86
It's possible they changed something that broke mod_python in Django 1.3.1. For the heck of it, try downgrading Django to 1.3.0 and see if it fixes it.

Should be able to remove your existing Django 1.3.1 directory in Python's site-packages directory, and then install using:

    sudo easy_install Django==1.3.0
#5 eddieh*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I removed Django 1.3.1 and installed 1.3, but still don't fix.
#6 eddieh*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I think the problem is not in 1.6.1 but possibly in Django 1.3.1. I started a new installation of Reviewboard 1.6 on a new ubuntu host, Django 1.3.1 was automatically installed by easy_install. This problem can be reproduced. However, with mod_wsgi, your suggestion in comment#2 does fix -- although somehow it didn't work in my previous host.
david
#7 david
  • -NeedInfo
    +SetupIssue