Forum OpenACS Development: second database, error: no access to pool

Hi, I'm trying to set up 2 or 3 pools for a second database. I'm getting this error, even when I configure the second database to be the same and the main database pools (where pool1, pool2, and pool3 work..):

no access to pool: "pool4"
    while executing
"ns_db gethandle $pool"
    invoked from within
"db_with_handle -dbn $dbn db {
        set selection [db_exec select $db $full_statement_name $sql]
        set result [list]
        while { [db_getro..."
    (procedure "db_list" line 23)
    invoked from within
"db_list -dbn other1 get_
.....

Any ideas about the cause?

Here's the relevant portions of the config.tcl file:

ns_section ns/db/pools 
    ns_param   pool1              "Pool 1"
    ns_param   pool2              "Pool 2"
    ns_param   pool3              "Pool 3"
    ns_param   pool4              "Pool4 Other1"
    ns_param   pool5              "Pool5 Other1"
    ns_param   pool6              "Pool6 Other1"

ns_section ns/db/pool/pool1
...

ns_section ns/db/pool/pool2
...

ns_section ns/db/pool/pool3
...

ns_section ns/db/pool/pool4
# in this section, changed ${db_name} to a predefined ${other1_name}, doesn't work with ${db_name} either (same error)
... 

ns_section ns/db/pool/pool5
# in this section, changed ${db_name} to a predefined ${other1_name}, doesn't work with ${db_name} either (same error)
...

ns_section ns/db/pool/pool6
# in this section, changed ${db_name} to a predefined ${other1_name}, doesn't work with ${db_name} either (same error)
...

ns_section ns/server/${server}/db
    ns_param   pools              pool1,pool2,pool3
# old was:   ns_param   pools             "*"
    ns_param   defaultpool        pool1

# following from https://openacs.org/doc/tutorial-second-database.html
ns_section ns/server/${server}/acs/database
    ns_param database_names [list main other1]
    ns_param pools_main [list pool1 pool2 pool3]
    ns_param pools_other1 [list pool4 pool5 pool6]
Collapse
Posted by Torben Brosten on

Log shows this on startup:

[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Database API: For database 'main', the following pools are available: pool1 pool2 pool3
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Database API: For database 'other1', the following pools are available: pool4 pool5 pool6
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Database API: Default database (dbn) is: 'main'
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Database API: The following pools are available for OpenACS: pool1 pool2 pool3
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: dbdrv: opening database 'postgres...'
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Opening ... on localhost
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Ns_PgOpenDb(postgres):  Openned connection to localhost...
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: dbdrv: opening database 'postgres...'
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Opening ... on localhost
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Ns_PgOpenDb(postgres):  Openned connection to localhost....
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: dbdrv: opening database 'postgres...'
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Opening ... on localhost
[07/Nov/2010:06:20:11][37078.17834160][-main-] Notice: Ns_PgOpenDb(postgres):  Openned connection to localhost....
Collapse
Posted by Claudio Pasolini on
The section:

ns_section ns/server/${server}/db
ns_param pools pool1,pool2,pool3
# old was: ns_param pools "*"
ns_param defaultpool pool1

should read:

ns_section ns/server/${server}/db
ns_param pools pool1,pool2,pool3,pool4,pool5,pool6
# old was: ns_param pools "*"
ns_param defaultpool pool1

Collapse
Posted by Torben Brosten on

Thank you, Claudio Pasolini. Unfortunately, same error after the change and a restart:

no access to pool: "pool4,pool5,pool6"
    while executing
"ns_db gethandle $pool"
    invoked from within
"db_with_handle -dbn $dbn db {
        set selection [db_exec select $db $full_statement_name $sql]
        set result [list]
        while { [db_getro..."
    (procedure "db_list" line 23)
    invoked from within
"db_list -dbn other1 get_
...
Collapse
Posted by Torben Brosten on
wait.. I edited the wrong line.. will post again with results.
Collapse
Posted by Torben Brosten on
Your suggestion works afterall. Thank you, again, Claudio Pasolini.