librelist archives

« back to archive

Error with possibly overlapping host name matching patterns

Error with possibly overlapping host name matching patterns

From:
Eimantas Vaiciunas
Date:
2011-07-03 @ 15:55
Hi

I have a situation where I need to route traffic to two different
handlers depending on the requested hostname. The problem is, that two
hosts partially overlap. One is i9.lt (with matching wildcard of
*.i9.lt), the other one is stg.i9.lt (with matching wildcard of
*.stg.i9.lt). Here is my config for these two hosts:

i9StagingHost = Host(
    name = 'stg.i9.lt',
    matching = '*.stg.i9.lt',
    routes={
        '/' : i9StagingHandler
    }
)

i9ProductionHost = Host(
    name = 'i9.lt',
    matching = '*.i9.lt',
    routes={
        '/' : i9ProductionHandler
    }
)

Later these hosts are added to the main server. When the config is
loaded, both hosts show up when `m2sh hosts -server main` is being
invoked.

When trying to start one of these I'm getting following error:

[ERROR] (src/config/db.c:117: errno: No such file or directory) Row is
past end of result set: 0 > 0
[ERROR] (errno: None) Invalid schema for row, should be: tns_tag_string
[ERROR] (errno: None) Failed to run internal operation.

I even tried removing config.sqlite and reloading the config from the
scratch. No dice.

Any help is appreciated.

// E.

Re: [mongrel2] Error with possibly overlapping host name matching patterns

From:
Zed A. Shaw
Date:
2011-07-03 @ 16:33
On Sun, Jul 03, 2011 at 06:55:12PM +0300, Eimantas Vaiciunas wrote:
> Hi
> 
> I have a situation where I need to route traffic to two different
> handlers depending on the requested hostname. The problem is, that two
> ..
> [ERROR] (src/config/db.c:117: errno: No such file or directory) Row is
> past end of result set: 0 > 0
> [ERROR] (errno: None) Invalid schema for row, should be: tns_tag_string
> [ERROR] (errno: None) Failed to run internal operation.

Interesting, can you send me the config.sqlite you're making offlist so
I can take a look at it?  It's probably an error in the query that I
need to fix.

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

Re: [mongrel2] Error with possibly overlapping host name matching patterns

From:
Eimantas Vaiciunas
Date:
2011-07-03 @ 16:38
On Sun, Jul 3, 2011 at 7:33 PM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
> Interesting, can you send me the config.sqlite you're making offlist so
> I can take a look at it?  It's probably an error in the query that I
> need to fix.

sent

// E.