[uWSGI] --- no python application found, check your startup logs for errors ---

Łukasz Mierzwa l.mierzwa at gmail.com
Tue Oct 8 20:48:00 CEST 2013


Does it still shows "Bottle v0.11.6 server starting up (using
WSGIRefServer())..." ?? Are you sure nothing calls run() somewhere else in
the code (grep -R run .)?


2013/10/8 David Montgomery <davidmontgomery at gmail.com>

> uwsgi will still not work with python bottle.  I fail to see why!  The
> file exists.
>
> --- no python application found, check your startup logs for errors ---
> I got rid of the main..
>
>
> --- no python application found, check your startup logs for errors ---
>
>
> #if __name__ == "__main__":
> #    # Interactive mode
> #    run(host='localhost', port=8048)
> #else:
> #    # Mod WSGI launch
> os.chdir(os.path.dirname(__file__))
> application = default_app()
>
> command = /usr/local/bin/uwsgi --loop gevent --carbon 10.48.41.248:2003--socket
> 127.0.0.1:8070 --processes 1 --pp  /home/ubuntu/workspace/devops/classes/
> --pp  /home/ubuntu/workspace/
> rtbhui-devops/ --pp  /home/ubuntu/workspace/devops/servers/ --wsgi-file
> /home/ubuntu/workspace/devops/servers/pixel_server.py -b 32768 --master
> --gevent 20 --enable-threads --l
>
> isten 2048 --memory-report --logto2 /tmp/pixel.log
>
> I use chef to install uyWSGI
>
> python_pip "uwsgi" do
>   version "1.9.14"
>   action :install
> end
>
> I start the app any other way things work.  I use uwsgi on ubuntu 12.04 it
> does not work.
>
>
>
>
>
>
>
>
>
> On Sat, Oct 5, 2013 at 11:37 AM, John Hall <johnhall2.0 at gmail.com> wrote:
>
>> David,
>> uWSGI definitely works but I have found it's tricky to get the settings
>> and setup right - so - I am not an expert, but i'd say the answer is that
>> the way your script is used by uWSGI  ___main__ !=  "__main__" so that part
>> of your code is not executed.  You just need to import / setup  what you
>> need for your app and put the block of code outside of the conditional
>> block,  like the example for apache mod_wsgi in the doc page referenced by
>> Lukasz .
>>
>>
>>
>> On Fri, Oct 4, 2013 at 11:26 PM, David Montgomery <
>> davidmontgomery at gmail.com> wrote:
>>
>>> So..in sum..if I use localhost..all works..there are no errors in my
>>> app.  I use uwsgi ....bottle will not  work despite using application =
>>> default_app()...and I am geussing an uWSGI issue
>>>
>>> So..why will uwsgi not work with bottle?
>>>
>>> Thanks
>>>
>>>
>>> On Sat, Oct 5, 2013 at 9:55 AM, David Montgomery <
>>> davidmontgomery at gmail.com> wrote:
>>>
>>>> Already doing that
>>>> from bottle import route, run, default_app, request, response,
>>>> get,redirect
>>>> if __name__ == "__main__":
>>>>
>>>>     os.chdir(os.path.dirname(__file__))
>>>>     application = default_app()
>>>>
>>>>
>>>> On Sat, Oct 5, 2013 at 8:04 AM, Łukasz Mierzwa <l.mierzwa at gmail.com>wrote:
>>>>
>>>>> Looking at lines:
>>>>>
>>>>>
>>>>> Bottle v0.11.6 server starting up (using WSGIRefServer())...
>>>>> Listening on http://localhost:8048/
>>>>> Hit Ctrl-C to quit.
>>>>>
>>>>> suggest that in pixel_server.py you are calling bottle.run() which
>>>>> spawns bottle built-in http server. If so then --wsgi-file should point to
>>>>> file containing:
>>>>>
>>>>> import bottle
>>>>> application = bottle.default_app()
>>>>>
>>>>> as in http://bottlepy.org/docs/dev/deployment.html#apache-mod-wsgi
>>>>> uWSGI expects standard WSGI application script that will return
>>>>> application object.
>>>>>
>>>>>
>>>>>
>>>>> 2013/10/5 David Montgomery <davidmontgomery at gmail.com>
>>>>>
>>>>>>  --- no python application found, check your startup logs for errors
>>>>>> ---
>>>>>> {address space usage: 87171072 bytes/83MB} {rss usage: 17674240
>>>>>> bytes/16MB} [pid: 29393|app: -1|req: -1/11] ddfdf  () {40 vars in 663
>>>>>> bytes} [Fri Oct  4 23:33:26 2013] GET /pixel/ => generated 21 bytes in 0
>>>>>> msecs (HTTP/1.1 500) 1 headers in 57 bytes (1 switches on core 19)
>>>>>>
>>>>>> Why is the above happening?
>>>>>>
>>>>>> /usr/local/bin/uwsgi --loop gevent --carbon xxx.xxx.xxx.xxx:2003
>>>>>> --socket 127.0.0.1:8070 --processes 1 --pp
>>>>>> /home/ubuntu/workspace/devops/ --wsgi-file
>>>>>> /home/ubuntu/workspace/devops/servers/pixel_server.py -b 32768 --master
>>>>>> --gevent 20 --enable-threads --listen 2048 --memory-report --logto2
>>>>>> /tmp/pixel.log
>>>>>>
>>>>>> The file is there.  Yet I get no python application found?  How does
>>>>>> one get uwsgi to work?
>>>>>>
>>>>>>
>>>>>> I I run hte below from the command line..I do nit have a problem
>>>>>> python pixel_server.py
>>>>>> Bottle v0.11.6 server starting up (using WSGIRefServer())...
>>>>>> Listening on http://localhost:8048/
>>>>>> Hit Ctrl-C to quit.
>>>>>> localhost - - [04/Oct/2013 23:43:37] "GET /pixel HTTP/1.1" 200 42
>>>>>> localhost - - [04/Oct/2013 23:43:42] "GET /pixel HTTP/1.1" 200 42
>>>>>>
>>>>>> If I were to use uwsgi.,,,it does not work and at a loss.
>>>>>>
>>>>>> I am using nginx so...
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> uWSGI mailing list
>>>>>> uWSGI at lists.unbit.it
>>>>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Łukasz Mierzwa
>>>>>
>>>>> _______________________________________________
>>>>> uWSGI mailing list
>>>>> uWSGI at lists.unbit.it
>>>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> uWSGI mailing list
>>> uWSGI at lists.unbit.it
>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>
>>>
>>
>> _______________________________________________
>> uWSGI mailing list
>> uWSGI at lists.unbit.it
>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>
>>
>
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>


-- 
Łukasz Mierzwa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20131008/285c39ed/attachment.html>


More information about the uWSGI mailing list