I experience the same issue but I have a different diagnoses. It is not 
ignoring -s (although it says it does). In fact it is calling the gunicorn 
method. The problem is that it fails when when creating an instance of the 
gunicorn server and I do not know way. In stead of going into the server 
loop is continue execution and reports a wrong error. That code comes from 
Bottle and I cannot find any documentation on the gunicorn web page on how 
to access it from API. 

On Wednesday, 18 April 2012 03:14:48 UTC-5, Rahul wrote:
>
> I tried with the latest code in trunk - There seems to be some issue. It 
> ignores -s or --server= parameters. it always starts rocket server. Please 
> see the logs below. 
>
> *-bash-3.2$ python anyserver.py -s gunicorn*
> starting gunicorn on 127.0.0.1:8000...
> Usage: anyserver.py [options]
>
> anyserver.py: error: no such option: -s
>
> *-bash-3.2$ python anyserver.py --server=gunicorn*
> starting gunicorn on 127.0.0.1:8000...
> Usage: anyserver.py [options]
>
> anyserver.py: error: no such option: --server
>
>
> *-bash-3.2$ python anyserver.py -s gunicorn -i 72.3.247.225 -p 9065*
> starting gunicorn on 72.3.247.225:9065...
> Usage: anyserver.py [options]
>
>
> anyserver.py: error: no such option: -s
>
> *========It only starts rocket server*=====* This works for me but  only 
> on rocket*
> -bash-3.2$ *python anyserver.py  gunicorn -i 72.3.247.225 -p 9065*
> starting *rocket on 72.3.247.225:9065*...
>
> *-bash-3.2$ python anyserver.py --server="gunicorn" -i 72.3.247.225 -p 
> 9065*
> starting gunicorn on 72.3.247.225:9065...
> Usage: anyserver.py [options]
>
> *anyserver.py: error: no such option: --server*
>
> *-bash-3.2$ python anyserver.py -s "gunicorn" -i 72.3.247.225 -p 9065*
> starting gunicorn on 72.3.247.225:9065...
> Usage: anyserver.py [options]
>
> anyserver.py: error: no such option: -s
>
> ===Starts rocket =======
> *-bash-3.2$ python anyserver.py  "gunicorn" -i 72.3.247.225 -p 9065*
> *starting rocket on 72.3.247.225:9065...*
>
> Please suggest - 
>
> Thanks, 
>
> Sincerely, Rahul D. [www.flockbird.com]
> =========================================================================
> On Tuesday, April 17, 2012 8:54:58 PM UTC+5:30, Massimo Di Pierro wrote:
>>
>> Can you try the anyserver in trunk? Looks like they changed some API.
>>
>> On Tuesday, 17 April 2012 05:43:51 UTC-5, Rahul wrote:
>>>
>>> Hi Massimo,
>>>          I did the typo in the "anyserver.py" file but now I am getting 
>>> this issue. 
>>>
>>> -bash-3.2$ *python anyserver.py -s gunicorn*
>>> starting gunicorn on 127.0.0.1:8000...
>>> Traceback (most recent call last):
>>>   File "anyserver.py", line 299, in <module>
>>>     main()
>>>   File "anyserver.py", line 295, in main
>>>     
>>> run(options.server,options.ip,options.port,logging=options.logging,profiler=options.profiler)
>>>   File "anyserver.py", line 157, in run
>>>     getattr(Servers,servername)(application,(ip,int(port)))
>>>   File "anyserver.py", line 129, in gunicorn
>>>     gunicorn.arbiter.Arbiter(address, 4, app).run()
>>> TypeError: __init__() takes exactly 2 arguments (4 given)
>>> ===================
>>> Same case for custom ip and port
>>> ===================
>>> -bash-3.2$ *python anyserver.py -s gunicorn -i 72.3.247.225 -p 9065*
>>> starting gunicorn on 72.3.247.225:9065...
>>> Traceback (most recent call last):
>>>   File "anyserver.py", line 299, in <module>
>>>     main()
>>>   File "anyserver.py", line 295, in main
>>>     
>>> run(options.server,options.ip,options.port,logging=options.logging,profiler=options.profiler)
>>>   File "anyserver.py", line 157, in run
>>>     getattr(Servers,servername)(application,(ip,int(port)))
>>>   File "anyserver.py", line 129, in gunicorn
>>>     gunicorn.arbiter.Arbiter(address, 4, app).run()
>>> TypeError: __init__() takes exactly 2 arguments (4 given)
>>>
>>> Please suggest what could be wrong. I am new to gunicorn and anyserver. 
>>> Also direct me to some quality documentation for anyserver.py 
>>>
>>>
>>> Thanks, 
>>> Sincerely,  Rahul D.
>>>
>>>
>>> On Friday, July 22, 2011 8:36:11 PM UTC+5:30, Massimo Di Pierro wrote:
>>>>
>>>> Hello everybody, 
>>>>
>>>> heroku will be supporting web2py. They run gunicorn. web2py runs with 
>>>> gunicorn but I have never tried it. 
>>>>
>>>> Any volunteer to run some stress tests? 
>>>>
>>>> cd web2py 
>>>> python anyserver -s gunicorn 
>>>>
>>>> Massimo
>>>
>>>

Reply via email to