Help - Bad Request(400) on start application #513

Open
rgarbin opened this Issue Oct 30, 2015 · 2 comments

Projects

None yet

3 participants

@rgarbin
rgarbin commented Oct 30, 2015

Steps

python manage.py syncdb --all
python manage.py migrate forum
python manage.py runserver

➜ osqa git:(master) ✗ sudo python manage.py runserver 0.0.0.0:3000
Validating models...

0 errors found
October 30, 2015 - 06:39:35
Django version 1.6, using settings 'settings'
Starting development server at http://0.0.0.0:3000/
Quit the server with CONTROL-C.
[30/Oct/2015 06:39:47] "GET / HTTP/1.1" 400 26
[30/Oct/2015 06:39:56] "GET / HTTP/1.1" 400 26
[30/Oct/2015 06:39:56] "GET / HTTP/1.1" 400 26

[30/Oct/2015 06:39:56] "GET / HTTP/1.1" 400 26

Exception happened during processing of request from ('127.0.0.1', 39976)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 126, in init
super(WSGIRequestHandler, self).init(_args, *_kwargs)
File "/usr/lib/python2.7/SocketServer.py", line 655, in init
self.handle()
File "/usr/lib/python2.7/wsgiref/simple_server.py", line 116, in handle
self.raw_requestline = self.rfile.readline(65537)
File "/usr/lib/python2.7/socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
timeout: timed out

@zemien
zemien commented Nov 17, 2015

I installed OSQA via Bitnami and saw this error message after installation. I then realised that the installer took me to 127.0.0.1, while during installation I specified my machine name as the host name. I browsed to my host name instead, and I could access OSQA.

There is also a logs folder in the OSQA app folder, if the above doesn't help.

@tannoliu

you should add your localhost address to ALLOWED_HOST in settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment