Forum OpenACS Development: AOLserver 4 Setup

Posted by Randy O'Meara on
I've seen several folks mention that they are using AOLserver 4b (call it AS4) without problems and I've seen mention of certifying oacs 5.x for operation under AS4. The current oacs installation instructions do not address the use of AS4 except to mention that it could be done. In addition, there are no links that I am aware of on the oacs web site that point to the download locations of the various modules required to run AS4 with oacs 5.

I've tried it with oacs 5.0d and AS4 hangs for me after a few requests, so I'm probably not doing something right.

Would those that are running AS4 care to share the install instructions and software links in this forum thread? Maybe a page (possibly an ETP page) could be put up on that would hold this info? If we can get more folks testing with AS4, we should be able to identify existing problems and start moving toward certifying it to run oacs.

So, If you have detailed AS4 install/config notes, would you please post them here?


2: Re: AOLserver 4 Setup (response to 1)
Posted by Vinod Kurup on
I think you've seen this already, but I'm using AOLserver 4 without any problems on Mac OS X. I'm also using AOLserver 4 on Linux for, but it's running OpenACS 4.6.3.

I grabbed AOLserver and the necessary modules (nscache, nspostgres, nsrewrite and nssha1) from CVS. I downloaded tDOM from

I'm using the default config.tcl file that's in OpenACS CVS, except for the following (mostly minor) changes:

Index: config.tcl
RCS file: /cvsroot/openacs-4/etc/config.tcl,v
retrieving revision 1.8
diff -u -b -B -r1.8 config.tcl
--- config.tcl	8 Oct 2003 08:15:27 -0000	1.8
+++ config.tcl	22 Oct 2003 03:27:26 -0000
@@ -20,14 +20,14 @@
 set httpsport             8443 
 # The hostname and address should be set to actual values.
-set hostname               [ns_info hostname]
-set address       
+set hostname               localhost
+set address      
-set server              "service0" 
+set server              "openacs"
 set db_name             $server
 set servername          "New OpenACS Installation - Development"
-set serverroot          "/var/lib/aolserver/${server}"
+set serverroot          "/Users/vinod/web/${server}"
 # if debug is false, all debugging will be turned off
 set debug false
@@ -39,12 +39,13 @@
 # don't uncomment modules unless they have been installed.
 ns_section ns/server/${server}/modules 
+ns_param   nsdb            ${bindir}/ 
 ns_param   nssock          ${bindir}/ 
 ns_param   nslog           ${bindir}/ 
 ns_param   nssha1          ${bindir}/ 
 ns_param   nscache         ${bindir}/ 
 ns_param   nsrewrite       ${bindir}/ 
-ns_param   libtdom         ${bindir}/
+#ns_param   libtdom         ${bindir}/
 # nsopenssl will fail unless the cert files are present as specified
 # later in this file, so it's disabled by default
@@ -104,7 +105,7 @@
 ns_section ns/threads 
 ns_param   mutexmeter         true      ;# measure lock contention 
-ns_param   stacksize          500000
+ns_param   stacksize          4096000
 # MIME types. 

Does AOLserver spit any error messages at you, or just hang?
3: Re: AOLserver 4 Setup (response to 1)
Posted by Randy O'Meara on

No error messages at all. This isn't a real high priority item since I can do what I have to do with the older 331_oacs1 version. I'm trolling and collecting information that will help when I attack this issue again.


You mentioned (on Oct 31 2003 02:56:34 that you had created detailed instructions that work (unmodified) for both OS X and Linux. Can you post them here?

I would like to have your new docs available when/if I get time to look at this again. So, if you don't want to post them here publically, could you send them privately? The first thing that I would do is establish the *exact* versions and pedigree of all components. Does your doc provide concrete links to each required component? nsrewrite was one component I questioned the last time around.

BTW, there's another user over in the dotlrn forum (today) that says his service hangs after some number of page requests. It's by no means certain that this is the same issue. But it could be a second data point. Essentially the same OS (RH AS vs. RH 9), different DB (oracle vs. pg), same oacs code base (oacs5/dotlrn2 vs. oacs HEAD). I've asked the poster to provide AS version.


4: Re: AOLserver 4 Setup (response to 3)
Posted by Chris Davies on
After much ado, I do have both the OpenACS 5.0 tarball and OpenACS 5.0 CVS running under Aolserver 4.b10.

Other than the core, adding almost any package results in an error, but other than that, for a development platform, it has worked through about 2 hours of development moving a package I wrote under 4.6.3.

Data points:

Debian/Sid, Postgresql 7.3.4-9. Aolserver 4 beta 10, openacs 5.0 tarball as published on, and openacs cvs

Wasn't using any dotlrn code in either install.

5: Re: AOLserver 4 Setup (response to 3)
Posted by Malte Sussdorff on
This is just a quick rundown on what I did and how I succeded in getting OpenACS to run using "OS X" or Linux. The first version deals with Postgres.... If you think it looks fairly alike to Vinods instructions, no wonder, they are based on them 😉.

Installing Postgres

  1. Get and install Readline (unless it is already installed on your system):
    1. Download readline from into /usr/local/src
    2. Extract readline in /usr/local/src:
      $ cd /usr/local/src
      $ tar xvfz readline-4.3.tar.gz
    3. Change into readline directory, configure and compile:
      $ cd readline-4.3
      $ ./configure
      $ make
      $ sudo make install
  2. Get Postgres 7.3.4 (or newer) from one of the mirrors at
  3. Extract Postgres in /usr/local/src:
    $ tar xvfz postgresql-7.3.4.tgz
  4. Change into Postgres directory, configure and compile:
    $ cd postgresql-7.3.4
    $ ./configure
    $ make
    $ sudo make install
  5. Add the binary location of Postgres to your path:
    echo "PATH=\$PATH:/usr/local/pgsql/bin" >>~/.profile
  6. Initialize your database. You might have to add "--no-locale" to it, if you get an error here:
    $ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
  7. Start Postgres:
    $ pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/server.log start
    $ createlang plpgsql template1
    $ createdb openacs
    $ createuser openacs
    (Answer 'Y' twice)
  8. Make it start automatically:
    1. OS X: You can easily create a StartupItem for OS X to achieve this. If you would like PostgreSQL to start up automatically when the system comes up, then you can untar this archive into /Library/StartupItems: postgres-startup-item.tgz
    2. Linux: Depending on your Linux Distribution, create a startup-script in /etc/init.d/. Check chapter 8 of the Postgres Installation Instructions at

Install TCL 8.4.4 or newer

  1. $ cd /usr/local/src
  2. Download TCL from
  3. Extract TCL:
    $ tar xvfz tcl8.4.4-src-tar.gz
  4. Change into TCL directory, make and install:
    $ cd tcl8.4.4/unix
    $ ./configure --enable-threads
    $ make
    $ sudo make install

Install AOLserver

I'm using the CVS checkout of AOLserver for the time beeing. Not sure if it is very wise, but it works.
  1. Get AOLserver and a couple of modules needed
    $ mkdir /usr/local/src/aolserver
    $ cd /usr/local/src/aolserver
    $ cvs login (and hit return)
    $ cvs -z3 co aolserver
    $ cvs -z3 co nscache
    $ cvs -z3 co nsrewrite
    $ cvs -z3 co nspostgres
    $ cvs -z3 co nssha1
  2. Configure, compile and install AOLserver
    cd aolserver
    /usr/local/src/aolserver/aolserver/$ ./configure --with-tcl=/usr/local/lib/
    /usr/local/src/aolserver/aolserver/$ sudo make install
  3. Make and install the modules
    $ cd ../nscache
    /usr/local/src/aolserver/nscache$ sudo make install
    /usr/local/src/aolserver/nscache$ cd ../nsrewrite
    /usr/local/src/aolserver/nsrewrite$ sudo make install
  4. nssha1 doesn't compile without editing nssha1.c. Comment out the following 2 lines (lines 139-140):
    // typedef unsigned int u_int32_t;
    // typedef unsigned char u_int8_t;
  5. Compile nssha1:
    /usr/local/src/aolserver/nssha1$ sudo make install
    /usr/local/src/aolserver/nssha1$ cd ../nspostgres
  6. nspostgres doesn't link out ouf the box. Add -lnsdb to the MODLIBS var in the Makefile:
    MODLIBS = -L$(PGLIB) -lpq -lnsdb
  7. Compile nspostgres:
    $ sudo make install POSTGRES=/usr/local/pgsql ACS=1
  8. If you run into ranlib problems with libpq.a, do the following:
    sudo ranlib /usr/local/pgsql/lib/libpq.a

Installing tDOM

  1. Get and extract tdom from
    /usr/local/src/$ wget
    $ tar xvfz tDOM-0.7.8.tar.gz
    $ cd tDOM-0.7.8
  2. Edit /usr/local/src/tDOM-0.7.8/unix/CONFIG:
    Uncomment the instructions meant for AOLserver 4, but edit it to look like this:
    ../configure --enable-threads --disable-tdomalloc \
    --prefix=/usr/local/aolserver --with-tcl=/usr/local/lib
  3. Configure tdom:
    $ cd /usr/local/src/tDOM-0.7.8/unix
    $ sh CONFIG
  4. Make,install and link tdom into AOLserver (no need to load the module in config.tcl or call package require):
    $ sudo make install
    sudo ln -s /usr/local/aolserver/lib/tdom0.7.8/tdom.tcl /usr/local/aolserver/modules/tcl/

Tclwebtest, Daemontools and OpenACS download

  1. Download tclwebtest:
    $ cvs login
    $ cvs -z3 co tclwebtest
    sudo mv tclwebtest /usr/local/
  2. Install Daemontools following the docs at
  3. Download OpenACS to /web:
    /web/$ cvs -z3 -d co openacs-4
  4. If you want to have dotlrn:
    $ cd /web/openacs-4/packages
    $ cvs -q -d login
    $ cvs -q -z3 -d co dotlrn-core

Install OpenACS

  1. Edit nsd.tcl (a.k.a. config.tcl).
    1. Change server to whatever you want to call your server.
    2. Set serverroot to wherever you put your OpenACS CVS (should be /web/servername, see step above)
    3. Add nsdb to the modules list ns_section ns/server/${server}/modules ns_param nsdb ${bindir}/
    4. Remove from the modules list
    5. If you get:
      [15/Sep/2003:19:08:02][1997.2684358124][-main-] Notice: PostgreSQL loaded. nsthreads: pthread_attr_setstacksize failed in NsCreateThread: Invalid argument Abort trap
      Change the stacksize to 2048000 (or any number divisible by 4096)
  2. Set some permissions:
    chmod 755 /usr/local/aolserver/log
  3. Start it!
    $ /usr/local/aolserver/bin/nsd -b your_ip_address:your_port_number -ft /web/openacs/etc/config.tcl
  4. If it worked, start it with daemontools:
    1. Edit /web/yourserverlocation/etc/daemontools/run. Change the "exec" line to reflect your startup above. Note the additional "i" switch.
    2. Link it with SVC:
      ln -s /web/yourserverlocation/etc/daemontools/ /service/yourservername
    3. It should have been automatically started.
6: Re: AOLserver 4 Setup (response to 1)
Posted by Barry Books on
A couple more notes about AOL 4, ACS 5 and OS X.

I installed Panther on my machine this weekend and upgraded to openacs-5.0.0a1.tar.gz. It took about an hour to get running and I ran into 2 problems.

  1. postgresql-7.3.4 does not build under Panther. I'm not sure why, I just used the version I built under 10.2. I think Panther uses a new version of gcc.
  2. I had to add package require tdom to tcl/0-acs-init.tcl.

Just in case you are wondering so far I think Panther is a good upgrade. It seems faster although I did replace my 20gig with a 120 so that could have something to do with it. Also I upgraded my production server (> 100,000 hits per day) to AOL4 a couple of weeks ago. I had 3 or 4 easily fixed compatablity problems but everything seems fine now. TCL code runs about 20% faster (measured with dev support) and TCL package compatibilty is much better. Also a good upgrade.

7: Re: AOLserver 4 Setup (response to 1)
Posted by Chris Davies on
An extra data point for you:

my installation of 5.0's core tarball + the photo album from cvs, locked up after uploading a one individual 500kb photo followed by a 10mb tarball of photos.

AOLServer itself appears to be completely hung as it will not respond to HEAD, GET or OPTIONS requests.

interestingly, right as it locked up it appears to have reloaded the db drivers.  Looking through the logs of other sessions, I haven't seen it reload the db drivers in the middle of things like that.

[02/Nov/2003:14:44:56][13100.1093004528][] Notice: dbdrv: opening database ''
[02/Nov/2003:14:44:56][13100.1093004528][] Notice: Opening on localhost
[02/Nov/2003:14:44:56][13100.1093508336][] Notice: dbdrv: opening database ''
[02/Nov/2003:14:44:56][13100.1093508336][] Notice: Opening on localhost
[02/Nov/2003:14:44:56][13100.1093004528][] Notice: Ns_PgOpenDb(postgres):  Openned connection to
[02/Nov/2003:14:44:57][13100.1093508336][] Notice: Ns_PgOpenDb(postgres):  Openned connection to

love the typo in 'Opened'  :)

8: Re: AOLserver 4 Setup (response to 1)
Posted by Barry Books on
I have not seen that lockup problem. I do upload lots of photos but they are all under 200K. For production I'm running on Solaris 9 with ACS 3.2 and Oracle.
9: Re: AOLserver 4 Setup (response to 1)
Posted by Don Baccus on
I've been running AOLserver 4 exclusively for development for some months now, haven't seen the photo load lock-up being described (though I'm running beta8 not beta10).

As far as PG not building under Panther, this is a known issue and yes, it is due to a later version of gcc being used.  Someone posted a workaround on the PG hackers list a few days ago, and supposedly the PG 7.4 CVS HEAD compiles fine.

10: Re: AOLserver 4 Setup (response to 1)
Posted by Chris Davies on
I didn't mean to imply that it happened exclusively with the photo package -- that is just where it happened to me and I was trying to add a few data points.

I have installed the same aolserver 4.x debs in a chroot on another machine along with openacs 5.0 core + photo-album and a few other packages, and have uploaded several albums.

It only happened to me once -- but, when tracking stuff like this, I think it always helps to have as many data points to eliminate as many variables as possible.

11: Re: AOLserver 4 Setup (response to 1)
Posted by William Painter on
New to the list here so please bear with me.

Setting up the aol server on FC3 core. Postgresql installed as an rpm. I removed the tcl rpm and manually installed it with threads enabled. Compiled the aol server but I am having trouble with the modules.

nspostgres: Here is my error...

sudo make install POSTGRES=/var/lib/pgsql ACS=1
/bin/rm -f
gcc -pipe -shared -nostartfiles -L../nsthread -L../nsd -o nspostgres.o -L/var/lib/pgsql/lib -lpq -lnsdb -lnsthread -lnsd -L/usr/local/lib -ltcl8.4 -ldl -lpthread -lieee -lm -lz -lgcc_s -Wl,-rpath,/usr/local/aolserver/lib -Wl,-rpath,/usr/local/lib
/usr/bin/ld: cannot find -lnsdb
collect2: ld returned 1 exit status
make: *** [] Error 1

psql is located in /var/lib/pgsql I think. I took a look at the Makefile but I can't tell much that I need to change. I have followed Malte's instructions (

I also seem to have trouble with paths on the other modules. aol server src is at /usr/local/src/aolserver-4.0.9/ and the modules, obtained by cvs, are located in directories under that. For example:

nsrewrite]# sudo make install
../aolserver/include/Makefile.module:108: /include/ No such file or directory
make: *** No rule to make target `/include/'. Stop.

I have played with INST=/usr/local/src/aolserver-4.0.9 but with the same problem:

nsrewrite]# sudo make install INST=/usr/local/src/aolserver-4.0.9
/usr/local/src/aolserver-4.0.9/include/Makefile.module:108: /include/ No such file or directory
make: *** No rule to make target `/include/'. Stop.

I can confirm that /usr/local/src/aolserver-4.0.9/include/ holds

I would greatly appreciate any ideas on the matter.

-William Painter

12: Re: AOLserver 4 Setup (response to 1)
Posted by Lamar Owen on
On the POSTGRES= side of things, for an RPM installation you use the magic POSTGRES=LSB incantation.

The nspostgres module Makefile is written to be compiled under the source tree; put it in, using your example, /usr/local/src/aolserver-4.0.9/nspostgres should contain the nspostgres files. INST= is where the *binaries* are installed.

13: Re: AOLserver 4 Setup (response to 1)
Posted by xx xx on
In the FreeBSD port I had to call modules with:
and for nspostgres also: POSTGRES=${PGBASE} ACS=1

Where you should substitute ${PGBASE} and ${NSBASE} respectively with the directories where PostgreSQL and AOLserver are installed (/usr/local/pgsql and /usr/local/aolserver for example)

14: Re: AOLserver 4 Setup (response to 1)
Posted by William Painter on
Ok, I know I may be spamming this list, but I just can't seem to resolve the nspostgres issue.

make install POSTGRES=LSB ACS=1
/bin/rm -f
gcc -pipe -shared -nostartfiles -L../nsthread -L../nsd -o nspostgres.o -L/usr/lib -lpq -lnsdb -lnsdb -lnsthread -lnsd -L/usr/local/lib -ltcl8.4 -ldl  -lpthread -lieee -lm  -lz -lgcc_s  -Wl,-rpath,/usr/local/aolserver/lib -Wl,-rpath,/usr/local/lib
/usr/bin/ld: cannot find -lnsdb
collect2: ld returned 1 exit status
make: *** [] Error 1

I've edited the Makefile with the -lnsdb addition here:

MODLIBS = -L$(PGLIB) -lpq -lnsdb

Sorry about all this. I would be happy to receive help privately and not clutter up this list with basic questions.

Posted by Jade Rubick on
William: this is definitely not your fault.

The Aolserver 4.09 install process was (silently) changed slightly. I updated the docs on HEAD to reflect this, but I'm not sure they've been regenerated yet.

The change is that whenever you compile any of the modules, you have to specify where AOLSERVER is.

make install AOLSERVER=/usr/local/aolserver40r9

for example.

Posted by William Painter on
Thank you for your kind, and helpful, response.

I tried the command you gave me with this result:

[root@vc nspostgres]# make install AOLSERVER=/usr/local/aolserver
/bin/rm -f
gcc -pipe -shared -nostartfiles -L../nsthread -L../nsd -o nspostgres.o -L/usr/lib -lpq -lnsdb -lnsdb -lnsthread -lnsd -L/usr/local/lib -ltcl8.4 -ldl -lpthread -lieee -lm -lz -lgcc_s -Wl,-rpath,/usr/local/aolserver/lib -Wl,-rpath,/usr/local/lib
/usr/bin/ld: cannot find -lnsdb
collect2: ld returned 1 exit status
make: *** [] Error 1

I also included POSTGRES=LSB with the same result.

I checked the location of the binaries for the aolserver and they are in /usr/local/aolserver and the lib directory holds what appears to be the appropriate file:

[root@vc nspostgres]# ls -al /usr/local/aolserver/lib/
total 512
drwxr-xr-x  3 root root   4096 Dec 16 14:24 .
drwxr-xr-x  9 root root   4096 Dec 16 11:24 ..
-rwxr-xr-x  1 root root  34266 Dec 16 11:24
-rwxr-xr-x  1 root root 362436 Dec 16 11:24
-rwxr-xr-x  1 root root   3936 Dec 16 11:24
-rw-r--r--  1 root root  23220 Dec 16 11:24 libnspd.a
-rwxr-xr-x  1 root root  35145 Dec 16 11:24
drwxr-xr-x  2 root root   4096 Dec 16 14:24 tdom0.7.8
-rw-r--r--  1 root root   1659 Dec 16 14:24

I am befuddled, pretty much. It seems to be looking in the right place but isn't seeing what it needs.

17: Re: AOLserver 4 Setup (response to 1)
Posted by xx xx on
Seems like you are running into the same problem over and over again and it doesn't have to do with the way you type "make install ...." . There are just troubles with lnsdb. I don't know the linker works nor do I know if there are specifics you need to know on FC3. I remember having trouble with the linker once and the fastest way out was to reinstall. Can you?

If you are not tied to FC3 you could try FreeBSD 5.3 , but I suppose the problem you have is not specific to FC3. However, the installer I recently posted could speed you up. Good Luck.

18: Re: AOLserver 4 Setup (response to 1)
Posted by Jade Rubick on
I would recommend downloading the acs-core-docs package from HEAD, and looking at the aolserver4.xml document. That has the documentation you need. Or try installing Aolserver 4.08 instead of 4.09.