heroku/heroku-buildpack-python

DEPLOYMENT OF WEBSOCKET SERVER PYTHON PROGRAM ON HEROKU

ishan3199 opened this issue · 2 comments

Hello !
Ishan here! an OCPP enthusiast.

So the thing is that I successfully tested the websocket based ocpp server integrated with aiohttp api in local network. But now I am deploying the websocket server integrated with the HTTP api to heroku and a websocket client script connects to the websocket server, but through CMD the http endpoint is not reachable through curl.

On the server log It displays this:
heroku[router]:
at=info method=POST path="/reset" host=ocppr.herokuapp.com request_id=423e705f-8d5c-48f2-8273-002e5e9f3ed8 fwd="23.22.26.72" dyno=web.1 connect=0ms service=1ms status=400 bytes=242 protocol=http

As seen the http connection is received at server but it is not doing anything defined inside the /reset endpoint, that is the reset function is not executed.

On the CMD side, where i am using curl I get this:
Failed to open Websocket connection: did not receive a valid http request.

I am using the below mentioned type of code for this:
mobilityhouse/ocpp#86 (comment)

As a learner of servers and ocpp protocol any help with this will be awesome.
Thanks for your time people!!!

Hi! Unfortunately this isn't the right place to ask generic Python support questions.

If you believe there is a Heroku platform specific problem with websockets, you can file a support ticket at https://help.heroku.com, however this is most likely an app specific configuration issue - in which case I would see if the OCPP project has any more documentation or suggestions.

@edmorley Ok thanks