Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deploy on Heroku? #79

Open
Atiya-Rabbi opened this issue May 8, 2021 · 0 comments
Open

How to deploy on Heroku? #79

Atiya-Rabbi opened this issue May 8, 2021 · 0 comments

Comments

@Atiya-Rabbi
Copy link

  • django-private-chat version: 0.3.0
  • Django version: 2.2.13
  • Python version: 3.7.2
  • Operating System: Windows 8

Description

I am trying to deploy my Django app to heroku. I have deployed one instance of the app that runs via web: gunicorn dukaan.wsgi --log-file - and the other instance of the app that runs via web: python manage.py run_chat_server. There's no problem with the first instance but other instance i.e. the chat server is not working properly. Please see hereoku logs below.
It will be so kind if someone can help me to resolve this error.

2021-05-08T17:06:30.000000+00:00 app[api]: Build succeeded
2021-05-08T17:08:23.338835+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server - st
ate = CONNECTING
2021-05-08T17:08:23.339202+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server - ev
ent = connection_made(<_SelectorSocketTransport fd=7 read=idle write=<idle, bufs
ize=0>>)
2021-05-08T17:08:23.339547+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server - ev
ent = eof_received()
2021-05-08T17:08:23.340027+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:Invalid han
dshake
2021-05-08T17:08:23.340028+00:00 app[web.1]: Traceback (most recent call last):
2021-05-08T17:08:23.340029+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/http.py", line 96, in read_request
2021-05-08T17:08:23.340030+00:00 app[web.1]: request_line = await read_line(stre
am)
2021-05-08T17:08:23.340030+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/http.py", line 219, in read_line
2021-05-08T17:08:23.340031+00:00 app[web.1]: raise EOFError("line without CRLF")

2021-05-08T17:08:23.340032+00:00 app[web.1]: EOFError: line without CRLF
2021-05-08T17:08:23.340033+00:00 app[web.1]:
2021-05-08T17:08:23.340034+00:00 app[web.1]: The above exception was the direct
cause of the following exception:
2021-05-08T17:08:23.340035+00:00 app[web.1]:
2021-05-08T17:08:23.340035+00:00 app[web.1]: Traceback (most recent call last):
2021-05-08T17:08:23.340036+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/server.py", line 233, in read_http_request
2021-05-08T17:08:23.340036+00:00 app[web.1]: path, headers = await read_request(
self.reader)
2021-05-08T17:08:23.340037+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/http.py", line 98, in read_request
2021-05-08T17:08:23.340038+00:00 app[web.1]: raise EOFError("connection closed w
hile reading HTTP request line") from exc
2021-05-08T17:08:23.340038+00:00 app[web.1]: EOFError: connection closed while r
eading HTTP request line
2021-05-08T17:08:23.340038+00:00 app[web.1]:
2021-05-08T17:08:23.340039+00:00 app[web.1]: The above exception was the direct
cause of the following exception:
2021-05-08T17:08:23.340039+00:00 app[web.1]:
2021-05-08T17:08:23.340039+00:00 app[web.1]: Traceback (most recent call last):
2021-05-08T17:08:23.340040+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/server.py", line 134, in handler
2021-05-08T17:08:23.340040+00:00 app[web.1]: extra_headers=self.extra_headers,
2021-05-08T17:08:23.340040+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/server.py", line 526, in handshake
2021-05-08T17:08:23.340041+00:00 app[web.1]: path, request_headers = await self.
read_http_request()
2021-05-08T17:08:23.340041+00:00 app[web.1]: File "/app/.heroku/python/lib/pytho
n3.7/site-packages/websockets/server.py", line 235, in read_http_request
2021-05-08T17:08:23.340042+00:00 app[web.1]: raise InvalidMessage("did not recei
ve a valid HTTP request") from exc
2021-05-08T17:08:23.340042+00:00 app[web.1]: websockets.exceptions.InvalidMessag
e: did not receive a valid HTTP request
2021-05-08T17:08:23.340214+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server > HT
TP/1.1 400 Bad Request
2021-05-08T17:08:23.340305+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server > He
aders([('Date', 'Sat, 08 May 2021 17:08:23 GMT'), ('Server', 'Python/3.7 websock
ets/8.1'), ('Content-Length', '77'), ('Content-Type', 'text/plain'), ('Connectio
n', 'close')])
2021-05-08T17:08:23.340412+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server > bo
dy (77 bytes)
2021-05-08T17:08:23.340506+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server ! fa
iling CONNECTING WebSocket connection with code 1006
2021-05-08T17:08:23.340640+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server - ev
ent = connection_lost(None)
2021-05-08T17:08:23.340731+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server - st
ate = CLOSED
2021-05-08T17:08:23.340819+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server x co
de = 1006, reason = [no reason]
2021-05-08T17:08:23.341034+00:00 app[web.1]: 08.05.21 17:08:23:DEBUG:server x ha
lf-closing TCP connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant