2

I am working on a wagtail project(like django-cms) I get this error when I run python3 manage.py runserver 0.0.0.0:8000

  code 400, message Bad request syntax 
  ('\x16\x03\x01\x00®\x01\x00\x00ª\x03\x03³\x06âP\x97Þ%<Sg\x13Ö×[zE\x96\x15?
  \x96\x00\x1ah')
  You're accessing the development server over HTTPS, but it only supports 
  HTTP.

I had changed SECURE_SSL_REDIRECT=FALSE and tested it still i get this same error. I had disabled cache in chrome.

 I had deactivated chorme caching in registry  by following steps.
  1. Deactivate Chrome Cache in the Registry

    Open Registry (Start -> Command -> Regedit)

    Search for: HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command

    Change the part after ...chrom.exe" to this value: –disable-application- cache –media-cache-size=1 –disk-cache-size=1 — "%1"

    Example: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" - disable-application-cache –media-cache-size=1 –disk-cache-size=1 — "%1"

    I had also tried disable cache from chrome developer tools network -disable cache.

    I had also tried to cleared cache from hsts on chrome.

    I had also tried from incognito window on chrome. But still I get the same error

    It is an Ubuntu machine on AWS. I access from outside through http://54.23x.9x.17:8000 I am not able to resolve this error.

    Please help me in resolving this error.

With Many Thanks, Bharath AK

A K Bharath
  • 147
  • 3
  • 11
  • My local pc is windows I access chrome with http://54.23x.92.17:8000 from windows – A K Bharath Mar 23 '18 at 02:55
  • Is that IP the machine or ELB? Did you try another browser? Did you try another machine? – kichik Mar 23 '18 at 04:45
  • I had tried accessing from other machine it is changing to https instead of http and I got "GET / HTTP/1.1" 301 0 on console window – A K Bharath Mar 23 '18 at 05:16
  • The server the application running is aws ubuntu machine. I am running the browser from windows pc. I access the linux box through putty ssh – A K Bharath Mar 23 '18 at 06:08
  • 1
    Hope this helps... https://stackoverflow.com/questions/35536491/error-youre-accessing-the-development-server-over-https-but-it-only-supports/35536980 – Prashanth Pasham Mar 23 '18 at 23:53
  • 1
    Django's `runserver` command is only meant to be run in development environments on local machines, not on servers. That said, if you're using the EC2 instance for development, I've done similar things before. Just checking, but are you going to `http://` or `https://` in your browser when you're trying to hit the EC2 instance? – FlipperPA Mar 26 '18 at 22:01
  • Hi there, Thank you all, I am able to fix this issue. I had tried accessing with postman. I found errors like missing environment variables. Once environment variables are created. I am able access with http:// on browser. With Many Thanks, – A K Bharath Mar 27 '18 at 01:19

0 Answers0