Forum OpenACS Q&A: Re: Problems in installing OpenAcs5.6.0 (Aolserver 4.5,Postgres 8.4,Tcl 8.5,Ubuntu Lucid Lynx)

concerning:
[18/Aug/2010:11:09:20][2088.3078702784][-main-] Notice: modload: loading '/usr/local/aolserver/lib/libnsthread.so'
[18/Aug/2010:11:09:20][2088.3078702784][-main-] Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/lib/libnsthread.so
[18/Aug/2010:11:09:20][2088.3078702784][-main-] Fatal: modload: failed to load module '/usr/local/aolserver/lib/libnsthread.so'

the correct line in the config file (your line 575) should be

.../lib/thread*/libthread*...
and not
.../lib/libnsthread*...
libnsthread is not a module (in the aolserver sense), but libthread (the Tcl thread library) is. libthread is recommended (several optional components will require it) but for a first test not essential. If you have no folder thread* under lib, you should install the tcl thread library (either via debian or by hand, see http://www.openacs.org/xowiki/libthread)

Not sure, what the problem with the exec-test it, maybe this is a common problem on ubuntu installs. Some tests are pickier than necessary, some tests are buggy (at least for some platforms).

I have installed the tcl libthread2.6.5 and updated the config file. Still I am getting "Bootstrap : Installation Not complete - sourcing Installer" Notice.
I am unable to resolve this error.

Thanks for your time ...

My apologies for the lengthy post.

While http://localhost:8000/SYSTEM/sucess gets loaded , http://localhost:8000/ results in the following error...

[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: nsmain: AOLserver/4.5.1 starting
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: nsmain: security info: uid=1002, euid=1002, gid=1001, egid=1001
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: nsmain: max files: FD_SETSIZE = 1024, rl_cur = 1024, rl_max = 1024
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: encoding: loaded: utf-8
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: fastpath[schoolacs]: mapped GET /
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: fastpath[schoolacs]: mapped HEAD /
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: fastpath[schoolacs]: mapped POST /
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: adp[schoolacs]: mapped GET /*.adp
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: adp[schoolacs]: mapped HEAD /*.adp
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: adp[schoolacs]: mapped POST /*.adp
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nssock.so'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nslog.so'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: nslog: opened '/var/lib/aolserver/schoolacs/log/schoolacs.log'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nssha1.so'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsdb.so'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nspostgres.so'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: PostgreSQL loaded.
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: modload: loading '/usr/local/aolserver/lib/thread2.6.5/libthread2.6.5.so'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading OpenACS, rooted at /var/lib/aolserver/schoolacs
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/bootstrap.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Bootstrap: sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Bootstrap: sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Bootstrap: sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Bootstrap: sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Bootstrap: sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Database API: Default database (dbn) is: 'default'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Database API: Using ALL database pools for OpenACS.
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Database API: The following pools are available for OpenACS: pool1 pool2 pool3
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: dbdrv: opening database 'postgres:localhost:5432:schoolacs'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Opening schoolacs on localhost
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Ns_PgOpenDb(postgres): Openned connection to localhost:5432:schoolacs.
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: dbdrv: opening database 'postgres:localhost:5432:schoolacs'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Opening schoolacs on localhost
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Ns_PgOpenDb(postgres): Openned connection to localhost:5432:schoolacs.
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: dbdrv: opening database 'postgres:localhost:5432:schoolacs'
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Opening schoolacs on localhost
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Ns_PgOpenDb(postgres): Openned connection to localhost:5432:schoolacs.
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Bootstrap: Loading acs-tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/00-database-procs-postgresql.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/00-database-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/10-charset-compat-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/30-xml-utils-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/acs-kernel-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/acs-permissions-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/acs-private-data-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/ad-functional-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/admin-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/adp-parser-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/aolserver-3-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/apm-file-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/apm-install-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/apm-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/apm-xml-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/application-data-link-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/application-link-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/callback-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/community-core-2-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/community-core-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/defs-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/deprecated-utilities-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/document-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/ds-stub-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/exception-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/form-processing-procs.tcl
[19/Aug/2010:11:26:52][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/html-email-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/http-auth-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/image-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/install-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/json-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/membership-rel-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/memoize-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/navigation-callback-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/navigation-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/object-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/object-type-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/openacs-kernel-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/parameter-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/pdf-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/proxy-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/request-processor-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/security-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/server-cluster-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/set-operation-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/site-node-apm-integration-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/site-node-object-map-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/site-nodes-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/sql-statement-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/stack-trace-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/table-display-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/tcl-documentation-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/tdom-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/text-html-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/user-extensions-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/util-diff-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/utilities-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/whos-online-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/widgets-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/xml-0-sgml-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/xml-1-dom-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Loading acs-tcl/tcl/xml-2-procs.tcl
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Bootstrap: Installation is not complete - sourcing the installer.
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Sourcing files for postload...
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Done.
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: Executing initialization code blocks...
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: nsmain: AOLserver/4.5.1 running
[19/Aug/2010:11:26:53][2164.3065936752][-default:0-] Notice: random: generating 1 seed
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: nsmain: security info: uid=1002, euid=1002, gid=1001, egid=1001
[19/Aug/2010:11:26:53][2164.3078473408][-main-] Notice: driver: starting: nssock
[19/Aug/2010:11:26:53][2164.3069819760][-sched-] Notice: sched: starting
[19/Aug/2010:11:26:53][2164.3060652912][-nssock:driver-] Notice: starting
[19/Aug/2010:11:26:53][2164.3060652912][-nssock:driver-] Notice: nssock: listening on 127.0.0.1:8000
[19/Aug/2010:11:26:53][2164.3060652912][-default:1-] Error: Error sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/installer/index.tcl:
invalid command name "ns_getform"
while executing
"ns_getform"
(procedure "ad_page_contract" line 302)
invoked from within
"ad_page_contract {

If no database driver is available, the acs-kernel libraries may not have
been loaded (which is fine, since index.tcl will..."
(file "/var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/installer/index.tcl" line 1)
invoked from within
"source $__file "
[19/Aug/2010:11:26:53][2164.3060652912][-default:2-] Error: Error sourcing /var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/installer/index.tcl:
invalid command name "ns_getform"
while executing
"ns_getform"
(procedure "ad_page_contract" line 302)
invoked from within
"ad_page_contract {

If no database driver is available, the acs-kernel libraries may not have
been loaded (which is fine, since index.tcl will..."
(file "/var/lib/aolserver/schoolacs/packages/acs-bootstrap-installer/installer/index.tcl" line 1)
invoked from within
"source $__file "

-----------------------------------------------------------
I am able to connect to the schoolacs database as shown below:

schoolacs@hpdv6:~$ /usr/local/pgsql/bin/psql schoolacs
psql (8.4.3)
Type "help" for help.

schoolacs=# \q
----------------------------------------------------------
Aolserver startup command :
/usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/schoolacs/etc/config.tcl -u schoolacs -g web
----------------------------------------------------------
nsd-postgres :
#!/bin/bash

# aolserver4 recommends descriptors limit (FD_SETSIZE) to be set to 1024,
# which is standard for most OS distributions
# For freebsd systems, uncomment following line:
# ulimit -n 1024

export PATH=$PATH:/usr/local/pgsql/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib:/usr/local/aolserver/lib

exec /usr/local/aolserver/bin/nsd $*
-----------------------------------------------------------
config.tcl
-----------------------------------------------------------
1:ns_log notice "nsd.tcl: starting to read config file..."
2:
3:######################################################################
4:#
5:# Instance-specific settings
6:# These default settings will only work in limited circumstances
7:# Two servers with default settings cannot run on the same host
8:#
9:######################################################################
10:
11:#---------------------------------------------------------------------
12:# change to 80 and 443 for production use
13:set httpport 8000
14:set httpsport 8443
15:# If setting port below 1024 with AOLServer 4, read comments in file:
16:# /var/lib/aolserver/service0/packages/etc/daemontools/run
17:
18:# The hostname and address should be set to actual values.
19:# setting the address to 0.0.0.0 means aolserver listens on all interfaces
20:set hostname localhost
21:set address 127.0.0.1
22:
23:# Note: If port is privileged (usually < 1024), OpenACS must be
24:# started by root, and, in AOLserver 4, the run script have a
25:# '-b address' flag which matches the address according to settings (above)
26:
27:set server "schoolacs" ; # "service0"
28:set servername "New SchoolACS Installation - Development"
29:
30:set serverroot "/var/lib/aolserver/${server}"; # "/var/www/${server}"
31:
32:#---------------------------------------------------------------------
33:# which database do you want? postgres or oracle
34:set database postgres
35:
36:set db_name $server
37:
38:if { $database eq "oracle" } {
39: set db_password "mysitepassword"
40:} else {
41: set db_host localhost
42: set db_port 5432 ; # ""
43: set db_user $server
44:}
45:
46:#---------------------------------------------------------------------
47:# if debug is false, all debugging will be turned off
48:set debug false
49:
50:set homedir /usr/local/aolserver ;# /usr/lib/aolserver4
51:set bindir ${homedir}/bin
52:
53:set testhome [file dirname [ns_info config]]
54:ns_log notice "bin dir: $testhome..."
55:
56:set max_file_upload_mb 5 ;# default 20
57:set max_file_upload_min 5
58:
59:######################################################################
60:#
61:# End of instance-specific settings
62:#
63:# Nothing below this point need be changed in a default install.
64:#
65:######################################################################
66:
67:
68:#---------------------------------------------------------------------
69:#
70:# AOLserver's directories. Autoconfigurable.
71:#
72:#---------------------------------------------------------------------
73:# Where are your pages going to live ?
74:set pageroot ${serverroot}/www
75:set directoryfile index.tcl,index.adp,index.html,index.htm
76:
77:
78:#---------------------------------------------------------------------
79:# Global server parameters
80:#---------------------------------------------------------------------
81:ns_section ns/parameters
82: ns_param serverlog ${serverroot}/log/error.log
83: ns_param home ${serverroot}; # $homedir
84: # maxkeepalive is ignored in aolserver4.x
85: ns_param maxkeepalive 0
86: ns_param logroll on
87: ns_param maxbackup 5
88: ns_param debug $debug
89:# ns_param mailhost localhost
90:
91: # setting to Unicode by default
92: # see http://dqd.com/~mayoff/encoding-doc.html
93: ns_param HackContentType 1
94: ns_param DefaultCharset utf-8
95: ns_param HttpOpenCharset utf-8
96: ns_param OutputCharset utf-8
97: ns_param URLCharset utf-8
98:
99:#---------------------------------------------------------------------
100:# Thread library (nsthread) parameters
101:#---------------------------------------------------------------------
102:ns_section ns/threads
103: ns_param mutexmeter true ;# measure lock contention
104: # The per-thread stack size must be a multiple of 8k for AOLServer to run under MacOS X
105: ns_param stacksize [expr {128 * 8192}]
106:
107:#
108:# MIME types.
109:#
110:ns_section ns/mimetypes
111: # Note: AOLserver already has an exhaustive list of MIME types:
112: # see: /usr/local/src/aolserver-4.{version}/aolserver/nsd/mimetypes.c
113: # but in case something is missing you can add it here.
114: ns_param Default */*
115: ns_param NoExtension */*
116: ns_param .pcd image/x-photo-cd
117: ns_param .prc application/x-pilot
118: ns_param .xls application/vnd.ms-excel
119: ns_param .doc application/vnd.ms-word
120:
121:
122:#---------------------------------------------------------------------
123:#
124:# Server-level configuration
125:#
126:# There is only one server in AOLserver, but this is helpful when multiple
127:# servers share the same configuration file. This file assumes that only
128:# one server is in use so it is set at the top in the "server" Tcl variable
129:# Other host-specific values are set up above as Tcl variables, too.
130:#
131:#---------------------------------------------------------------------
132:ns_section ns/servers
133: ns_param $server $servername
134:
135:#
136:# Server parameters
137:#
138:ns_section ns/server/${server}
139: ns_param directoryfile $directoryfile
140: ns_param pageroot $pageroot
141: ns_param maxconnections 100 ;# Max connections to put on queue
142: ns_param maxdropped 0
143: ns_param maxthreads 10
144: ns_param minthreads 5
145: ns_param threadtimeout 120 ;# Idle threads die at this rate
146: ns_param globalstats false ;# Enable built-in statistics
147: ns_param urlstats true ; #false ;# Enable URL statistics
148: ns_param maxurlstats 1000 ;# Max number of URL's to do stats on
149:# ns_param directoryadp $pageroot/dirlist.adp ;# Choose one or the other
150:# ns_param directoryproc _ns_dirlist ;# ...but not both!
151:# ns_param directorylisting fancy ;# Can be simple or fancy
152: ns_param ConnsPerThread 50
153:
154:# Aolserver 4.5 related
155: ns_pools set default -minthreads 5
156: ns_pools set default -maxthreads 10
157: ns_pools set default -maxconns 50
158: ns_pools set default -timeout 120
159:
160: ns_log Notice "Default pool: [ns_pools get default]"
161: #
162: # Special HTTP pages
163: #
164: ns_param NotFoundResponse "/global/file-not-found.html"
165: ns_param ServerBusyResponse "/global/busy.html"
166: ns_param ServerInternalErrorResponse "/global/error.html"
167:
168:#---------------------------------------------------------------------
169:#
170:# ADP (AOLserver Dynamic Page) configuration
171:#
172:#---------------------------------------------------------------------
173:ns_section ns/server/${server}/adp
174: ns_param map /*.adp ;# Extensions to parse as ADP's
175:# ns_param map "/*.html" ;# Any extension can be mapped
176: ns_param enableexpire false ;# Set "Expires: now" on all ADP's
177: ns_param enabledebug $debug ;# Allow Tclpro debugging with "?debug"
178: ns_param defaultparser fancy
179:
180:ns_section ns/server/${server}/adp/parsers
181: ns_param fancy ".adp"
182:
183:ns_section ns/server/${server}/redirects
184: ns_param 404 "global/file-not-found.html"
185: ns_param 403 "global/forbidden.html"
186:
187:#
188:# Tcl Configuration
189:#
190:ns_section ns/server/${server}/tcl
191: ns_param library ${serverroot}/tcl
192: ns_param autoclose on
193: ns_param debug $debug
194:# Aolserver 4.5 addition
195: ns_param nsvbuckets 20 ;# no of buckets to hold nsv's
196:
197:#---------------------------------------------------------------------
198:#
199:# Rollout email support
200:#
201:# These procs help manage differing email behavior on
202:# dev/staging/production.
203:#
204:#---------------------------------------------------------------------
205:ns_section ns/server/${server}/acs/acs-rollout-support
206:
207: # EmailDeliveryMode can be:
208: # default: Email messages are sent in the usual manner.
209: # log: Email messages are written to the server's error log.
210: # redirect: Email messages are redirected to the addresses specified
211: # by the EmailRedirectTo parameter. If this list is absent
212: # or empty, email messages are written to the server's error log.
213: # filter: Email messages are sent to in the usual manner if the
214: # recipient appears in the EmailAllow parameter, otherwise they
215: # are logged.
216:
217:# ns_param EmailDeliveryMode redirect
218:# ns_param EmailRedirectTo somenerd@yourdomain.test, othernerd@yourdomain.test
219:# ns_param EmailAllow somenerd@yourdomain.test,othernerd@yourdomain.test
220:
221:#---------------------------------------------------------------------
222:#
223:# WebDAV Support (optional, requires oacs-dav package to be installed
224:#
225:#---------------------------------------------------------------------
226:#ns_section ns/server/${server}/tdav
227:# ns_param propdir ${serverroot}/data/dav/properties
228:# ns_param lockdir ${serverroot}/data/dav/locks
229:# ns_param defaultlocktimeout "300"
230:
231:#ns_section ns/server/${server}/tdav/shares
232:# ns_param share1 "OpenACS"
233:# ns_param share2 "Share 2 description"
234:
235:#ns_section ns/server/${server}/tdav/share/share1
236:# ns_param uri "/dav/*"
237: # all WebDAV options
238:# ns_param options "OPTIONS COPY GET PUT MOVE DELETE HEAD MKCOL POST PROPFIND PROPPATCH LOCK UNLOCK"
239:
240:#ns_section ns/server/${server}/tdav/share/share2
241:# ns_param uri "/share2/path/*"
242: # read-only WebDAV options
243:# ns_param options "OPTIONS COPY GET HEAD MKCOL POST PROPFIND PROPPATCH"
244:
245:
246:#---------------------------------------------------------------------
247:#
248:# Socket driver module (HTTP) -- nssock
249:#
250:#---------------------------------------------------------------------
251:ns_section ns/server/${server}/module/nssock
252: ns_param timeout 120
253: ns_param address $address
254: ns_param hostname $hostname
255: ns_param port $httpport
256:# setting maxinput higher than practical may leave the server vulnerable to resource DoS attacks
257:# see http://www.panoptic.com/wiki/aolserver/166
258: ns_param maxinput [expr {$max_file_upload_mb * 1024 * 1024}] ;# Maximum File Size for uploads in bytes
259: ns_param maxpost [expr {$max_file_upload_mb * 1024 * 1024}] ;# Maximum File Size for uploads in bytes
260: ns_param recvwait [expr {$max_file_upload_min * 60}] ;# Maximum request time in minutes
261:
262:# maxsock will limit the number of simultanously returned pages,
263:# regardless of what maxthreads is saying
264: ns_param maxsock 100 ;# 100 = default
265:
266:# On Windows you need to set this parameter to define the number of
267:# connections as well (it seems).
268: ns_param backlog 5 ;# if < 1 == 5
269:
270:# Optional params with defaults:
271: ns_param bufsize 16000
272: ns_param rcvbuf 0
273: ns_param sndbuf 0
274: ns_param socktimeout 30 ;# if < 1 == 30
275: ns_param sendwait 30 ;# if < 1 == socktimeout
276: ns_param recvwait 30 ;# if < 1 == socktimeout
277: ns_param closewait 2 ;# if < 0 == 2
278: ns_param keepwait 30 ;# if < 0 == 30
279: ns_param readtimeoutlogging false
280: ns_param serverrejectlogging false
281: ns_param sockerrorlogging false
282: ns_param sockshuterrorlogging false
283:
284:#---------------------------------------------------------------------
285:#
286:# Access log -- nslog
287:#
288:#---------------------------------------------------------------------
289:ns_section ns/server/${server}/module/nslog
290: ns_param debug false
291: ns_param dev false
292: ns_param enablehostnamelookup false
293: ns_param file ${serverroot}/log/${server}.log
294: ns_param logcombined true
295: ns_param extendedheaders COOKIE
296:# ns_param logrefer false
297:# ns_param loguseragent false
298: ns_param logreqtime true
299: ns_param maxbackup 1000
300: ns_param rollday *
301: ns_param rollfmt %Y-%m-%d-%H:%M
302: ns_param rollhour 0
303: ns_param rollonsignal true
304: ns_param rolllog true
305:
306:#---------------------------------------------------------------------
307:#
308:# nsjava - aolserver module that embeds a java virtual machine. Needed to
309:# support webmail. See http://nsjava.sourceforge.net for further
310:# details. This may need to be updated for OpenACS4 webmail
311:#
312:#---------------------------------------------------------------------
313:#ns_section ns/server/${server}/module/nsjava
314:# ns_param enablejava off ;# Set to on to enable nsjava.
315:# ns_param verbosejvm off ;# Same as command line -debug.
316:# ns_param loglevel Notice
317:# ns_param destroyjvm off ;# Destroy jvm on shutdown.
318:# ns_param disablejitcompiler off
319:# ns_param classpath /usr/local/jdk/jdk118_v1/lib/classes.zip:${bindir}/nsjava.jar:${pageroot}/webmail/java/activation.jar:${pageroot}/webmail/java/mail.jar:${pageroot}/webmail/java
320:
321:#---------------------------------------------------------------------
322:#
323:# CGI interface -- nscgi, if you have legacy stuff. Tcl or ADP files inside
324:# AOLserver are vastly superior to CGIs. I haven't tested these params but they
325:# should be right.
326:#
327:#---------------------------------------------------------------------
328:#ns_section "ns/server/${server}/module/nscgi"
329:# ns_param map "GET /cgi-bin ${serverroot}/cgi-bin"
330:# ns_param map "POST /cgi-bin ${serverroot}/cgi-bin"
331:# ns_param Interps CGIinterps
332:
333:#ns_section "ns/interps/CGIinterps"
334:# ns_param .pl "/usr/bin/perl"
335:
336:
337:#---------------------------------------------------------------------
338:#
339:# PAM authentication
340:#
341:#---------------------------------------------------------------------
342:#ns_section ns/server/${server}/module/nspam
343:# ns_param PamDomain "pam_domain"
344:
345:
346:#---------------------------------------------------------------------
347:#
348:# OpenSSL for Aolserver 3.3 and 4
349:#
350:#---------------------------------------------------------------------
351:if { [ns_info version] < 4} {
352:
353: #---------------------------------------------------------------------
354: # OpenSSL for Aolserver 3.3
355: #---------------------------------------------------------------------
356:
357: ns_section "ns/server/${server}/module/nsopenssl"
358:
359: ns_param ModuleDir ${serverroot}/etc/certs
360:
361: # NSD-driven connections:
362: ns_param ServerPort $httpsport
363: ns_param ServerHostname $hostname
364: ns_param ServerAddress $address
365: ns_param ServerCertFile certfile.pem
366: ns_param ServerKeyFile keyfile.pem
367: ns_param ServerProtocols "SSLv2, SSLv3, TLSv1"
368: ns_param ServerCipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
369: ns_param ServerSessionCache true
370: ns_param ServerSessionCacheID 1
371: ns_param ServerSessionCacheSize 512
372: ns_param ServerSessionCacheTimeout 300
373: ns_param ServerPeerVerify false
374: ns_param ServerPeerVerifyDepth 3
375: ns_param ServerCADir ca
376: ns_param ServerCAFile ca.pem
377: ns_param ServerTrace false
378:
379: # For listening and accepting SSL connections via Tcl/C API:
380: ns_param SockServerCertFile certfile.pem
381: ns_param SockServerKeyFile keyfile.pem
382: ns_param SockServerProtocols "SSLv2, SSLv3, TLSv1"
383: ns_param SockServerCipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
384: ns_param SockServerSessionCache true
385: ns_param SockServerSessionCacheID 2
386: ns_param SockServerSessionCacheSize 512
387: ns_param SockServerSessionCacheTimeout 300
388: ns_param SockServerPeerVerify false
389: ns_param SockServerPeerVerifyDepth 3
390: ns_param SockServerCADir internal_ca
391: ns_param SockServerCAFile internal_ca.pem
392: ns_param SockServerTrace false
393:
394: # Outgoing SSL connections
395: ns_param SockClientCertFile certfile.pem
396: ns_param SockClientKeyFile keyfile.pem
397: ns_param SockClientProtocols "SSLv2, SSLv3, TLSv1"
398: ns_param SockClientCipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
399: ns_param SockClientSessionCache false
400: ns_param SockClientSessionCacheID 3
401: ns_param SockClientSessionCacheSize 512
402: ns_param SockClientSessionCacheTimeout 300
403: ns_param SockClientPeerVerify false
404: ns_param SockServerPeerVerifyDepth 3
405: ns_param SockClientCADir ca
406: ns_param SockClientCAFile ca.pem
407: ns_param SockClientTrace false
408:
409: # OpenSSL library support:
410: # ns_param RandomFile /some/file
411: ns_param SeedBytes 1024
412:
413:} else {
414:
415: #---------------------------------------------------------------------
416: # OpenSSL for Aolserver 4
417: #---------------------------------------------------------------------
418: ns_section "ns/server/${server}/module/nsopenssl"
419:
420: # Note this portion of the configuration is not perfect, and you
421: # will get errors in the your error.log. However, it does
422: # work. Fixes welcome.
423:
424: # this is used by acs-tcl/tcl/security-procs.tcl to get the
425: # https port.
426: ns_param ServerPort $httpsport
427: # setting maxinput higher than practical may leave the server vulnerable to resource DoS attacks
428: # see http://www.panoptic.com/wiki/aolserver/166
429: # must set maxinput for nsopenssl as well as nssock
430: ns_param maxinput [expr {$max_file_upload_mb * 1024 * 1024}] ;# Maximum File Size for uploads in bytes
431:
432: # We explicitly tell the server which SSL contexts to use as defaults when an
433: # SSL context is not specified for a particular client or server SSL
434: # connection. Driver connections do not use defaults; they must be explicitly
435: # specificied in the driver section. The Tcl API will use the defaults as there
436: # is currently no provision to specify which SSL context to use for a
437: # particular connection via an ns_openssl Tcl command.
438: ns_section "ns/server/${server}/module/nsopenssl/sslcontexts"
439: ns_param users "SSL context used for regular user access"
440: # ns_param admins "SSL context used for administrator access"
441: ns_param client "SSL context used for outgoing script socket connections"
442:
443: ns_section "ns/server/${server}/module/nsopenssl/defaults"
444: ns_param server users
445: ns_param client client
446:
447: ns_section "ns/server/${server}/module/nsopenssl/sslcontext/users"
448: ns_param Role server
449: ns_param ModuleDir ${serverroot}/etc/certs
450: ns_param CertFile certfile.pem
451: ns_param KeyFile keyfile.pem
452: # ns_param CADir ca-client/dir
453: # ns_param CAFile ca-client/ca-client.crt
454: # for Protocols "ALL" = "SSLv2, SSLv3, TLSv1"
455: ns_param Protocols "SSLv3, TLSv1"
456: ns_param CipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
457: ns_param PeerVerify false
458: ns_param PeerVerifyDepth 3
459: ns_param Trace false
460:
461: # following from bartt's nsd4.tcl, might help stablize openssl connections?
462: # http://www.mail-archive.com/aolserver@listserv.aol.com/msg07092.html
463: ns_param SessionCache true
464: ns_param SessionCacheID 1
465: ns_param SessionCacheSize 512
466: ns_param SessionCacheTimeout 300
467:
468:
469:# ns_section "ns/server/${server}/module/nsopenssl/sslcontext/admins"
470: # ns_param Role server
471: # ns_param ModuleDir /path/to/dir
472: # ns_param CertFile server/server.crt
473: # ns_param KeyFile server/server.key
474: # ns_param CADir ca-client/dir
475: # ns_param CAFile ca-client/ca-client.crt
476: # for Protocols "ALL" = "SSLv2, SSLv3, TLSv1"
477: # ns_param Protocols "All"
478: # ns_param CipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
479: # ns_param PeerVerify false
480: # ns_param PeerVerifyDepth 3
481: # ns_param Trace false
482:
483: ns_section "ns/server/${server}/module/nsopenssl/sslcontext/client"
484: ns_param Role client
485: ns_param ModuleDir ${serverroot}/etc/certs
486: ns_param CertFile certfile.pem
487: ns_param KeyFile keyfile.pem
488: # ns_param CADir ${serverroot}/etc/certs
489: # ns_param CAFile certfile.pem
490: # for Protocols "ALL" = "SSLv2, SSLv3, TLSv1"
491: ns_param Protocols "SSLv2, SSLv3, TLSv1"
492: ns_param CipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
493: ns_param PeerVerify false
494: ns_param PeerVerifyDepth 3
495: ns_param Trace false
496:
497: # following from bartt's nsd4.tcl, might help stablize openssl connections?
498: # http://www.mail-archive.com/aolserver@listserv.aol.com/msg07092.html
499: ns_param SessionCache true
500: ns_param SessionCacheID 1
501: ns_param SessionCacheSize 512
502: ns_param SessionCacheTimeout 300
503:
504: # SSL drivers. Each driver defines a port to listen on and an explitictly named
505: # SSL context to associate with it. Note that you can now have multiple driver
506: # connections within a single virtual server, which can be tied to different
507: # SSL contexts.
508: ns_section "ns/server/${server}/module/nsopenssl/ssldrivers"
509: ns_param users "Driver for regular user access"
510: # ns_param admins "Driver for administrator access"
511:
512: ns_section "ns/server/${server}/module/nsopenssl/ssldriver/users"
513: ns_param sslcontext users
514: # ns_param port $httpsport_users
515: ns_param port $httpsport
516: ns_param hostname $hostname
517: ns_param address $address
518: # following added per
519: # http://www.mail-archive.com/aolserver@listserv.aol.com/msg07365.html
520: # Maximum File Size for uploads:
521: ns_param maxinput [expr {$max_file_upload_mb * 1024 * 1024}] ;# in bytes
522: # Maximum request time
523: ns_param recvwait [expr {$max_file_upload_min * 60}] ;# in minutes
524:
525:# ns_section "ns/server/${server}/module/nsopenssl/ssldriver/admins"
526: # ns_param sslcontext admins
527: # ns_param port $httpsport_admins
528: # ns_param port $httpsport
529: # ns_param hostname $hostname
530: # ns_param address $address
531:}
532:
533:#---------------------------------------------------------------------
534:#
535:# Database drivers
536:# The database driver is specified here.
537:# Make sure you have the driver compiled and put it in {aolserverdir}/bin
538:#
539:#---------------------------------------------------------------------
540:ns_section "ns/db/drivers"
541:if { $database eq "oracle" } {
542: ns_param ora8 ${bindir}/ora8.so
543:} else {
544: ns_param postgres ${bindir}/nspostgres.so ;# Load PostgreSQL driver
545:}
546:
547:if { $database eq "oracle" } {
548: ns_section "ns/db/driver/ora8"
549: ns_param maxStringLogLength -1
550: ns_param LobBufferSize 32768
551:}
552:
553:
554:# Database Pools: This is how AOLserver ``talks'' to the RDBMS. You need
555:# three for OpenACS: main, log, subquery. Make sure to replace ``yourdb''
556:# and ``yourpassword'' with the actual values for your db name and the
557:# password for it, if needed.
558:#
559:# AOLserver can have different pools connecting to different databases
560:# and even different different database servers. See
561:# http://openacs.org/doc/openacs-5-1/tutorial-second-database.html
562:
563:ns_section ns/db/pools
564: ns_param pool1 "Pool 1"
565: ns_param pool2 "Pool 2"
566: ns_param pool3 "Pool 3"
567:
568:ns_section ns/db/pool/pool1
569: ns_param maxidle 0
570: ns_param maxopen 0
571: ns_param connections 15
572: ns_param verbose $debug
573: ns_param extendedtableinfo true
574: ns_param logsqlerrors $debug
575: if { $database eq "oracle" } {
576: ns_param driver ora8
577: ns_param datasource {}
578: ns_param user $db_name
579: ns_param password $db_password
580: } else {
581: ns_param driver postgres
582: ns_param datasource ${db_host}:${db_port}:${db_name}
583: ns_param user $db_user
584: ns_param password ""
585: }
586:
587:ns_section ns/db/pool/pool2
588: ns_param maxidle 0
589: ns_param maxopen 0
590: ns_param connections 5
591: ns_param verbose $debug
592: ns_param extendedtableinfo true
593: ns_param logsqlerrors $debug
594: if { $database eq "oracle" } {
595: ns_param driver ora8
596: ns_param datasource {}
597: ns_param user $db_name
598: ns_param password $db_password
599: } else {
600: ns_param driver postgres
601: ns_param datasource ${db_host}:${db_port}:${db_name}
602: ns_param user $db_user
603: ns_param password ""
604: }
605:
606:ns_section ns/db/pool/pool3
607: ns_param maxidle 0
608: ns_param maxopen 0
609: ns_param connections 5
610: ns_param verbose $debug
611: ns_param extendedtableinfo true
612: ns_param logsqlerrors $debug
613: if { $database eq "oracle" } {
614: ns_param driver ora8
615: ns_param datasource {}
616: ns_param user $db_name
617: ns_param password $db_password
618: } else {
619: ns_param driver postgres
620: ns_param datasource ${db_host}:${db_port}:${db_name}
621: ns_param user $db_user
622: ns_param password ""
623: }
624:
625:ns_section ns/server/${server}/db
626: ns_param pools pool1,pool2,pool3
627: ns_param defaultpool pool1
628:
629:#---------------------------------------------------------------------
630:# which modules should be loaded? Missing modules break the server, so
631:# don't uncomment modules unless they have been installed.
632:ns_section ns/server/${server}/modules
633: ns_param nssock ${bindir}/nssock.so
634: ns_param nslog ${bindir}/nslog.so
635: ns_param nssha1 ${bindir}/nssha1.so
636: if { [ns_info version] >= 4 } {
637: # Required for AOLserver 4.x
638: ns_param nsdb ${bindir}/nsdb.so
639: } else {
640: # Required for AOLserver 3.x
641: ns_param libtdom ${bindir}/libtdom.so
642: }
643:
644: # since aolserver version 4.5.1 built-in ns_cache, so we dont
645: # need to load the nscache module.
646: if {[ns_info version] < 4.5 || [ns_info patchlevel] eq "4.5.0"} {
647: ns_param nscache ${bindir}/nscache.so
648: }
649: # openacs versions earlier than 5.x requires nsxml
650:# ns_param nsxml ${bindir}/nsxml.so
651:
652: #---------------------------------------------------------------------
653: # nsopenssl will fail unless the cert files are present as specified
654: # later in this file, so it's disabled by default
655:# ns_param nsopenssl ${bindir}/nsopenssl.so
656:
657: # authorize-gateway package requires dqd_utils
658: # ns_param dqd_utils dqd_utils[expr {int($tcl_version)}].so
659:
660: # Full Text Search
661:# ns_param nsfts ${bindir}/nsfts.so
662:
663: # PAM authentication
664:# ns_param nspam ${bindir}/nspam.so
665:
666: # LDAP authentication
667:# ns_param nsldap ${bindir}/nsldap.so
668:
669: # These modules aren't used in standard OpenACS installs
670:# ns_param nsperm ${bindir}/nsperm.so
671:# ns_param nscgi ${bindir}/nscgi.so
672:# ns_param nsjava ${bindir}/libnsjava.so
673:# ns_param nsrewrite ${bindir}/nsrewrite.so
674:
675: # nsthread library which should become standard in 5.3
676: ns_param libthread [lindex [glob ${homedir}/lib/thread*/libthread*[info sharedlibextension]] 0]
677:
678: if {[ns_info version] >= 4.5} {
679: ns_limits set default -maxupload [ns_config ns/server/${server}/module/nssock maxinput]
680: }
681:
682:ns_log notice "nsd.tcl: using threadsafe tcl: [info exists tcl_platform(threaded)]"
683:ns_log notice "nsd.tcl: finished reading config file."
684: