Here is an example of a multi-server startup, including a printout of the effective configuration file (at the top):
<http://rmadilo.com/m2/multi-server-example/sample-startup.txt> tom jackson On Thursday 03 May 2007 11:29, Thorpe Mayes wrote: > Thanks to all who replied. > > I did load the nsdb.so file, and that solved the ns_db issue. > > However, I now have a database pool issue when I try to set the > database handle: > > Error: Tcl exception: > no access to pool: "tmayes" > while executing > "ns_db gethandle $pool" > invoked from within > "set db [ns_db gethandle $pool]" > > ------------- > > The following is my config file. I can see that things have changed > since Aolserver 3.x, which is the last version I was running. I > essentially copied the config file I used in the older version of > Aolserver to use with 4.5. Clearly, things are not as they were. > > Thanks for your help. > > Thorpe > > --------- > > # $Header: /cvsroot/aolserver/aolserver/nsd/Attic/sample-config.tcl,v > 1.2.4.1 2002/09/17 23:52:03 jgdavidson Exp $ > > # > # sample-config.tcl -- The AOLserver Startup Script > # > # This is a Tcl script that is sourced when AOLserver starts up. > # A detailed reference is in "doc/config.txt". > # > > ns_log notice "nsd_72.tcl: starting to read config file for server2 > (.72)..." > > > # > # Set some Tcl variables that are commonly used throughout this file. > # > > set httpport 80 > set httpsport 8443 > > # The hostname and address should be set to actual values. > set hostname ecognote.com ; # was [ns_info hostname] > set address 64.58.34.72 > set host www.ecognote.com > set location http://www.ecognote.com > > set servername "server2" > set serverdesc "Server at 72" > > set homedir /usr/local/aolserver > set bindir /usr/local/aolserver/bin > > set pageroot ${homedir}/servers/${servername}/pages > set directoryfile > index.tcl,index.adp,index.html,index.htm,index.php > > set ext .so > > set serverlog > /usr/local/aolserver/servers/${servername}/server_log/server.log > > set mailhost mail.ecognizant.net > set smtphost mail.ecognizant.net > > > # > # Global server parameters > # > ns_section "ns/parameters" > ns_param home $homedir > ns_param debug false > > ns_param serverlog $serverlog > ns_param user xxxxx > ns_param logroll on > ns_param logmaxbackup 10 > #ns_param mailhost $the_mailhost ;# do not set this parameter > - it causes the server to die > > > # > # Thread library (nsthread) parameters > # > ns_section "ns/threads" > ns_param mutexmeter true ;# measure lock contention > ns_param stacksize [expr 256*1024] ;# Per-thread stack size. > > > > # > # Thread library (nsthread) parameters > # > ns_section "ns/threads" > ns_param mutexmeter true ;# measure lock contention > ns_param stacksize [expr 256*1024] ;# Per-thread stack size. > > # > # MIME types. > # > # Note: AOLserver already has an exhaustive list of MIME types, but in > # case something is missing you can add it here. > # > ns_section "ns/mimetypes" > ns_param default "*/*" ;# MIME type for unknown extension. > ns_param noextension "*/*" ;# MIME type for missing extension. > ns_param ".xls" "application/vnd.ms-excel" > ns_param ".qtl" "application/x-quicktimeplayer" > > > ############################################################ > # > # Server-level configuration > # > # There is only one server in AOLserver, but this is helpful when > multiple > # servers share the same configuration file. This file assumes that > only > # one server is in use so it is set at the top in the "server" Tcl > variable. > # Other host-specific values are set up above as Tcl variables, too. > # > > > ns_section "ns/servers" > ns_param $servername $serverdesc > > # > ns_section "ns/server/${servername}" > ns_param directoryfile $directoryfile > ns_param pageroot $pageroot > ns_param globalstats true ;# Enable built-in statistics. > ns_param urlstats true ;# Enable URL statistics. > ns_param maxurlstats 1000 ;# Max number of URL's to do stats > on. > > # > # Scaling and Tuning Options > # > # Note: These values aren't necessarily the defaults. > # > ns_param connsperthread 1 ;# Normally there's one conn per > thread > #ns_param flushcontent false ;# Flush all data before returning > ns_param maxconnections 100 ;# Max connections to put on queue > #ns_param maxdropped 0 ;# Shut down if dropping too many > conns > ns_param maxthreads 100 ;# Tune this to scale your server > ns_param minthreads 0 ;# Tune this to scale your server > ns_param socktimeout 30 > ns_param threadtimeout 120 ;# Idle threads die at this rate > ns_param maxkeepalive 100 > > > > # Directory listings -- use an ADP or a Tcl proc to generate them. > #ns_param directoryadp $pageroot/dirlist.adp ;# Choose one or the > other. > ns_param directoryproc _ns_dirlist ;# ...but not both! > ns_param directorylisting simple ;# Can be simple or > fancy. > > # miscellaneous > ns_param enabletclpages true ;# Parse *.tcl files in pageroot. > ns_param enableaolpress false > > # > # Internal redirects > # > ns_section "ns/server/${servername}/redirects" > ns_param 404 /redirects/notfound.tcl > ns_param 500 /redirects/servererror.tcl > > > # > # fastpath serves html > # > ns_section "ns/server/${servername}/fastpath" > ns_param cache true > ns_param cachemaxentry 8192 > ns_param cachemaxsize [expr 5000*1024] > ns_param mmap false > > > # > # Tcl interpreter > # > ns_section "ns/server/${servername}/tcl" > ns_param autoclose true > ns_param debug false > ns_param nsvbuckets 8 > ns_param statlevel 0 > ns_param statmaxbuf 100 > ns_param library ${homedir}/servers/${servername}/modules/tcl > > > > # > # ADP (AOLserver Dynamic Page) configuration > # > ns_section "ns/server/${servername}/adp" > ns_param map "/*.adp" ;# Extensions to parse as ADP's. > #ns_param map "/*.html" ;# Any extension can be mapped. > ns_param enableexpire false ;# Set "Expires: now" on all ADP's. > ns_param enabledebug false ;# Allow Tclpro debugging with > "?debug". > > > # do we need these? > ns_param cache on ; # caching is enabled > # ns_param fancy on ; # > > > # ADP special pages > #ns_param errorpage ${pageroot}/errorpage.adp ;# ADP error page. > > > # > # ADP custom parsers -- see adp.c > # > ns_section "ns/server/${servername}/adp/parsers" > ns_param adp ".adp" ;# adp is the default parser. > ns_param fancy ".adp" > > > > # > # Modules to load > # > ns_section "ns/server/${servername}/modules" > ns_param nssock ${bindir}/nssock${ext} > ns_param nslog ${bindir}/nslog${ext} > ns_param nsperm ${bindir}/nsperm${ext} ;# Edit passwd before > using. > > ns_param nsxml ${bindir}/nsxml${ext} ; # old nsxml module > > ns_param nsdb ${bindir}/nsdb${ext} > > # ns_param nsrewrite ${bindir}/nsrewrite${ext} > > # ns_param php ${bindir}/libphp5${ext} > > > # ns_param nscache ${bindir}/nscache${ext} ; # ns_cache > module > > > # PHP > # ns_section "ns/server/${servername}/module/php" > # ns_param map *.php > > > > # > # Socket driver module (HTTP) -- nssock > # > > ns_section "ns/server/${servername}/module/nssock" > ns_param port $httpport > ns_param hostname $host ; # was $hostname > ns_param address $address > ns_param location $location > > > # > # Access log -- nslog > # > ns_section "ns/server/${servername}/module/nslog" > ns_param file > "/usr/local/aolserver/servers/server2/access.log" > ns_param formattedtime true > ns_param logcombined true > ns_param rolllog true ;# Should we roll log? > ns_param rollonsignal true ;# Roll log on SIGHUP. > ns_param rollhour 0 ;# Time to roll log. > ns_param maxbackup 5 ;# Max number to keep around when > rolling. > > > > # > # Database drivers > # > ns_section "ns/db/drivers" > ns_param postgres nspostgres.so > > > # > # Database pools > # > ns_section "ns/db/pools" > ns_param tmayes "Pool for postgres database" > > > > > # > # database pool () configuration > # > ns_section "ns/db/pool/tmayes" > ns_param driver postgres > ns_param connections 20 > ns_param datasource "localhost:5432:testdb" > ns_param user xxxxx > ns_param password xxxxx > ns_param verbose on ; # set on to see all queries > ns_param logsqlerrors on > ns_param extendedtableinfo on > #ns_param maxopen 3600 > #ns_para maxidle 600 > > # > # Database pools accessible by server > # > ns_section "ns/server/${servername}/db" > ns_param defaultpool "tmayes" > ns_param pools * > > > ns_log notice "nsd_72.tcl: finished reading config file for > ecognote.com (.72)." > > On May 3, 2007, at 12:25 PM, Rusty Brooks wrote: > > We'll need more information, most notably your config file. Make sure > > to redact any passwords, hostnames, etc. My guess is that you're > > either not loading the database driver, or not configuring the ns_db > > section properly. > > > > Rusty > > > > Thorpe Mayes wrote: > >> I have recently installed aolserver 4.5. > >> Everything seems to be working, except I get this error when I try to > >> use > >> the ns_db command: > >> error: Tcl exception: > >> invalid command name "ns_db" > >> while executing > >> "ns_db gethandle $pool" > >> invoked from within > >> "set db [ns_db gethandle $pool]" > >> ns_info works fine. > >> I know I am missing the obvious. > >> Thorpe > >> -- > >> AOLserver - http://www.aolserver.com/ > >> To Remove yourself from this list, simply send an email to > >> <[EMAIL PROTECTED]> 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 > > <[EMAIL PROTECTED]> with the > > body of "SIGNOFF AOLSERVER" in the email message. You can leave the > > Subject: field of your email blank. > > Thorpe Mayes > [EMAIL PROTECTED] > Office: (405) 912-3260 > Cell: (405) 514-9753 > > Platt College > 201 North Eastern > Moore, Oklahoma 73160 > > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to > <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
