prashanthmadi / azure--python-tornado

Running Python Tornado app on azure app services
1 stars 3 forks source link

Not working anymore #1

Open cbodenst opened 6 years ago

cbodenst commented 6 years ago

Hi, thank you for this code, I was trying this currenty but facing permission issues if I want to un it:

2018-06-28 14:21:30.166452: wfastcgi.py 2.1.1 started
2018-06-28 14:21:30.182100: Python version: 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)]
2018-06-28 14:21:30.197702: wfastcgi.py 2.1.1 initializing
2018-06-28 14:21:30.230992: Activating venv with executable at D:\home\site\wwwroot\env\Scripts\python.exe
2018-06-28 14:21:30.244604: Getting handler main.app
2018-06-28 14:21:31.026892: Error occurred while reading WSGI handler:

Traceback (most recent call last):
  File "D:\Python34\Scripts\wfastcgi.py", line 711, in main
    env, handler = read_wsgi_handler(response.physical_path)
  File "D:\Python34\Scripts\wfastcgi.py", line 568, in read_wsgi_handler
    return env, get_wsgi_handler(handler_name)
  File "D:\Python34\Scripts\wfastcgi.py", line 541, in get_wsgi_handler
    handler = handler()
  File ".\ptvs_virtualenv_proxy.py", line 120, in get_venv_handler
    handler = get_wsgi_handler(os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))
  File ".\ptvs_virtualenv_proxy.py", line 73, in get_wsgi_handler
    handler = __import__(module_name, fromlist=[name_list[0][0]])
  File "D:\home\site\wwwroot\main.py", line 2, in <module>
    import tornado.web
  File "D:\home\site\wwwroot\env\lib\site-packages\tornado\web.py", line 88, in <module>
    from tornado import iostream
  File "D:\home\site\wwwroot\env\lib\site-packages\tornado\iostream.py", line 40, in <module>
    from tornado.netutil import ssl_wrap_socket, _client_ssl_defaults, _server_ssl_defaults
  File "D:\home\site\wwwroot\env\lib\site-packages\tornado\netutil.py", line 45, in <module>
    ssl.Purpose.SERVER_AUTH)
  File "D:\Python34\lib\ssl.py", line 442, in create_default_context
    context.load_default_certs(purpose)
  File "D:\Python34\lib\ssl.py", line 392, in load_default_certs
    self._load_windows_store_certs(storename, purpose)
  File "D:\Python34\lib\ssl.py", line 379, in _load_windows_store_certs
    for cert, encoding, trust in enum_certificates(storename):
PermissionError: [WinError 5] Access is denied
prashanthmadi commented 6 years ago

@cbodenst thanks for reporting this.. It definitely requires an update as i don't recommend using fastcgi anymore.. Try with httpplatformhandler..

Running Flask app on App Services(Windows) | Using HTTP platform Handler - https://prmadi.com/running-flask-app-with-httpplatformhandler-in-azure-app-services/

Running Django App on App Services | Using Http Platform handler -https://prmadi.com/django-app-with-httpplatformhandler-in-azure-app-services-windows/

Better approach would be...

Running Flask app on App Services(Linux) | https://prmadi.com/playing-piano-python-app-in-azure-app-services-linux/

Feel free to open a support request in Azure if you are stuck in using them..