librelist archives

« back to archive

Specifying two servers.

Specifying two servers.

From:
Madireddy Samuel Vijaykumar
Date:
2010-09-23 @ 12:31
Hi,

I was playing with mongrel2.conf file and added an additional Server() entry
something like the following.

web_app_proxy1 = Proxy(addr='127.0.0.1', port=9090)
mongrel21 = Host(name="localhost", routes={
    '/': web_app_proxy1
    })

main1 = Server(
    uuid="a8af9fa8-c707-11df-8b1d-0024e8a20bc8",
    access_log="/logs/access1.log",
    error_log="/logs/error1.log",
    chroot="./",
    pid_file="/run/mongrel21.pid"
    default_host="localhost",
    name="main1",
    port=6768,
    hosts=[mongrel21]
)

servers = [main, main1]

now when load the configuration, and list the servers all is well. But when
i try to start the "locahost" i end up with an error.

(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:9997 send_ident=34f9ceee-cd52-4b7f-b197-88bf2f0ec378
recv_spec=tcp://127.0.0.1:9996 recv_ident=
INFO (src/config/config.c:68) Loaded handler 2 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 3 with send_spec=tcp://
127.0.0.1:9995 send_ident=53f9f1d1-1116-4751-b6ff-4fbe3e43d142
recv_spec=tcp://127.0.0.1:9994 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/config/config.c:98) Loaded proxy 3 with address=127.0.0.1
port=9090
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=tests/
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/config/config.c:128) Loaded dir 4 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:177) Created proxy route 10:/ -> 127.0.0.1:9090
INFO (src/config/config.c:224) Adding host 2:localhost to server at pattern
localhost
INFO (src/config/config.c:265) Loaded server
2:a8af9fa8-c707-11df-8b1d-0024e8a20bc8 on port 6768 with default host
localhost
INFO (src/mime.c:49) MAX limits.mime_ext_len=128
ERROR (src/mime.c:64: errno: No such file or directory) MIME extension .obd
already exists, can't add .obd:application/x-msbinder
ERROR (src/config/config.c:305: errno: Success) Failed to create mimetype
.obd:application/x-msbinder from id 851
ERROR (src/config/db.c:68: errno: Success) [SQL ERROR]: SELECT id,
extension, mimetype FROM mimetype : 'callback requested query abort'
ERROR (src/config/config.c:318: errno: Success) Failed to load mimetypes
ERROR (src/mongrel2.c:117: errno: Success) Failed to load mime types.
ERROR (src/mongrel2.c:277: errno: Success) Aborting since can't load server.
ERROR (src/mongrel2.c:314: errno: Success) Exiting due to error.

Is there something I am missing here.

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

Re: [mongrel2] Specifying two servers.

From:
Zed A. Shaw
Date:
2010-09-23 @ 18:51
On Thu, Sep 23, 2010 at 06:01:45PM +0530, Madireddy Samuel Vijaykumar wrote:
> Hi,
> 
> I was playing with mongrel2.conf file and added an additional Server() entry
> something like the following.
> 
> ERROR (src/mime.c:64: errno: No such file or directory) MIME extension .obd
> already exists, can't add .obd:application/x-msbinder
> 
> Is there something I am missing here.

That error looks like you added a mimetype and it seems the config is
duplicating them.  Can you add a ticket and include the mimetypes you
added?

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