Forum OpenACS Development: Snapshot installation problems

Posted by Leif Jensen on

  I just grabbed the OpenACS-4 pre-alpha tar-ball snapshot and
installed following Vinod's Brief Installation Guide except for
PostgreSQL 7.1 which I already had installed. Aolserver compiled and
installed nicely (after I got hold of libxml2). With a few trials on
the nsd.tcl init file (renamed to leifjensen.tcl) I could start nsd
ending with 'accepting connection' displaying only a notice about
multiple defined function:

[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: Multiple definition
of util_memoize in /web/leifj
ensen/packages/acs-tcl/tcl/memoize-procs.tcl and
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: Installation is not
complete - sourcing the installer.
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: tclinit: sourcing
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: Sourcing files for
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: Done.
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: Executing
initialization code blocks...
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: QD=Postload files
to load: /web/leifjensen/www/index-oracle.xql
/web/leifjensen/www/index-postgresql.xql /web/leifjensen/www/index.xql
[10/Sep/2001:19:05:25][14009.1024][-main-] Notice: QD=Postload files
to load:
[10/Sep/2001:19:05:25][14009.1024][-main-] Warning: keepalive:
insufficient maxkeepalive 0: keepaliv
e disabled
[10/Sep/2001:19:05:25][14009.3076][-nssock-] Notice: nssock: waiting
for startup
[10/Sep/2001:19:05:26][14009.1024][-main-] Notice: nsmain:
AOLserver/3.2+ad12 running
[10/Sep/2001:19:05:26][14009.1024][-main-] Notice: nsmain: security
info: uid=500, euid=500, gid=500
, egid=500
[10/Sep/2001:19:05:26][14009.2051][-sched-] Notice: sched: starting
[10/Sep/2001:19:05:26][14009.3076][-nssock-] Notice: nssock: starting
[10/Sep/2001:19:05:26][14009.3076][-nssock-] Notice: nssock: listening
on http://fw:8080 (
[10/Sep/2001:19:05:26][14009.3076][-nssock-] Notice: nssock: accepting

When I try to connect to it from my browser, I get the follow error:

[10/Sep/2001:19:05:35][14009.4101][-conn0-] Error: Error sourcing
invalid command name "ns_getform"
    while executing
    (procedure "ad_page_contract" line 305)
    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..."
line 1)
    invoked from within
"source $__file "

I checked that the file exists and seems ok, read/write for nsadmin
(who are starting the aolserver). I have checked the database log and
it shows the connection is working although the 'leifjensen' database
is still totally empty as when I created it.

  I haven't been able to figure out where this ns_getform should be.

  Any ideas?


Posted by Gaizka Villate on
I've just got the same error. It can be solved by adding one line to your nsd.tcl file.

# Tcl Configuration
ns_section ns/server/${server}/tcl
    ns_param   Library            /web/${server}/tcl
    ns_param   autoclose              on
    ns_param   debug                  false

# ----> Add this line pointing to your aolserver tcl-modules 
#       directory
    ns_param SharedLibrary /usr/local/aolserver/modules/tcl

The parameter SharedLibrary used to appear in openacs-3.2.5 sample nsd.tcl. Maybe the sample openacs-4-nsd.txt in file-storage should be updated or is that an effect of the new bootstrap?

Posted by Leif Jensen on
That helped. Thanks a lot. Now I got much further. At the moment only two complaints about ns_xml not being the latest version, though I have just downloaded it and compiled it (AOLServer +ad12).

Posted by Gilbert Wong on

Download the latest version of ns_xml from

Posted by Jonathan Marsden on
Interestingly, I've been installing OpenACS 4 from CVS (many many times!), and I definitely don't have a 'SharedLibrary' parameter in my nsd.tcl.  I do not see any "Multiple definition" error messages, and the resulting installation works as expected.

Can anyone describe the exact conditions under which the 'SharedLibrary' parameter is required?  Why doesn't everyone need it?

Posted by Leif Jensen on
Thanks Gilbert. This removed the last comments on the welcome page and I could click 'Next'.

  I now got a lot of 'CREATE', some 'COMMENT', some table output (from select's) and ended up with 'Done ....' (I don't remember exact phrase), but the system was still accessing the database and finally the aolserver log ended up with:

[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Querying 'begin transaction;'
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Ns_PgExec: Entering transaction
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: dbinit: sql( 'begin transaction'
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Querying '

        select apm_package_version__add_file(
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Ns_PgExec: Trying to reopen database connection
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Opening leifjensen on, port
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Error: Ns_PgOpenDb(postgres):  Could not connect to  The Data Base System is starting up

[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Ns_PgExec: In transaction, conn died, error retu
[12/Sep/2001:00:09:56][19585.4101][-conn0-] Error: dbinit: error(
nsen,pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
): '

        select apm_package_version__add_file(

[12/Sep/2001:00:09:56][19585.4101][-conn0-] Notice: Querying 'abort transaction;'

  Looking in the postmaster log, yes, the postmaster had dropped out:

DEBUG:  connection: host=[local] user=leif database=leifjensen
DEBUG:  InitPostgres
DEBUG:  StartTransactionCommand
DEBUG:  query: SELECT usesuper FROM pg_user WHERE usename = 'leif'
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: select apm_package_version__add_file(NULL, '5', '', 'packaage_spec', N
DEBUG:  ProcessQuery
DEBUG:  query: SELECT  file_id from apm_package_files where version_id =  $1  and path =  $2
postmaster: reaping dead processes...
postmaster: CleanupProc: pid 2125 exited with status 139
Server process (pid 2125) exited with status 139 at Wed Sep 12 01:32:57 2001
Terminating any active server processes...
Server processes were terminated at Wed Sep 12 01:32:57 2001
Reinitializing shared memory and semaphores
invoking IpcMemoryCreate(size=1236992)
postmaster: ServerLoop:        handling reading 5
postmaster: ServerLoop:        handling reading 5
DEBUG:  database system was interrupted at 2001-09-12 01:31:33 CEST
DEBUG:  CheckPoint record at (0, 28229264)
DEBUG:  Redo record at (0, 28229264); Undo record at (0, 0); Shutdown TRUE

  I tried to execute this 'select apm_package_version__add_file...' thing manually in psql and quite right, the connection dropped out 😟.

  I am using PostgreSQL  version 7.1.1. I tried this a couple of times, dropping/recreating the database with the same result. I scanned for the apm_package_version__add_file function, but I couldn't find it anywhere, though it must be there since it was in the database.

  Please help, what am I doing wrong?


Posted by Gilbert Wong on
I've had the problem before.  It usually crops up when I reload a database from a backup.  You might need to drop and recreate the DB and start over.
Posted by Leif Jensen on
I just did. (BTW, I found the apm_package_version__add_file function. It was in apm_create.sql.)

  I think I have tried this three times, and everytime I did 'dropdb ..', 'createdb ..' and 'createlang ....'.
Posted by Gilbert Wong on
Sorry.  I didn't see your last line.  Have you tried restarting the postmaster?

Also you can do: "createlang plpgsql template1", which will automatically create the pgsql language for every new database.

Posted by Leif Jensen on
<blockquote> Sorry. I didn't see your last line. Have you tried restarting the  postmaster?

  Well, to be exact, it is only the connection that drops, not postmaster.

<blockquote>      Also you can do: "createlang plpgsql template1", which will automatically create the pgsql
      language for every new database.

  Yes, that would make it a little easier to start all over 😉

Posted by Leif Jensen on
I finally did it. I upgraded PostgreSQL 7.1.1 -> 7.1.3 and re-installed on a fresh database. Everything then went fine and I have OpenACS 4.2 up and running 😊

  Thanks for your help,