python - Unexplainable 500 Internal Server error running Django App service -


here steps followed set up.

  1. i created boilerplate django app service on azure portal. worked , blank django app appeared @ url of app service.

  2. i copied of following configuration files boilerplate: https://github.com/azureappserviceoss/djangoazure

    • .skippythondeployment
    • azuredeploy.json
    • ptvs_virtualenv_proxy.py
    • web.config (modified point actual project settings , wsgi)
    • web.debug.config
  3. after pushing these config files own django project, setup app service on azure point github repository instead of boilerplate repository linked above. successful in setting continuous deployment , fetching/building repository.

  4. my app page shows nothing text:

the page cannot displayed because internal server error has occurred.

the application log stream returns following:

<div id="content">  <div class="content-container">  <h3>http error 500.0 - internal server error</h3>  <h4>the page cannot displayed because internal server error has occurred.</h4>  </div>  <div class="content-container">  <fieldset><h4>most causes:</h4>  <ul>    <li>iis received request; however, internal error occurred during processing of request. root cause of error depends on module handles request , happening in worker process when error occurred.</li>    <li>iis not able access web.config file web site or application. can occur if ntfs permissions set incorrectly.</li>    <li>iis not able process configuration web site or application.</li>     <li>the authenticated user not have permission use dll.</li>   <li>the request mapped managed handler .net extensibility feature not installed.</li> </ul>  </fieldset>  </div>  <div class="content-container">  <fieldset><h4>things can try:</h4>  <ul>    <li>ensure ntfs permissions web.config file correct , allow access web server's machine account.</li>     <li>check event logs see if additional information logged.</li>  <li>verify permissions dll.</li>    <li>install .net extensibility feature if request mapped managed handler.</li>  <li>create tracing rule track failed requests http status code. more information creating tracing rule failed requests, click <a href="http://go.microsoft.com/fwlink/?linkid=66439">here</a>. </li> </ul>  </fieldset>  </div>   <div class="content-container">  <fieldset><h4>detailed error information:</h4>  <div id="details-left">  <table border="0" cellpadding="0" cellspacing="0">  <tr class="alt"><th>module</th><td>&nbsp;&nbsp;&nbsp;fastcgimodule</td></tr>  <tr><th>notification</th><td>&nbsp;&nbsp;&nbsp;executerequesthandler</td></tr>  <tr class="alt"><th>handler</th><td>&nbsp;&nbsp;&nbsp;python fastcgi</td></tr>  <tr><th>error code</th><td>&nbsp;&nbsp;&nbsp;0x00000000</td></tr>   </table>  </div>  <div id="details-right">  <table border="0" cellpadding="0" cellspacing="0">  <tr class="alt"><th>requested url</th><td>&nbsp;&nbsp;&nbsp;http://projectone-api:80/handler.fcgi/</td></tr>  <tr><th>physical path</th><td>&nbsp;&nbsp;&nbsp;d:\home\site\wwwroot\handler.fcgi\</td></tr>  <tr class="alt"><th>logon method</th><td>&nbsp;&nbsp;&nbsp;anonymous</td></tr>  <tr><th>logon user</th><td>&nbsp;&nbsp;&nbsp;anonymous</td></tr>   </table>  <div class="clear"></div>  </div>  </fieldset>  </div>   <div class="content-container">  <fieldset><h4>more information:</h4>  error means there problem while processing request. request received web server, during processing fatal error occurred, causing 500 error.  <p><a href="http://go.microsoft.com/fwlink/?linkid=62293&amp;iis70error=500,0,0x00000000,9200">view more information &raquo;</a></p>  <p>microsoft knowledge base articles:</p>    </fieldset>  </div>  </div>  

as requestions, here wsgi logs:

2016-11-10 17:58:22.405000: wfastcgi.py 2.1.1 started 2016-11-10 17:58:22.405000: python version: 2.7.8 (default, jun 30 2014, 16:03:49) [msc v.1500 32 bit (intel)] 2016-11-10 17:58:22.421000: wfastcgi.py 2.1.1 initializing 2016-11-10 17:58:22.452000: activating virtualenv d:\home\site\wwwroot\env\scripts\activate_this.py 2016-11-10 17:58:22.468000: error occurred while reading wsgi handler:  traceback (most recent call last):   file "d:\python27\scripts\wfastcgi.py", line 711, in main     env, handler = read_wsgi_handler(response.physical_path)   file "d:\python27\scripts\wfastcgi.py", line 568, in read_wsgi_handler     return env, get_wsgi_handler(handler_name)   file "d:\python27\scripts\wfastcgi.py", line 541, in get_wsgi_handler     handler = handler()   file ".\ptvs_virtualenv_proxy.py", line 99, in get_virtualenv_handler     execfile(activate_this, dict(__file__=activate_this)) ioerror: [errno 2] no such file or directory: 'd:\\home\\site\\wwwroot\\env\\scripts\\activate_this.py'   stdout:   stderr:  2016-11-10 17:58:22.468000: unhandled exception in wfastcgi.py: traceback (most recent call last):   file "d:\python27\scripts\wfastcgi.py", line 711, in main     env, handler = read_wsgi_handler(response.physical_path)   file "d:\python27\scripts\wfastcgi.py", line 568, in read_wsgi_handler     return env, get_wsgi_handler(handler_name)   file "d:\python27\scripts\wfastcgi.py", line 541, in get_wsgi_handler     handler = handler()   file ".\ptvs_virtualenv_proxy.py", line 99, in get_virtualenv_handler     execfile(activate_this, dict(__file__=activate_this)) ioerror: [errno 2] no such file or directory: 'd:\\home\\site\\wwwroot\\env\\scripts\\activate_this.py' 2016-11-10 17:58:22.483000: wfastcgi.py 2.1.1 closed 2016-11-10 17:58:34.608000: wfastcgi.py 2.1.1 started 2016-11-10 17:58:34.624000: python version: 2.7.8 (default, jun 30 2014, 16:03:49) [msc v.1500 32 bit (intel)] 2016-11-10 17:58:34.624000: wfastcgi.py 2.1.1 initializing 2016-11-10 17:58:34.655000: activating virtualenv d:\home\site\wwwroot\env\scripts\activate_this.py 2016-11-10 17:58:34.655000: error occurred while reading wsgi handler:  traceback (most recent call last):   file "d:\python27\scripts\wfastcgi.py", line 711, in main     env, handler = read_wsgi_handler(response.physical_path)   file "d:\python27\scripts\wfastcgi.py", line 568, in read_wsgi_handler     return env, get_wsgi_handler(handler_name)   file "d:\python27\scripts\wfastcgi.py", line 541, in get_wsgi_handler     handler = handler()   file ".\ptvs_virtualenv_proxy.py", line 99, in get_virtualenv_handler     execfile(activate_this, dict(__file__=activate_this)) ioerror: [errno 2] no such file or directory: 'd:\\home\\site\\wwwroot\\env\\scripts\\activate_this.py'   stdout:   stderr:   2016-11-10 17:58:34.671000: unhandled exception in wfastcgi.py: traceback (most recent call last): file "d:\python27\scripts\wfastcgi.py", line 711, in main env, handler = read_wsgi_handler(response.physical_path) file "d:\python27\scripts\wfastcgi.py", line 568, in read_wsgi_handler return env, get_wsgi_handler(handler_name) file "d:\python27\scripts\wfastcgi.py", line 541, in get_wsgi_handler handler = handler() file ".\ptvs_virtualenv_proxy.py", line 99, in get_virtualenv_handler execfile(activate_this, dict(__file__=activate_this)) ioerror: [errno 2] no such file or directory:      'd:\\home\\site\\wwwroot\\env\\scripts\\activate_this.py' 2016-11-10 17:58:34.687000: wfastcgi.py 2.1.1 closed 

what's strange don't commit env folder repository because reads requirements.txt create it's own. however, seems not doing time.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -