List Info

Thread: example database configuration wit nspostgres on aolserver 4.5




example database configuration wit nspostgres on aolserver 4.5
user name
2006-10-26 07:50:34
Hi peeps,

can someone provide me an example of a configuration
from aolserver 4.5? I'm especially interested in the
database parts so what has to go exactly into the
ns/db parts and what modules to use.


I'm particular confused if the nsdbo.so has to be
loaded or not in the modules section. According to
this link,
http://panoptic.com/wiki/aolserver
/Annotated_AOLserver_Configuration_Reference,
it doesn't have to load but I don't get any response
from my efforts. The server loads without database
driver and thats frustating.

Hope you can help me out


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<listservlistserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message.
You can leave the Subject: field of your email blank.
example database configuration wit nspostgres on aolserver 4.5
user name
2006-10-26 08:34:52
You load nsdb in the server's modules section:

ns_section "ns/server/$/modules"
    ns_param nssock $/nssock.so
    ns_param nslog $/nslog.so
    ns_param nsperm $/nsperm.so
    ns_param nsdb $/nsdb.so
    ns_param nssession $/nssession.so
    ns_param nscp $/nscp.so

# Then load the postgres driver:

ns_section "ns/db/drivers"
    ns_param   postgres_driver nspostgres.so

# Create a pool:

ns_section "ns/db/pools"
ns_param   sativo    "Sativo Pool"

# define the pool:
ns_section "ns/db/pool/sativo"
    ns_param   driver          postgres_driver
    ns_param   datasource      localhost:5432:sativo2
    ns_param   user            nsd
    ns_param   password        xxxxxx
    ns_param   connections     20
    ns_param   logsqlerrors    true      ;# Verbose SQL
query error logging
    ns_param   verbose         false     ;# Verbose error
logging
    ns_param   maxidle         600       ;# Max time to keep
idle db conn
open
    ns_param   maxopen         3600

# Give the server access to pools:
ns_section "ns/server/$/db"
    ns_param pools          *            ;# Wildcard gives
access to all
    ns_param defaultpool    sativo

And that should do the trick!

Bas.

On Thursday, October 26, 2006 8:50, Dino Vliet said:
> Hi peeps,
>
> can someone provide me an example of a configuration
> from aolserver 4.5? I'm especially interested in the
> database parts so what has to go exactly into the
> ns/db parts and what modules to use.
>
>
> I'm particular confused if the nsdbo.so has to be
> loaded or not in the modules section. According to
> this link,
> http://panoptic.com/wiki/aolserver
/Annotated_AOLserver_Configuration_Reference,
> it doesn't have to load but I don't get any response
> from my efforts. The server loads without database
> driver and thats frustating.
>
> Hope you can help me out
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
protection around
> http://mail.yahoo.com
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email
to
> <listservlistserv.aol.com> with the
> body of "SIGNOFF AOLSERVER" in the email
message. You can leave the
> Subject: field of your email blank.
>


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<listservlistserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message.
You can leave the Subject: field of your email blank.
example database configuration wit nspostgres on aolserver 4.5
user name
2006-10-26 08:30:20
On Thu, Oct 26, 2006 at 12:50:34AM -0700, Dino Vliet wrote:

> can someone provide me an example of a configuration
> from aolserver 4.5? I'm especially interested in the
> database parts so what has to go exactly into the
> ns/db parts and what modules to use.

I don't know anything about AOLserver 4.5, so I'm going to
assume that
it's the same as for 4.0.10.x, and give you an answer for
that.

This should be a good start:

  http://cvs.openacs.org/cvs/openacs-4/e
tc/config.tcl?rev=1.39&view=auto

> I'm particular confused if the nsdbo.so has to be
> loaded or not in the modules section. According to

Yes, you must list nsdb.so in the modules section so that it
will get
loaded.  (You did not have to do this in AOLserver 3.x, but
you do in
4.x.)  E.g.:

  set dot_so [info sharedlibextension]
  ns_section ns/server/$server_name/modules
     ns_param nssock  nssock$
     ns_param nslog   nslog$
     ns_param nsdb    nsdb$

-- 
Andrew Piskorski <atppiskorski.com>
http://www.piskorski.com/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<listservlistserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message.
You can leave the Subject: field of your email blank.
example database configuration wit nspostgres on aolserver 4.5
user name
2006-10-26 14:22:38
So why is this happening to me:-(

Hi folks,

my sample-config looks like:

# Database drivers
ns_section "ns/db/drivers"

ns_param   postgres_driver    nspostgres.so;

ns_section "ns/db/pools"
ns_param  postgres_pool  "Postgres_pool"

ns_section "ns/db/pool/postgres_pool"
ns_param driver         postgres_driver
ns_param datasource     192.168.1.102:5432:foodmartdb
ns_param user          foodmart
ns_param password      foodmart
ns_param connections    1
ns_param logsqlerrors   true;
ns_param verbose        false;         
ns_param maxidle        600;
ns_param maxopen        3600;
 
ns_section "ns/server/$/db"
ns_param pools          *       ;
ns_param defaultpool    postgres_pool;


ns_section "ns/server/$/modules"
    ns_param nssock $/nssock.so
    ns_param nslog $/nslog.so
    ns_param nsopenssl  $/nsopenssl.so
  #  ns_param nsexample $/nsexample.so
 #   ns_param  nssha1 $/nssha1.so
    ns_param nsdb    $/nsdb.so

    #ns_param nscgi $/nscgi.so
 #   ns_param nsperm $/nsperm.so


And when I do:
bash-3.00$ bin/nsd -ft sample-config.tcl 

I get:

[25/Oct/2006:19:35:00][26219.2272153600][-main-]
Notice: nsopenssl (server1): default SSL context for
server is users
[25/Oct/2006:19:35:00][26219.2272153600][-main-]
Notice: default server SSL context: users
[25/Oct/2006:19:35:00][26219.2272153600][-main-]
Notice: nsopenssl (server1): loading 'users_drv' SSL
driver
[25/Oct/2006:19:35:00][26219.2272153600][-main-]
Notice: nsopenssl (server1): loading 'admins_drv' SSL
driver
[25/Oct/2006:19:35:00][26219.2272153600][-main-]
Notice: modload: loading
'/usr/local/aolserver4/bin/nsdb.so'
[25/Oct/2006:19:35:00][26219.2272153600][-main-]
Notice: modload: loading
'/usr/local/aolserver4/bin/nspostgres.so'
bash-3.00$ 
bash-3.00$ 

The server quits and when I use gdb bin/nsd and run
-fdt sample-config.tcl I get:

[25/Oct/2006:19:36:54][26506.2196135936][-main-]
Notice: nsopenssl (server1): loading 'users_drv' SSL
driver
[25/Oct/2006:19:36:54][26506.2196135936][-main-]
Notice: nsopenssl (server1): loading 'admins_drv' SSL
driver
[25/Oct/2006:19:36:54][26506.2196135936][-main-]
Notice: modload: loading
'/usr/local/aolserver4/bin/nsdb.so'
[25/Oct/2006:19:36:54][26506.2196135936][-main-]
Notice: modload: loading
'/usr/local/aolserver4/bin/nspostgres.so'

Program exited with code 04.
(gdb) 

What could be wrong?


--- Bas Scheffers <basSCHEFFERS.NET> wrote:

> You load nsdb in the server's modules section:
> 
> ns_section "ns/server/$/modules"
>     ns_param nssock $/nssock.so
>     ns_param nslog $/nslog.so
>     ns_param nsperm $/nsperm.so
>     ns_param nsdb $/nsdb.so
>     ns_param nssession $/nssession.so
>     ns_param nscp $/nscp.so
> 
> # Then load the postgres driver:
> 
> ns_section "ns/db/drivers"
>     ns_param   postgres_driver nspostgres.so
> 
> # Create a pool:
> 
> ns_section "ns/db/pools"
> ns_param   sativo    "Sativo Pool"
> 
> # define the pool:
> ns_section "ns/db/pool/sativo"
>     ns_param   driver          postgres_driver
>     ns_param   datasource     
> localhost:5432:sativo2
>     ns_param   user            nsd
>     ns_param   password        xxxxxx
>     ns_param   connections     20
>     ns_param   logsqlerrors    true      ;# Verbose
> SQL query error logging
>     ns_param   verbose         false     ;# Verbose
> error logging
>     ns_param   maxidle         600       ;# Max time
> to keep idle db conn
> open
>     ns_param   maxopen         3600
> 
> # Give the server access to pools:
> ns_section "ns/server/$/db"
>     ns_param pools          *            ;# Wildcard
> gives access to all
>     ns_param defaultpool    sativo
> 
> And that should do the trick!
> 
> Bas.
> 
> On Thursday, October 26, 2006 8:50, Dino Vliet said:
> > Hi peeps,
> >
> > can someone provide me an example of a
> configuration
> > from aolserver 4.5? I'm especially interested in
> the
> > database parts so what has to go exactly into the
> > ns/db parts and what modules to use.
> >
> >
> > I'm particular confused if the nsdbo.so has to be
> > loaded or not in the modules section. According to
> > this link,
> >
>
http://panoptic.com/wiki/aolserver
/Annotated_AOLserver_Configuration_Reference,
> > it doesn't have to load but I don't get any
> response
> > from my efforts. The server loads without database
> > driver and thats frustating.
> >
> > Hope you can help me out
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> > --
> > AOLserver - http://www.aolserver.com/
> >
> > To Remove yourself from this list, simply send an
> email to
> > <listservlistserv.aol.com> with the
> > body of "SIGNOFF AOLSERVER" in the email
message.
> You can leave the
> > Subject: field of your email blank.
> >
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an
> email to <listservlistserv.aol.com> with
the
> body of "SIGNOFF AOLSERVER" in the email
message.
> You can leave the Subject: field of your email
> blank.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<listservlistserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message.
You can leave the Subject: field of your email blank.
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )