Review Board Installation: Bad Request (400)

4,249 views
Skip to first unread message

Kuldeep singh

unread,
Jun 4, 2014, 9:04:52 AM6/4/14
to revie...@googlegroups.com
Hi All,
I have installed reviewboard on a remote machine(Ubuntu with root user). During installation I followed all the steps mentioned on reviewboard site.
I used most of configuration default, i mean localhost. But after installation and disabling 000-default site, when I am trying to access reviewboard url, Its always displaying

Bad Request (400) message. Now I am very confused why its happening. I am searching solution for last 3 days, but still could not find anything.

If any body have any Idea about it, Please help.


Thanks

Kuldeep Singh

Ali Ghorashi

unread,
Jun 4, 2014, 1:44:47 PM6/4/14
to revie...@googlegroups.com
I had the same problem. When you configure your reviewboard, you have to give it a site name . Some thing like "reviewboard.mycompany.com". It doesn't have to be a registered name just make up something.
Then when you try to access the reviewboard main page, use the site name (reviewboard.mycompany.com) as the URL. You'll of course need to add the made-up hostname to to your /etc/hosts so your machine can resolve the address.

Also, if you setup an extra path to follow your server id, like 'reviews', don't forget to add that to the URL too (e.g. http://reviewboard.mycompany.com/reviews ).

I hope this helps.
Message has been deleted

Kuldeep singh

unread,
Jun 5, 2014, 1:17:33 AM6/5/14
to revie...@googlegroups.com
Hi Ali Ghorashi,

Thanks for your reply. 
I did the same as you suggested but still facing same problem.
Actually I am accessing a remote machine and installing review board on that machine and accessing it from my machine using "machine_ip/reviewboard.mycompany.com"
.
And when I am looking into /var/apache2/log/error.log:
I found this message

"[Thu Jun 05 10:44:35 2014] [notice] caught SIGTERM, shutting down
[Thu Jun 05 10:44:35 2014] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Thu Jun 05 10:44:35 2014] [error] python_init: Python executable found '/usr/bin/python'.
[Thu Jun 05 10:44:35 2014] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Thu Jun 05 10:44:35 2014] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads.
[Thu Jun 05 10:44:35 2014] [notice] mod_python: using mutex_directory /tmp
[Thu Jun 05 10:44:35 2014] [notice] Apache/2.2.22 (Ubuntu) mod_python/3.3.1 Python/2.7.3 mod_wsgi/3.3 configured -- resuming normal operations
"

If you have any other suggestion, please let me know.

Thanks
Kuldeep Singh

Christian Hammond

unread,
Jun 5, 2014, 2:34:09 AM6/5/14
to revie...@googlegroups.com
This looks like an issue with mod_python, rather than Review Board.

I strongly recommend switching your setup to use mod_wsgi instead. mod_python is deprecated and, in your server’s case, possibly incompatible with your version of Python.

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kuldeep singh

unread,
Jun 5, 2014, 4:09:11 AM6/5/14
to revie...@googlegroups.com, chri...@beanbaginc.com

Hi Christian Hammond,
I am already using mod_wsgi.

Christian Hammond

unread,
Jun 5, 2014, 4:11:22 AM6/5/14
to revie...@googlegroups.com
Okay. Most of that log is showing mod_python-related output. Perhaps try uninstalling it.

Can you provide your Apache configuration for the site?

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Kuldeep singh

unread,
Jun 5, 2014, 5:31:00 AM6/5/14
to revie...@googlegroups.com, chri...@beanbaginc.com
Hi Christian,

Please find site configuration file attached here.


Thanks
Kuldeep


reviews.com.conf

Christian Hammond

unread,
Jun 5, 2014, 5:33:14 AM6/5/14
to revie...@googlegroups.com
Thanks.

Do you have anything else running on that Apache?

If you disable mod_python, restart Apache, and try again to connect, do you see any new errors in the error_log?

Are there any access attempts in access_log?

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Kuldeep singh

unread,
Jun 5, 2014, 6:08:13 AM6/5/14
to revie...@googlegroups.com, chri...@beanbaginc.com
Hi Christian ,

No I don't have anything running on apache2.

When I hit url following logs created.

error.log:
[Thu Jun 05 15:34:33 2014] [notice] caught SIGTERM, shutting down
[Thu Jun 05 15:34:34 2014] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations

other_vhosts_access.log:
localhost:80 192.168.206.78 - - [05/Jun/2014:10:07:06 +0000] "GET /reviews.com/ HTTP/1.1" 400 353 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"

Christian Hammond

unread,
Jun 5, 2014, 3:58:46 PM6/5/14
to revie...@googlegroups.com
What Linux distro is this? Something is badly misconfigured or broken somewhere below the Review Board level.

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Kuldeep singh

unread,
Jun 6, 2014, 12:37:17 AM6/6/14
to revie...@googlegroups.com, chri...@beanbaginc.com
Hi Christian,

First I want to say thanks for taking much interest in my problem.
I am providing all the things i did for reviewboard installation.


Os: Ubuntu 12.04.4 LTS (GNU/Linux 3.5.0-23-generic x86_64)

This was a fresh machine when I started installation. I installed following things;

sudo apt-get install apache2
apt-get purge libapache2-mod-wsgi
apt-get install libapache2-mod-wsgi
sudo ln -s /etc/apache2/mods-available/wsgi.load /etc/apache2/mods-enabled
sudo ln -s /etc/apache2/mods-available/wsgi.conf /etc/apache2/mods-enabled
sudo apt-get install mysql-server
sudo apt-get install python-mysqldb
sudo apt-get install memcached
sudo apt-get install python-memcache
mysql -uroot -proot
mysql> create database reviewboard;
Query OK, 1 row affected (0.00 sec)
mysql> exit
Bye
sudo apt-get install patch sudo apt-get install subversion sudo apt-get install python-svn
sudo apt-get install python-setuptools sudo easy_install reviewboard
sudo rb-site install /var/www/reviews.com
  • Domain = localhost
  • Root Path = /
  • Database Type = mysql
  • Database Name = reviewboard
  • Database server = localhost
  • Database username = root
  • Database password = root
  • Memcache Server = memcached://localhost:11211/ (This should be the default)
  • Admin account - admin Details- username. password and email
chown -R www-data /var/www/reviews.com/htdocs/media/uploaded
chown -R www-data /var/www/reviews.com/htdocs/media/ext
chown -R www-data /var/www/reviews.com/htdocs/static/ext
chown -R www-data /var/www/reviews.com/data
cd /etc/apache2/sites-available
cp /var/www/reviews.com/conf/apache-wsgi.conf reviews.com.conf(I also tried: cd /etc/apache2/sites-available cp /var/www/reviews.com/conf/apache-wsgi.conf reviews.com.conf cd ../sites-enabled ln -s ../sites-available/reviews.com.conf .)

sudo a2dissite default
sudo a2ensite reviews.com.conf
sudo /etc/init.d/apache2 restart

Accessing url:=== http://192.168.206.24/reviews.com


This is all what I did. Can you guess what I missed there?


Thanks
Kuldeep Singh

Christian Hammond

unread,
Jun 6, 2014, 12:46:54 AM6/6/14
to revie...@googlegroups.com
When you ran ‘rb-site install’, you specified a site root as ‘/‘, but you’re attempting to access as ‘/reviews.com’. It needs to be one or the other, or it wouldn’t work.

I’m also wondering if you should just leave out the ‘.com’ from any subdirectory, in case Apache’s being overly protective with file extensions (though I’d expect a different error).

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Kuldeep singh

unread,
Jun 6, 2014, 1:06:31 AM6/6/14
to revie...@googlegroups.com, chri...@beanbaginc.com
I reinstalled, with "Root Path = /reviews/" and dropped ".com" form directory.
But still same problem.
http://192.168.206.24/reviews

Kuldeep

Christian Hammond

unread,
Jun 6, 2014, 1:08:42 AM6/6/14
to revie...@googlegroups.com
By any chance, do you use an HTTP proxy?

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Kuldeep singh

unread,
Jun 6, 2014, 1:14:58 AM6/6/14
to revie...@googlegroups.com, chri...@beanbaginc.com
Hey Christian,
:)
Yes, I Did it. Its working now. Thanks for your time.
But I just changed "/var/www/reviews/conf/settings_local.py" ALLOWED_HOSTS = ['localhost'] to ALLOWED_HOSTS = ['*'].

Kuldeep Singh.

Christian Hammond

unread,
Jun 6, 2014, 1:51:30 AM6/6/14
to revie...@googlegroups.com
Glad to hear it!

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Guy Klose

unread,
Jul 14, 2014, 2:48:57 PM7/14/14
to revie...@googlegroups.com
Hi -- I'm running into very similar problems, and I would just like to start over creating the rb-site. Is there a way to delete and existing site (one that is misconfigured)?

Also -- I'm not sure if this is available, but it would be nice to see how a site is figured (something like a "rb-site show <site>" command).

Thanks,
Guy

Christian Hammond

unread,
Jul 14, 2014, 3:28:32 PM7/14/14
to revie...@googlegroups.com, Guy Klose
Hi Guy,

All you should need to do is delete the site directory, drop the database, and re-install the site.

I’m not sure what you mean by showing how a site is figured? You mean, all the steps performed? There’s actual database manipulation that’s performed, various state calculation, and it’s not as simple as showing a set of commands. rb-site is really the only way that is guaranteed to work.

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

--

Guy Klose

unread,
Jul 14, 2014, 3:54:48 PM7/14/14
to revie...@googlegroups.com, gfk...@gmail.com, chri...@beanbaginc.com
Thanks, Christian -- it was a typo. I meant "configured". I think I'm past my difficulties (I'm actually showing an RB site loading via a browser), but I had been thinking that if there was an "rb-site show <site_name>" that would show all those initial configuration pieces, it would have been useful. I had a prior site already set up, and then created a new one, following the steps that Kuldeep showed above. But I couldn't recall how the first one had been configured, or how to change just the site root.

But as I said, I think I'm all set now -- thank you so much for your fast response!

Guy

Jiangcheng Liu

unread,
May 5, 2015, 4:56:32 AM5/5/15
to revie...@googlegroups.com
This is really tricky!!!!!
I spent almost 30 hours to fix this problem(

Bad Request (400)

)


And the real solution is:     /var/www/reviews/conf/
settings_local.py" ALLOWED_HOSTS = ['localhost'] to ALLOWED_HOSTS = ['*'].

rohit jain

unread,
Jun 8, 2015, 10:05:53 PM6/8/15
to revie...@googlegroups.com
Hi all,

I was facing the similar issue with accessing the site. After doing the changes suggested in this thread - ALLOWED_HOSTS, I was able to at least by-pass that error, and got the landing page.

Now the issue is, I'm unable to access the site using the domain name I used. I've to type the IP address of the server. Is there some extra configuration to be done? I followed the step-by-step procedure on Get Review Board page - https://www.reviewboard.org/get/ and then the creating sites page: https://www.reviewboard.org/docs/manual/2.5/admin/installation/creating-sites/#creating-sites

When I access the domain name, it says webpage is not available, probably because DNS lookup failed. Any help on this will be appreciated.

Jobhunting

unread,
Jun 9, 2015, 1:03:29 AM6/9/15
to revie...@googlegroups.com
I guess if you can visit it via IP address, it's completely functional. 


Sent from Mailbox


--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to a topic in the Google Groups "reviewboard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/_D12QMhA8OY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

rohit jain

unread,
Jun 9, 2015, 1:58:10 AM6/9/15
to revie...@googlegroups.com
Yes, I do understand that it's functional. But I'm trying to figure out on how to make the domain name work. And still haven't got it to work. I've added the domain name to /etc/hosts file also, which now looks like:

    <<IP>>  test.example.com

I've added the test.example.com.conf file to /etc/apache2/sites-available folder.

Jiangcheng Liu

unread,
Jun 9, 2015, 2:54:43 PM6/9/15
to revie...@googlegroups.com
What is your DNS server? Do you use godaddy?
--

Your sincerely, 

Jiangcheng Liu

====================================================
Design and programming are human activities; forget that and all is lost.

Rohit Jain

unread,
Jun 9, 2015, 3:10:04 PM6/9/15
to revie...@googlegroups.com
It's installed on AWS instance.

You received this message because you are subscribed to the Google Groups "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.

Jiangcheng Liu

unread,
Jun 9, 2015, 3:11:08 PM6/9/15
to revie...@googlegroups.com
That's weird. I use EC2, too. It works fine.

David Trowbridge

unread,
Jun 9, 2015, 3:14:33 PM6/9/15
to revie...@googlegroups.com
There are a few places where the server name should be configured:

- Apache vhost configuration
- ALLOWED_HOSTS setting in settings_local.py
- In the "General" page of the Review Board admin site (once you can get to it)

-David

Rohit Jain

unread,
Jun 9, 2015, 3:26:19 PM6/9/15
to reviewboard
 - I've added the site in ALLOWED_HOSTS settings - [".test.example.com", "*"]
 - I've also configured the site in Server attribute of General section in the site. Server set as: http://test.example.com
 - PFA the the apache vhost config file

Could this be related to some permission issue? I've set permission to the 4 directories to 'www-data' user, as depicted in installation instruction.

Or may be, the site redirection is not happening? I've added the site in /etc/hosts file also, and mapped that to the IP address.

apache-vhost.txt

Kartick K R

unread,
Jun 15, 2015, 2:51:24 AM6/15/15
to revie...@googlegroups.com
Hi Guys,

Great thread, I was able to install the ReviewBoard with the steps given here.
I have one last problem, that i am not able to Login once the page is loaded.
Even admin login is not working.
Did anyone face similar issue. Kindly help me.

Regards,
Kartick

Amith Patil

unread,
Feb 18, 2016, 10:13:28 AM2/18/16
to reviewboard, chri...@beanbaginc.com
Hi Christian,

I was able set up review board but when i access it using the link localhost/reviews.com , it shows me directory structure and nothing else.

How to really access the RB after creating the site. Please guide me. I have set up the site in the same way as Kuldeep did above.

Thanks in advance,
Amith
...
Reply all
Reply to author
Forward
0 new messages