page not found; the current URL didn't match any of these

1,272 views
Skip to first unread message

Vinay Reddy

unread,
Jul 23, 2008, 3:29:11 PM7/23/08
to reviewboard
Hi, I was trying to run reviewboard with apache. the root of my
webserver is /var/www and I have reviewboard in /var/www/reviewboard.
I tried a couple of options for SITE_ROOT ('/', and '/reviewboard/'),
but I get the same error when I do a http://localhost/reviewboard:

---
Using the URLconf defined in djblets.util.rooturl, Django tried these
URL patterns, in this order.
1. ^ ^admin/
2. ^ ^media/(?P<path>.*)$
3. ^ ^admin/
4. ^ ^api/json/
5. ^ ^r/
6. ^ ^reports/
7. ^ ^dashboard/$
8. ^ ^users/$
9. ^ ^users/(?P<username>[A-Za-z0-9_\-\.]+)/$
10. ^ ^groups/$
11. ^ ^groups/(?P<name>[A-Za-z0-9_-]+)/$
12. ^ ^feeds/rss/(?P<url>.*)/$
13. ^ ^feeds/atom/(?P<url>.*)/$
14. ^ ^account/logout/$
15. ^ ^$
16. ^ ^account/login/$
17. ^ ^account/preferences/$
18. ^ ^iphone/
19. ^ ^account/register/$

The current URL, reviewboard/, didn't match any of these.
---

This message doesn't seem to be dependent on what I set for SITE_ROOT.

I found a couple of threads on google groups, but none of them are
clear enough for me. I'd appreciate it if anyone can help me figure
this out (or point me in the right direction). Thanks!

Here's my relevant apache config:
# Alias static media requests to filesystem
Alias /media /var/www/reviewboard/htdocs/media
Alias /errordocs /var/www/reviewboard/htdocs/errordocs

# Serve django pages
<Location "/">
PythonPath "['/var/lib/python-support/python2.5/django/'] + ['/var/
www/'] + ['/var/www/reviewboard/'] + ['/var/www/reviewboard/djblets/']
+ ['/var/lib/python-support/python2.5/'] + ['/usr/lib/python2.5/site-
packages/python-django/'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonAutoReload Off
PythonDebug Off
</Location>

# Serve static media without running it through mod_python
# (overrides the above)
<Location "/media">
SetHandler None
</Location>
<Location "/errordocs">
SetHandler None
</Location>

My reviewboard is at revision 1336, django at 7900 and djblets at
revision 11796. This was the only combination that let me run the
local version of reviewboard trivially.

Christian Hammond

unread,
Jul 23, 2008, 3:42:41 PM7/23/08
to revie...@googlegroups.com
You need to set the SITE_ROOT variable in local_settings.py to "/reviewboard/"

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Vinay Reddy

unread,
Jul 23, 2008, 8:52:21 PM7/23/08
to reviewboard
Thanks for the reply... Now I'm getting an sqlite error:

---------
Request Method: GET
Request URL: http://localhost/reviewboard/dashboard/
Exception Type: OperationalError
Exception Value: unable to open database file
Exception Location: /var/lib/python-support/python2.5/django/db/
backends/sqlite3/base.py in _cursor, line 113
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/var/lib/python-support/python2.5/django/', '/var/
www/', '/var/www/reviewboard/', '/var/www/reviewboard/djblets/', '/var/
lib/python-support/python2.5/', '/usr/lib/python2.5/site-packages/
python-django/', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/
lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/
python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/
usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/
Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/
site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/usr/
lib/python2.5/site-packages/gtk-2.0', '/var/lib/python-support/
python2.5/gtk-2.0']
--------

I tried changing the permissions of /var/www/reviewboard/reviewboard
(the sqlite database), but to no avail. I even tried removing it, but
that didn't help either. In settings_local.py, I tried giving
different variants of path, but the same error. Also made sure that no
local instances of "./manage.py runserver" were running. Anything else
that I should try?

Thanks,
Vinay

On Jul 23, 12:42 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> You need to set the SITE_ROOT variable in local_settings.py to
> "/reviewboard/"
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.
>
> On Wed, Jul 23, 2008 at 12:29 PM, Vinay Reddy <vinayvi...@gmail.com> wrote:
>
> > Hi, I was trying to run reviewboard with apache. the root of my
> > webserver is /var/www and I have reviewboard in /var/www/reviewboard.
> > I tried a couple of options for SITE_ROOT ('/', and '/reviewboard/'),
> > but I get the same error when I do ahttp://localhost/reviewboard:

Christian Hammond

unread,
Jul 23, 2008, 9:17:19 PM7/23/08
to revie...@googlegroups.com
Just to be sure, you generated the database with:

./manage.py syncdb

Right?

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Vinay Reddy

unread,
Jul 23, 2008, 9:24:13 PM7/23/08
to reviewboard
Nevermind this problem. I switched to mysql and reviewboard works
fine... But I'm facing yet another problem :(

When I try to create a new review, I get this error:

> HTTPS certificate not accepted. Please ensure that the proper certificate exists in None/.subversion/auth for the user that reviewboard is running as.

That 'None' is the home directory. I edited scmtools/svn.py to print
the home directory. I'm looking at
http://groups.google.com/group/reviewboard/browse_thread/thread/8f0b8b6939a1aff8,
as it's the exact same problem... I hope this will resolve all my
problems...

Thanks,
Vinay

Christian Hammond

unread,
Jul 23, 2008, 9:38:44 PM7/23/08
to revie...@googlegroups.com
What operating system is this running on?

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Vinay Reddy

unread,
Jul 24, 2008, 1:53:50 AM7/24/08
to reviewboard
Ubuntu 8.04 (hardy heron) 64-bit.

Vinay

On Jul 23, 6:38 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> What operating system is this running on?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.
>
> On Wed, Jul 23, 2008 at 6:24 PM, Vinay Reddy <vinayvi...@gmail.com> wrote:
>
> > Nevermind this problem. I switched to mysql and reviewboard works
> > fine... But I'm facing yet another problem :(
>
> > When I try to create a new review, I get this error:
>
> > > HTTPS certificate not accepted. Please ensure that the proper certificate
> > exists in None/.subversion/auth for the user that reviewboard is running as.
>
> > That 'None' is the home directory. I edited scmtools/svn.py to print
> > the home directory. I'm looking at
>
> >http://groups.google.com/group/reviewboard/browse_thread/thread/8f0b8...
> > ,

Vinay Reddy

unread,
Jul 24, 2008, 2:39:51 AM7/24/08
to reviewboard
I'm also experiencing some really weird things:
When I remove all databases and start afresh, I can login into
reviewboard as the admin user created during ./manage.py syncdb, but
as soon as I try to add a repository, it shows me the login page and
never lets me login as admin again. First it says there's a cookie
problem, but when I tried using other browsers (IE), it said incorrect
username and password. The same thing happened when I switched to
postgresql too.

Any ideas?

Vinay

Christian Hammond

unread,
Jul 24, 2008, 2:56:08 AM7/24/08
to revie...@googlegroups.com
I haven't heard of anything like this before.

What's your server setup like? Can you paste your settings_local.py file? (Sensitive parts can be masked).

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Vinay Reddy

unread,
Jul 24, 2008, 12:51:03 PM7/24/08
to reviewboard
Here it is. btw, the same problem is happening with sqlite3 too.

---------------------
# Database backend. Any supported django database engine should work.
DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'sqlite3' or
'ado_mssql'.
DATABASE_NAME = 'reviewboard' # Or path to database file if using
sqlite3.
DATABASE_USER = 'reviewboard' # Not used with sqlite3.
DATABASE_PASSWORD = 'test123' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost.
DATABASE_PORT = '' # Set to empty string for default.

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'random string'

# Cache backend. Unset this to turn off caching completely. As with
most
# django installations, the best option is probably to use memcached.
CACHE_BACKEND = 'locmem:///'

# Whether to send e-mail for review requests.
SEND_REVIEW_MAIL = False

# Local time zone for this installation. All choices can be found
here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'US/Pacific'

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'

# This should match the ID of the Site object in the database. This
is used to
# figure out URLs to stick in e-mails and related pages.
SITE_ID = 1
SITE_ROOT = "/reviewboard/"

# If you set this to False, Django will make some optimizations so as
not
# to load the internationalization machinery.
USE_I18N = True

# Enable search. Search needs PyLucene to be installed. It also
requires
# that a regular job be set up to perform the indexing. To generate
the
# index, run:
# manage.py index
# This command will perform an incremental index. To do a full
reindex, run:
# manage.py index --full
#
# Incremental indexes should be done fairly often.
# A sample cron configuration exists in contrib/conf/search-cron.conf
#
# If you want the search index to be located somewhere other than the
# reviewboard root, set SEARCH_INDEX to the desired path. The index
needs to be
# a directory writable by the user creating the index and readable by
the user
# that Review Board runs as.
ENABLE_SEARCH = False


# TLS for LDAP. If you're using LDAP authentication and your LDAP
server
# doesn't support ldaps://, you can enable start-TLS with this.
LDAP_TLS = False
-----------------

Thanks,
Vinay

On Jul 23, 11:56 pm, "Christian Hammond" <chip...@chipx86.com> wrote:
> I haven't heard of anything like this before.
>
> What's your server setup like? Can you paste your settings_local.py file?
> (Sensitive parts can be masked).
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> VMware, Inc.
>

Vinay Reddy

unread,
Jul 24, 2008, 1:35:59 PM7/24/08
to reviewboard

> > HTTPS certificate not accepted. Please ensure that the proper certificate exists in None/.subversion/auth for the user that reviewboard is running as.
>
> That 'None' is the home directory. I edited scmtools/svn.py to print
> the home directory. I'm looking athttp://groups.google.com/group/reviewboard/browse_thread/thread/8f0b8...,
> as it's the exact same problem... I hope this will resolve all my
> problems...

Even if I login as a regular user (I can't login as admin anymore) to
publish a review, I get the above mentioned error and trying those
suggestions in that thread didn't help me. The home directory is
'None', which doesn't make any sense, as a ps -ef|grep apache, shows
that it's running as root...

Also, does anyone know what does this .subversion directory do? It
doesn't seem to have any userful login info inside it.

btw, if I use the local version of reviewboard (./mange.py runserver)
everything works fine perfectly!

Vinay Reddy

unread,
Jul 25, 2008, 1:56:58 AM7/25/08
to reviewboard
> I haven't heard of anything like this before.
>
> What's your server setup like? Can you paste your settings_local.py file?
> (Sensitive parts can be masked).

Okay, I manually cleaned up the auth_user relation in mysql and set
is_staff and is_superuser for one of my users to true and I can login
as admin again. Phew!

The issue about subversion access over https is the last stumbling
block now. Any help is much appreciated.

Thanks,
Vinay

Vinay Reddy

unread,
Jul 26, 2008, 5:19:23 PM7/26/08
to reviewboard

> > > HTTPS certificate not accepted. Please ensure that the proper certificate exists in None/.subversion/auth for the user that reviewboard is running as.

First I tried linking the .subversion directory in /var/www-data to my
regular user account that had the right .subversion folder, but this
didn't work. Then I changed the apache2 user environment variables
($APACHE_RUN_USER and $APACHE_RUN_GROUP) to the user and group I use
to access subversion (these variables can be set in /etc/apache2/
envvars) and everything worked fine!

Vinay
Reply all
Reply to author
Forward
0 new messages