librelist archives

« back to archive

Documentation Error so far

Documentation Error so far

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-22 @ 01:47
Hi,

Thanks for coming up with a language agnostic web server and that too with
an MVC pattern in mind. Great!

I have been going through the documentation and couple of things that I
wanted to bring up to your notice that I hit upon so far.

Before i go any further I would like to tell that I use virtualenv
extensively and I have installed mongrel2 too in a virtualenv(mongrel2) .
And also all the following commands are run as a normal user.

1. In "Trying m2sh"

When I try to do
> m2sh servers -db tests/config.sqlite

I get this...

ERROR (src/unixy.c:99: errno: No such file or directory) Failed to open PID
file .//run/mongrel2.pid for reading.
INFO (src/unixy.c:138) No previous Mongrel2 running, continuing on.
ERROR (src/unixy.c:55: errno: Operation not permitted) Can't chroot to ./,
rerun as root if this is what you want.
ERROR (src/mongrel2.c:186: errno: Success) Couldn't chroot too ./, assuming
running in test mode.
ERROR (src/unixy.c:166: errno: No such file or directory) Failed to open PID
file ./run/mongrel2.pid for writing.
ERROR (src/mongrel2.c:193: errno: Success) Failed to make the PID file
./run/mongrel2.pid
ERROR (src/mongrel2.c:281: errno: Success) Major failure in chroot/droppriv,
aborting.
ERROR (src/mongrel2.c:310: errno: Success) Exiting due to error.

which means that I need create the "run" directory in  the current
directory. Which is not assumed, but i guess needs to be explicitly
specified.

2. Once you start the service as normal user in debug mode it is not very
clear, as to where the server is running and what it is doing. I guess
something on that would help as well.

3. In "Simple Configuration File"

> m2sh load -config examples/python/tests/sample_conf.py

Does not work....

Traceback (most recent call last):
  File "/usr/bin/m2sh", line 5, in <module>
    pkg_resources.run_script('m2py==1.0beta7', 'm2sh')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 467, in
run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1200, in
run_script
    execfile(script_filename, namespace, namespace)
  File
"/usr/lib/python2.6/site-packages/m2py-1.0beta7-py2.6.egg/EGG-INFO/scripts/m2sh",
line 12, in <module>
    args.parse_and_run_command(sys.argv[1:], commands,
default_command="shell")
  File

"/usr/lib/python2.6/site-packages/m2py-1.0beta7-py2.6.egg/mongrel2/config/args.py",
line 244, in parse_and_run_command
    command_module(mod, command, options)
  File

"/usr/lib/python2.6/site-packages/m2py-1.0beta7-py2.6.egg/mongrel2/config/args.py",
line 177, in command_module
    ensure_defaults(options, kwargs)
  File

"/usr/lib/python2.6/site-packages/m2py-1.0beta7-py2.6.egg/mongrel2/config/args.py",
line 168, in ensure_defaults
    raise ArgumentError("Option -%s is required by this command." % key)
mongrel2.config.args.ArgumentError: Option -db is required by this command.

... unless i create an config.sqlite file in the current directory. And the
subsequent commands too need the -db option specifying the config.sqlite.

Sam
"""
Anyday...
Above the ground and vertical
... is a good day!
"""
http://megam.info
:)~

Re: [mongrel2] Documentation Error so far

From:
Zed A. Shaw
Date:
2010-09-22 @ 03:08
On Wed, Sep 22, 2010 at 07:17:53AM +0530, Madireddy Samuel Vijaykumar wrote:
> Hi,
> 
> Thanks for coming up with a language agnostic web server and that too with
> an MVC pattern in mind. Great!
> 
> I have been going through the documentation and couple of things that I
> wanted to bring up to your notice that I hit upon so far.

Cool thanks for doing that.

> Before i go any further I would like to tell that I use virtualenv
> extensively and I have installed mongrel2 too in a virtualenv(mongrel2) .
> And also all the following commands are run as a normal user.

Ok, so is this with the new C m2sh or the m2sh Python command?

> 1. In "Trying m2sh"
> 
> When I try to do
> > m2sh servers -db tests/config.sqlite

This log is from start not servers.  I do m2sh servers and I get:

SERVERS:
------
 test  localhost  AC1F8236-5919-4696-9D40-0F38DE9E5861 

> which means that I need create the "run" directory in  the current
> directory. Which is not assumed, but i guess needs to be explicitly
> specified.

That should be in the docs too, I'll check it.

> 2. Once you start the service as normal user in debug mode it is not very
> clear, as to where the server is running and what it is doing. I guess
> something on that would help as well.

Ok, sure I can tell you that yes, it is running. :-)

> 3. In "Simple Configuration File"
> 
> > m2sh load -config examples/python/tests/sample_conf.py

Oh that's wrong, fixed.

> Traceback (most recent call last):
>   File "/usr/bin/m2sh", line 5, in <module>
>     pkg_resources.run_script('m2py==1.0beta7', 'm2sh')
>   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 467, in

Oh so you're running the python version.  The docs no longer apply to
the python m2sh, and actually it should be called m2shpy really.
Anyway, use the C m2sh.  It's better. :-)

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Documentation Error so far

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-22 @ 03:22
Thanks Zed!

Well i am using the 1.0 version of mongrel2. I guess the C version is in
1.1.

Sam
"""
Anyday...
Above the ground and vertical
... is a good day!
"""
http://megam.info
:)~




On Wed, Sep 22, 2010 at 8:38 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:

> On Wed, Sep 22, 2010 at 07:17:53AM +0530, Madireddy Samuel Vijaykumar
> wrote:
> > Hi,
> >
> > Thanks for coming up with a language agnostic web server and that too
> with
> > an MVC pattern in mind. Great!
> >
> > I have been going through the documentation and couple of things that I
> > wanted to bring up to your notice that I hit upon so far.
>
> Cool thanks for doing that.
>
> > Before i go any further I would like to tell that I use virtualenv
> > extensively and I have installed mongrel2 too in a virtualenv(mongrel2) .
> > And also all the following commands are run as a normal user.
>
> Ok, so is this with the new C m2sh or the m2sh Python command?
>
> > 1. In "Trying m2sh"
> >
> > When I try to do
> > > m2sh servers -db tests/config.sqlite
>
> This log is from start not servers.  I do m2sh servers and I get:
>
> SERVERS:
> ------
>  test  localhost  AC1F8236-5919-4696-9D40-0F38DE9E5861
>
> > which means that I need create the "run" directory in  the current
> > directory. Which is not assumed, but i guess needs to be explicitly
> > specified.
>
> That should be in the docs too, I'll check it.
>
> > 2. Once you start the service as normal user in debug mode it is not very
> > clear, as to where the server is running and what it is doing. I guess
> > something on that would help as well.
>
> Ok, sure I can tell you that yes, it is running. :-)
>
> > 3. In "Simple Configuration File"
> >
> > > m2sh load -config examples/python/tests/sample_conf.py
>
> Oh that's wrong, fixed.
>
> > Traceback (most recent call last):
> >   File "/usr/bin/m2sh", line 5, in <module>
> >     pkg_resources.run_script('m2py==1.0beta7', 'm2sh')
> >   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 467, in
>
> Oh so you're running the python version.  The docs no longer apply to
> the python m2sh, and actually it should be called m2shpy really.
> Anyway, use the C m2sh.  It's better. :-)
>
> --
> Zed A. Shaw
> http://zedshaw.com/
>

Re: [mongrel2] Documentation Error so far

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-22 @ 06:00
Well! Now i have installed mongrel2 1.1 and used the quick start guide.
Followed the install instruction and then "Configuring first time", where
you mention...

> cp examples/configs/sample.conf mysite.conf
> m2sh load -config myconfig.py
> ls config.sqlite

... the second line cannot be possibly right as there is no
myconfig.py on the current directory. And i endup with this when i run
it.

(mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config mycofig.py
ERROR (src/lexer.rl:136: errno: No such file or directory) Failed to
open file: mycofig.py
ERROR (src/config_file.c:248: errno: Success) Error parsing config
file: mycofig.py.
ERROR (src/config/db.c:68: errno: No such file or directory) [SQL
ERROR]: INSERT INTO log (who, what, location, how, why) VALUES ('sam',
'load', 'sam.csslabs', 'mycofig.py', 'command') : 'no such table: log'
ERROR (src/commands.c:47: errno: Success) Failed to add log message,
you're flying blind.

Now when i try to use mysite.conf to load the config i get this...

(mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config mysite.conf
ERROR (src/lexer.rl:80: errno: Success) SYNTAX ERROR AT 'm' on line 2:
     ^
ERROR (src/lexer.rl:144: errno: Success) Failed to parse file: mysite.conf
ERROR (src/config_file.c:248: errno: Success) Error parsing config file:
mysite.conf.
ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
INSERT INTO log (who, what, location, how, why) VALUES ('sam', 'load',
'sam.csslabs', 'mysite.conf', 'command') : 'no such table: log'
ERROR (src/commands.c:47: errno: Success) Failed to add log message, you're
flying blind.

Please let me know if you need more information on my installation other
than give below.
OS and Distro: Linux(Fedora 13)
gcc version: gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
Python: Python 2.6.4
Mongrel2 version: 1.1
Mogrel2 install path: /livingcode/sandbox/mongrel2
env PATH:

PATH=/livingcode/sandbox/mongrel2/bin:/usr/lib/jvm/java-openjdk/bin:/opt/erlang/bin:/home/sam/.rvm/bin:/usr/lib/jvm/java-openjdk/bin:/opt/erlang/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/sam/bin

Sam


"""
Anyday...
Above the ground and vertical
... is a good day!
"""
http://megam.info
:)~




On Wed, Sep 22, 2010 at 8:52 AM, Madireddy Samuel Vijaykumar <
mad.vijay@gmail.com> wrote:

> Thanks Zed!
>
> Well i am using the 1.0 version of mongrel2. I guess the C version is in
> 1.1.
>
> Sam
> """
> Anyday...
> Above the ground and vertical
> ... is a good day!
> """
> http://megam.info
> :)~
>
>
>
>
> On Wed, Sep 22, 2010 at 8:38 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
>
>> On Wed, Sep 22, 2010 at 07:17:53AM +0530, Madireddy Samuel Vijaykumar
>> wrote:
>> > Hi,
>> >
>> > Thanks for coming up with a language agnostic web server and that too
>> with
>> > an MVC pattern in mind. Great!
>> >
>> > I have been going through the documentation and couple of things that I
>> > wanted to bring up to your notice that I hit upon so far.
>>
>> Cool thanks for doing that.
>>
>> > Before i go any further I would like to tell that I use virtualenv
>> > extensively and I have installed mongrel2 too in a virtualenv(mongrel2)
>> .
>> > And also all the following commands are run as a normal user.
>>
>> Ok, so is this with the new C m2sh or the m2sh Python command?
>>
>> > 1. In "Trying m2sh"
>> >
>> > When I try to do
>> > > m2sh servers -db tests/config.sqlite
>>
>> This log is from start not servers.  I do m2sh servers and I get:
>>
>> SERVERS:
>> ------
>>  test  localhost  AC1F8236-5919-4696-9D40-0F38DE9E5861
>>
>> > which means that I need create the "run" directory in  the current
>> > directory. Which is not assumed, but i guess needs to be explicitly
>> > specified.
>>
>> That should be in the docs too, I'll check it.
>>
>> > 2. Once you start the service as normal user in debug mode it is not
>> very
>> > clear, as to where the server is running and what it is doing. I guess
>> > something on that would help as well.
>>
>> Ok, sure I can tell you that yes, it is running. :-)
>>
>> > 3. In "Simple Configuration File"
>> >
>> > > m2sh load -config examples/python/tests/sample_conf.py
>>
>> Oh that's wrong, fixed.
>>
>> > Traceback (most recent call last):
>> >   File "/usr/bin/m2sh", line 5, in <module>
>> >     pkg_resources.run_script('m2py==1.0beta7', 'm2sh')
>> >   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 467, in
>>
>> Oh so you're running the python version.  The docs no longer apply to
>> the python m2sh, and actually it should be called m2shpy really.
>> Anyway, use the C m2sh.  It's better. :-)
>>
>> --
>> Zed A. Shaw
>> http://zedshaw.com/
>>
>
>

Re: [mongrel2] Documentation Error so far

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-22 @ 06:28
Jumping to the manual in "Trying m2sh". When i do

(mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -db tests/config.sqlite -host
localhost
ERROR (src/commands.c:193: errno: Success) You need to give a -server of the
server to list hosts from.

And then if i try as mentioned in the error. I get,

(mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -db tests/config.sqlite -server
localhost
HOSTS in localhost:
-----

It would be good have it explained what is going on.

Sam

"""
Anyday...
Above the ground and vertical
... is a good day!
"""
http://megam.info
:)~




On Wed, Sep 22, 2010 at 11:30 AM, Madireddy Samuel Vijaykumar <
mad.vijay@gmail.com> wrote:

> Well! Now i have installed mongrel2 1.1 and used the quick start guide.
> Followed the install instruction and then "Configuring first time", where
> you mention...
>
> > cp examples/configs/sample.conf mysite.conf
> > m2sh load -config myconfig.py
> > ls config.sqlite
>
> ... the second line cannot be possibly right as there is no myconfig.py 
on the current directory. And i endup with this when i run it.
>
> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config mycofig.py
> ERROR (src/lexer.rl:136: errno: No such file or directory) Failed to 
open file: mycofig.py
> ERROR (src/config_file.c:248: errno: Success) Error parsing config file:
mycofig.py.
> ERROR (src/config/db.c:68: errno: No such file or directory) [SQL 
ERROR]: INSERT INTO log (who, what, location, how, why) VALUES ('sam', 
'load', 'sam.csslabs', 'mycofig.py', 'command') : 'no such table: log'
> ERROR (src/commands.c:47: errno: Success) Failed to add log message, 
you're flying blind.
>
> Now when i try to use mysite.conf to load the config i get this...
>
> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config mysite.conf
> ERROR (src/lexer.rl:80: errno: Success) SYNTAX ERROR AT 'm' on line 2:
>      ^
> ERROR (src/lexer.rl:144: errno: Success) Failed to parse file: mysite.conf
> ERROR (src/config_file.c:248: errno: Success) Error parsing config file:
> mysite.conf.
> ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
> INSERT INTO log (who, what, location, how, why) VALUES ('sam', 'load',
> 'sam.csslabs', 'mysite.conf', 'command') : 'no such table: log'
> ERROR (src/commands.c:47: errno: Success) Failed to add log message, you're
> flying blind.
>
> Please let me know if you need more information on my installation other
> than give below.
> OS and Distro: Linux(Fedora 13)
> gcc version: gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
> Python: Python 2.6.4
> Mongrel2 version: 1.1
> Mogrel2 install path: /livingcode/sandbox/mongrel2
> env PATH:
> 
PATH=/livingcode/sandbox/mongrel2/bin:/usr/lib/jvm/java-openjdk/bin:/opt/erlang/bin:/home/sam/.rvm/bin:/usr/lib/jvm/java-openjdk/bin:/opt/erlang/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/sam/bin
>
> Sam
>
>
> """
> Anyday...
> Above the ground and vertical
> ... is a good day!
> """
> http://megam.info
> :)~
>
>
>
>
> On Wed, Sep 22, 2010 at 8:52 AM, Madireddy Samuel Vijaykumar <
> mad.vijay@gmail.com> wrote:
>
>> Thanks Zed!
>>
>> Well i am using the 1.0 version of mongrel2. I guess the C version is in
>> 1.1.
>>
>> Sam
>> """
>> Anyday...
>> Above the ground and vertical
>> ... is a good day!
>> """
>> http://megam.info
>> :)~
>>
>>
>>
>>
>> On Wed, Sep 22, 2010 at 8:38 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
>>
>>> On Wed, Sep 22, 2010 at 07:17:53AM +0530, Madireddy Samuel Vijaykumar
>>> wrote:
>>> > Hi,
>>> >
>>> > Thanks for coming up with a language agnostic web server and that too
>>> with
>>> > an MVC pattern in mind. Great!
>>> >
>>> > I have been going through the documentation and couple of things that I
>>> > wanted to bring up to your notice that I hit upon so far.
>>>
>>> Cool thanks for doing that.
>>>
>>> > Before i go any further I would like to tell that I use virtualenv
>>> > extensively and I have installed mongrel2 too in a virtualenv(mongrel2)
>>> .
>>> > And also all the following commands are run as a normal user.
>>>
>>> Ok, so is this with the new C m2sh or the m2sh Python command?
>>>
>>> > 1. In "Trying m2sh"
>>> >
>>> > When I try to do
>>> > > m2sh servers -db tests/config.sqlite
>>>
>>> This log is from start not servers.  I do m2sh servers and I get:
>>>
>>> SERVERS:
>>> ------
>>>  test  localhost  AC1F8236-5919-4696-9D40-0F38DE9E5861
>>>
>>> > which means that I need create the "run" directory in  the current
>>> > directory. Which is not assumed, but i guess needs to be explicitly
>>> > specified.
>>>
>>> That should be in the docs too, I'll check it.
>>>
>>> > 2. Once you start the service as normal user in debug mode it is not
>>> very
>>> > clear, as to where the server is running and what it is doing. I guess
>>> > something on that would help as well.
>>>
>>> Ok, sure I can tell you that yes, it is running. :-)
>>>
>>> > 3. In "Simple Configuration File"
>>> >
>>> > > m2sh load -config examples/python/tests/sample_conf.py
>>>
>>> Oh that's wrong, fixed.
>>>
>>> > Traceback (most recent call last):
>>> >   File "/usr/bin/m2sh", line 5, in <module>
>>> >     pkg_resources.run_script('m2py==1.0beta7', 'm2sh')
>>> >   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 467,
>>> in
>>>
>>> Oh so you're running the python version.  The docs no longer apply to
>>> the python m2sh, and actually it should be called m2shpy really.
>>> Anyway, use the C m2sh.  It's better. :-)
>>>
>>> --
>>> Zed A. Shaw
>>> http://zedshaw.com/
>>>
>>
>>
>

Re: [mongrel2] Documentation Error so far

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-22 @ 07:13
Sorry for spamming in this way. In the "Simple Configuration File" section
the following this what will happen if there is not config.sqlite already
there in the directory where you are running these commands from.

(mongrel2)[sam@sam mongrel2-1.1]$ rm config.sqlite
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config
examples/configs/sample.conf
ERROR (src/lexer.rl:80: errno: Success) SYNTAX ERROR AT 'm' on line 2:
     ^
ERROR (src/lexer.rl:144: errno: Success) Failed to parse file:
examples/configs/sample.conf
ERROR (src/config_file.c:248: errno: Success) Error parsing config file:
examples/configs/sample.conf.
ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
INSERT INTO log (who, what, location, how, why) VALUES ('sam', 'load',
'sam.csslabs', 'examples/configs/sample.conf', 'command') : 'no such table:
log'
ERROR (src/commands.c:47: errno: Success) Failed to add log message, you're
flying blind.
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh servers
SERVERS:
------
ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
SELECT name, default_host, uuid from server : 'no such table: server'
ERROR (src/commands.c:166: errno: Success) Query failed: config.sqlite.
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -host localhost
ERROR (src/commands.c:193: errno: Success) You need to give a -server of the
server to list hosts from.
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -server localhost
HOSTS in localhost:
-----
ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
SELECT id, name from host where server_id = (select id from server where
name = 'localhost') : 'no such table: host'
ERROR (src/commands.c:166: errno: Success) Query failed: config.sqlite.
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh start -host localhost
ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
SELECT uuid FROM server where default_host = 'localhost' : 'no such table:
server'
ERROR (src/commands.c:308: errno: Success) Operation on server failed.
(mongrel2)[sam@sam mongrel2-1.1]$

But if i move the config.sqlite from the tests to the this directory this is
what happens...

(mongrel2)[sam@sam mongrel2-1.1]$ cp tests/config.sqlite .
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config
examples/configs/sample.conf
ERROR (src/lexer.rl:80: errno: Success) SYNTAX ERROR AT 'm' on line 2:
     ^
ERROR (src/lexer.rl:144: errno: Success) Failed to parse file:
examples/configs/sample.conf
ERROR (src/config_file.c:248: errno: Success) Error parsing config file:
examples/configs/sample.conf.
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh servers
SERVERS:
------
 test  localhost  AC1F8236-5919-4696-9D40-0F38DE9E5861
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -server localhost
HOSTS in localhost:
-----
(mongrel2)[sam@sam mongrel2-1.1]$ m2sh start -host localhost
INFO (src/handler.c:320) MAX limits.handler_stack=102400
INFO (src/config/config.c:68) Loaded handler 1 with send_spec=tcp://
127.0.0.1:9999 send_ident=54c6755b-9628-40a4-9a2d-cc82a816345e
recv_spec=tcp://127.0.0.1:9998 recv_ident=
INFO (src/config/config.c:68) Loaded handler 2 with send_spec=tcp://
127.0.0.1:9997 send_ident=54c6755b-9628-40a4-9a2d-cc82a816345e
recv_spec=tcp://127.0.0.1:9996 recv_ident=
INFO (src/config/config.c:98) Loaded proxy 1 with address=127.0.0.1
port=8080
INFO (src/config/config.c:98) Loaded proxy 2 with address=127.0.0.1
port=8080
INFO (src/dir.c:215) MAX limits.dir_send_buffer=16384,
limits.dir_max_path=256
INFO (src/config/config.c:128) Loaded dir 1 with base=tests/
index=index.html def_ctype=text/plain
INFO (src/config/config.c:128) Loaded dir 2 with base=examples/chat/static/
index=index.html def_ctype=text/plain
INFO (src/config/config.c:128) Loaded dir 3 with base=examples/chat/static/
index=index.html def_ctype=text/plain
INFO (src/host.c:62) MAX limits.url_path=256, limits.host_name=256
INFO (src/config/config.c:167) Created handler route 1:@chat ->
54c6755b-9628-40a4-9a2d-cc82a816345e:tcp://127.0.0.1:9999
INFO (src/config/config.c:167) Created handler route 2:/handlertest ->
54c6755b-9628-40a4-9a2d-cc82a816345e:tcp://127.0.0.1:9997
INFO (src/config/config.c:177) Created proxy route 3:/chat/ ->
127.0.0.1:8080
INFO (src/config/config.c:177) Created proxy route 4:/ -> 127.0.0.1:8080
INFO (src/config/config.c:187) Created directory route 5:/tests/ -> 1:tests/
INFO (src/config/config.c:187) Created directory route
6:/testsmulti/(.*.json) -> 1:tests/
INFO (src/config/config.c:187) Created directory route 7:/chatdemo/ ->
2:examples/chat/static/
INFO (src/config/config.c:187) Created directory route 8:/static/ ->
3:examples/chat/static/
INFO (src/config/config.c:224) Adding host 1:localhost to server at pattern
localhost
INFO (src/config/config.c:265) Loaded server
1:AC1F8236-5919-4696-9D40-0F38DE9E5861 on port 6767 with default host
localhost
INFO (src/mime.c:49) MAX limits.mime_ext_len=128
INFO (src/superpoll.c:249) Could not force NOFILE higher, you'll need to run
as root: Operation not permitted
INFO (src/superpoll.c:255) MAX open file descriptors is 1024 now.
ERROR (src/unixy.c:99: errno: No such file or directory) Failed to open PID
file .//run/mongrel2.pid for reading.
INFO (src/unixy.c:138) No previous Mongrel2 running, continuing on.
ERROR (src/unixy.c:55: errno: Operation not permitted) Can't chroot to ./,
rerun as root if this is what you want.
ERROR (src/mongrel2.c:188: errno: Success) Couldn't chroot too ./, assuming
running in test mode.
ERROR (src/log.c:18: errno: No such file or directory) Failed to open the
access log: /logs/access.log
INFO (src/server.c:118) Starting 0MQ with 1 threads.
INFO (src/request.c:55) MAX limits.header_count=1280
INFO (src/connection.c:879) MAX limits.content_length=20480,
limits.buffer_size=4096, limits.connection_stack_size=32768
INFO (src/mongrel2.c:293) Starting Mongrel2/1.1-ca9a3f414b. Copyright (C)
Zed A. Shaw. Licensed BSD.
INFO (src/server.c:136) Starting server on port 6767
INFO (src/task/fd.c:140) MAX limits.fdtask_stack=102400
INFO (src/superpoll.c:102) Allowing for 256 hot and 768 idle file
descriptors (dividend was 4)
INFO (src/control.rl:151) Setting up control socket in at ipc://run/control
INFO (src/handler.c:197) MAX allowing limits.handler_targets=128
INFO (src/handler.c:275) Binding handler PUSH socket
tcp://127.0.0.1:9999with identity:
54c6755b-9628-40a4-9a2d-cc82a816345e
INFO (src/handler.c:297) Binding listener SUB socket
tcp://127.0.0.1:9998subscribed to:
INFO (src/handler.c:197) MAX allowing limits.handler_targets=128
INFO (src/handler.c:275) Binding handler PUSH socket
tcp://127.0.0.1:9997with identity:
54c6755b-9628-40a4-9a2d-cc82a816345e
INFO (src/handler.c:297) Binding listener SUB socket
tcp://127.0.0.1:9996subscribed to:

So i go ahead and run a small bottle application on 8080 and run it ....

(bottle)[sam@sam bottle]$ gunicorn -b 127.0.0.1:8080 -w 5 hello:app
2010-09-22 12:02:35 [3655] [INFO] Starting gunicorn 0.11.1
2010-09-22 12:02:35 [3655] [INFO] Listening at: http://127.0.0.1:8080
2010-09-22 12:02:35 [3657] [INFO] Booting worker with pid: 3657
2010-09-22 12:02:35 [3658] [INFO] Booting worker with pid: 3658
2010-09-22 12:02:35 [3659] [INFO] Booting worker with pid: 3659
2010-09-22 12:02:35 [3661] [INFO] Booting worker with pid: 3661
2010-09-22 12:02:35 [3660] [INFO] Booting worker with pid: 3660

and then from another console i do...
[sam@sam mongrel2-1.1]$ curl http://localhost:6767/
Hello World![sam@sam mongrel2-1.1]$ curl http://localhost:6767/
Hello World![sam@sam mongrel2-1.1]$ curl http://localhost:6767/
Hello World![sam@sam mongrel2-1.1]$ curl http://localhost:6767/
Hello World![sam@sam mongrel2-1.1]$ curl http://localhost:6767/
Hello World![sam@sam mongrel2-1.1]$ curl http://localhost:6767/
Hello World![sam@sam mongrel2-1.1]$


And i get this in the debug output of mongrel2

localhost 127.0.0.1 -- -- 1285139523 "GET / HTTP/1.1" 200 12
localhost 127.0.0.1 -- -- 1285139524 "GET / HTTP/1.1" 200 12
localhost 127.0.0.1 -- -- 1285139524 "GET / HTTP/1.1" 200 12
localhost 127.0.0.1 -- -- 1285139525 "GET / HTTP/1.1" 200 12
localhost 127.0.0.1 -- -- 1285139526 "GET / HTTP/1.1" 200 12
localhost 127.0.0.1 -- -- 1285139526 "GET / HTTP/1.1" 200 12

which is great. But why is the config.sqlite not getting created as
mentioned in the documentation?

Sam

"""
Anyday...
Above the ground and vertical
... is a good day!
"""
http://megam.info
:)~




On Wed, Sep 22, 2010 at 11:58 AM, Madireddy Samuel Vijaykumar <
mad.vijay@gmail.com> wrote:

> Jumping to the manual in "Trying m2sh". When i do
>
> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -db tests/config.sqlite -host
> localhost
> ERROR (src/commands.c:193: errno: Success) You need to give a -server of
> the server to list hosts from.
>
> And then if i try as mentioned in the error. I get,
>
> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh hosts -db tests/config.sqlite
> -server localhost
> HOSTS in localhost:
> -----
>
> It would be good have it explained what is going on.
>
> Sam
>
> """
> Anyday...
> Above the ground and vertical
> ... is a good day!
> """
> http://megam.info
> :)~
>
>
>
>
> On Wed, Sep 22, 2010 at 11:30 AM, Madireddy Samuel Vijaykumar <
> mad.vijay@gmail.com> wrote:
>
>> Well! Now i have installed mongrel2 1.1 and used the quick start guide.
>> Followed the install instruction and then "Configuring first time", where
>> you mention...
>>
>> > cp examples/configs/sample.conf mysite.conf
>> > m2sh load -config myconfig.py
>> > ls config.sqlite
>>
>> ... the second line cannot be possibly right as there is no myconfig.py
on the current directory. And i endup with this when i run it.
>>
>> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config mycofig.py
>> ERROR (src/lexer.rl:136: errno: No such file or directory) Failed to 
open file: mycofig.py
>> ERROR (src/config_file.c:248: errno: Success) Error parsing config 
file: mycofig.py.
>> ERROR (src/config/db.c:68: errno: No such file or directory) [SQL 
ERROR]: INSERT INTO log (who, what, location, how, why) VALUES ('sam', 
'load', 'sam.csslabs', 'mycofig.py', 'command') : 'no such table: log'
>> ERROR (src/commands.c:47: errno: Success) Failed to add log message, 
you're flying blind.
>>
>> Now when i try to use mysite.conf to load the config i get this...
>>
>> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config mysite.conf
>> ERROR (src/lexer.rl:80: errno: Success) SYNTAX ERROR AT 'm' on line 2:
>>      ^
>> ERROR (src/lexer.rl:144: errno: Success) Failed to parse file: mysite.conf
>> ERROR (src/config_file.c:248: errno: Success) Error parsing config file:
>> mysite.conf.
>> ERROR (src/config/db.c:68: errno: No such file or directory) [SQL ERROR]:
>> INSERT INTO log (who, what, location, how, why) VALUES ('sam', 'load',
>> 'sam.csslabs', 'mysite.conf', 'command') : 'no such table: log'
>> ERROR (src/commands.c:47: errno: Success) Failed to add log message,
>> you're flying blind.
>>
>> Please let me know if you need more information on my installation other
>> than give below.
>> OS and Distro: Linux(Fedora 13)
>> gcc version: gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
>> Python: Python 2.6.4
>> Mongrel2 version: 1.1
>> Mogrel2 install path: /livingcode/sandbox/mongrel2
>> env PATH:
>> 
PATH=/livingcode/sandbox/mongrel2/bin:/usr/lib/jvm/java-openjdk/bin:/opt/erlang/bin:/home/sam/.rvm/bin:/usr/lib/jvm/java-openjdk/bin:/opt/erlang/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/sam/bin
>>
>> Sam
>>
>>
>> """
>> Anyday...
>> Above the ground and vertical
>> ... is a good day!
>> """
>> http://megam.info
>> :)~
>>
>>
>>
>>
>> On Wed, Sep 22, 2010 at 8:52 AM, Madireddy Samuel Vijaykumar <
>> mad.vijay@gmail.com> wrote:
>>
>>> Thanks Zed!
>>>
>>> Well i am using the 1.0 version of mongrel2. I guess the C version is in
>>> 1.1.
>>>
>>> Sam
>>> """
>>> Anyday...
>>> Above the ground and vertical
>>> ... is a good day!
>>> """
>>> http://megam.info
>>> :)~
>>>
>>>
>>>
>>>
>>> On Wed, Sep 22, 2010 at 8:38 AM, Zed A. Shaw <zedshaw@zedshaw.com>wrote:
>>>
>>>> On Wed, Sep 22, 2010 at 07:17:53AM +0530, Madireddy Samuel Vijaykumar
>>>> wrote:
>>>> > Hi,
>>>> >
>>>> > Thanks for coming up with a language agnostic web server and that too
>>>> with
>>>> > an MVC pattern in mind. Great!
>>>> >
>>>> > I have been going through the documentation and couple of things that
>>>> I
>>>> > wanted to bring up to your notice that I hit upon so far.
>>>>
>>>> Cool thanks for doing that.
>>>>
>>>> > Before i go any further I would like to tell that I use virtualenv
>>>> > extensively and I have installed mongrel2 too in a
>>>> virtualenv(mongrel2) .
>>>> > And also all the following commands are run as a normal user.
>>>>
>>>> Ok, so is this with the new C m2sh or the m2sh Python command?
>>>>
>>>> > 1. In "Trying m2sh"
>>>> >
>>>> > When I try to do
>>>> > > m2sh servers -db tests/config.sqlite
>>>>
>>>> This log is from start not servers.  I do m2sh servers and I get:
>>>>
>>>> SERVERS:
>>>> ------
>>>>  test  localhost  AC1F8236-5919-4696-9D40-0F38DE9E5861
>>>>
>>>> > which means that I need create the "run" directory in  the current
>>>> > directory. Which is not assumed, but i guess needs to be explicitly
>>>> > specified.
>>>>
>>>> That should be in the docs too, I'll check it.
>>>>
>>>> > 2. Once you start the service as normal user in debug mode it is not
>>>> very
>>>> > clear, as to where the server is running and what it is doing. I guess
>>>> > something on that would help as well.
>>>>
>>>> Ok, sure I can tell you that yes, it is running. :-)
>>>>
>>>> > 3. In "Simple Configuration File"
>>>> >
>>>> > > m2sh load -config examples/python/tests/sample_conf.py
>>>>
>>>> Oh that's wrong, fixed.
>>>>
>>>> > Traceback (most recent call last):
>>>> >   File "/usr/bin/m2sh", line 5, in <module>
>>>> >     pkg_resources.run_script('m2py==1.0beta7', 'm2sh')
>>>> >   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 467,
>>>> in
>>>>
>>>> Oh so you're running the python version.  The docs no longer apply to
>>>> the python m2sh, and actually it should be called m2shpy really.
>>>> Anyway, use the C m2sh.  It's better. :-)
>>>>
>>>> --
>>>> Zed A. Shaw
>>>> http://zedshaw.com/
>>>>
>>>
>>>
>>
>

Re: [mongrel2] Documentation Error so far

From:
Zed A. Shaw
Date:
2010-09-22 @ 07:53
On Wed, Sep 22, 2010 at 12:43:21PM +0530, Madireddy Samuel Vijaykumar wrote:
> Sorry for spamming in this way. In the "Simple Configuration File" section
> the following this what will happen if there is not config.sqlite already
> there in the directory where you are running these commands from.
> 
> (mongrel2)[sam@sam mongrel2-1.1]$ rm config.sqlite
> (mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config
> examples/configs/sample.conf

Ahh yes, lovely, that's a bad config file that I didn't convert right.
Try the examples/configs/mongrel2.conf instead, or wait until later
today when I release 1.2 that has fixes and stuff.

Otherwise, most of the errors you're encountering are because you've got
the import lines from python, and instead of commit([main]) we now do
servers = [main].  You probably also have to drop the r'' syntax.

Let me know if you manage to make those edits and get your config
working.

Zed

Re: [mongrel2] Documentation Error so far

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-22 @ 14:01
Sooper. This is good i removed the import and it worked like a charm.

Carrying on further with the document.

"""
Anyday...
Above the ground and vertical
... is a good day!
"""
http://megam.info
:)~




On Wed, Sep 22, 2010 at 1:23 PM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:

> On Wed, Sep 22, 2010 at 12:43:21PM +0530, Madireddy Samuel Vijaykumar
> wrote:
> > Sorry for spamming in this way. In the "Simple Configuration File"
> section
> > the following this what will happen if there is not config.sqlite already
> > there in the directory where you are running these commands from.
> >
> > (mongrel2)[sam@sam mongrel2-1.1]$ rm config.sqlite
> > (mongrel2)[sam@sam mongrel2-1.1]$ m2sh load -config
> > examples/configs/sample.conf
>
> Ahh yes, lovely, that's a bad config file that I didn't convert right.
> Try the examples/configs/mongrel2.conf instead, or wait until later
> today when I release 1.2 that has fixes and stuff.
>
> Otherwise, most of the errors you're encountering are because you've got
> the import lines from python, and instead of commit([main]) we now do
> servers = [main].  You probably also have to drop the r'' syntax.
>
> Let me know if you manage to make those edits and get your config
> working.
>
> Zed
>
>