Forum OpenACS Q&A: request error when starting aolserver

I have installed OpenACS 4.5 release, with no errors. I have set up daemontools and followed Vinod's instructions. When I do 'svc -u /web/myservice', I get the following error in the browser



Request Error Server startup failed: Error during bootstrapping

command "ns_db" is not enabled
    while executing
"ns_db pools"
    (procedure "db_bootstrap_set_db_type" line 72)
    invoked from within
"db_bootstrap_set_db_type database_problem"

AOLserver/3.3.1+ad13 on http://debian:8000

I have found a thread where this error is mentioned but it was in the context of the installation giving errors. In my installation everything went fine.

thanks

Collapse
Posted by Pavel Boghita on
[07/Sep/2002:04:40:12][18941.1024][-main-] Notice: modload: loading '/usr/local/
aolserver/bin/postgres.so'
[07/Sep/2002:04:40:12][18941.1024][-main-] Warning: modload: failed to load '/us
r/local/aolserver/bin/postgres.so': 'libpq.so.2: cannot open shared object file:
 No such file or directory'
[07/Sep/2002:04:40:12][18941.1024][-main-] Error: dbdrv: failed to load driver '
postgres'
[07/Sep/2002:04:40:12][18941.1024][-main-] Error: dbinit: no such default pool '
pool1'
[07/Sep/2002:04:40:12][18941.1024][-main-] Debug: dbinit: no configured pools

this I think the relevant section in my logs. I am currently studying two threads I found on this subject. The only thing that puzzles me though is why don't I get an error when starting aolserver manually?

Collapse
Posted by Pavel Boghita on
[07/Sep/2002:02:58:09][6653.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/postgres.so'
[07/Sep/2002:02:58:09][6653.1024][-main-] Notice: PostgreSQL loaded.

This is the log for when I start the server with "/usr/local/aolserver/bin/nsd-postgres -t /usr/local/aolserver/myservice.tcl"

Collapse
Posted by Don Baccus on
It's a library path environment variable thing.  I'm not familiar with daemon tools but it must not be sourcing your .bash_profile file (assuming you're using bash), which isn't surprising.  The bottom line is that it's not finding bin/postgres.so which causes the loading of the DB API to fail, leading to ns_db not being defined.

While when you run manually the library path environment variable is being set up correctly and postres.so is being found.

Collapse
Posted by Pavel Boghita on
I am running bash, my .bash_profile has the right variables set-up, I guess that leaves a problem with the daemontools setup.

This is the svgroup.txt I have used.

#! /bin/sh
if test $# -lt 2 ; then
    echo svgroup groupname directories ... >&2
    echo for example: >&2
    echo svgroup wheel /service/* >&2
    exit 2
fi
g="$1" ; shift
for i in $* ; do
    chgrp $g $i/supervise/control
    chmod g+w $i/supervise/control
    chgrp $g $i/supervise/ok
    chmod g+w $i/supervise/ok
    # just in case
    chgrp $g $i/supervise/status
    chmod g+r $i/supervise/status
    chgrp $g $i/supervise
    chmod g+x $i/supervise
done

In one of the comments it was mentioned that I should put '#!/bin/bash' rather then '#!/bin/sh' as it says in the notes. echo $SHELL does give bash as the output so I did modify the scripts, but this doesn't seem to have any effect

Collapse
Posted by David Walker on
it is finding bin/postgres.so. it is not finding libpq.so.2

ldd /path/to/bin/postgres.so may confirm this by showing libpq.so.2 not found and the paths of the other linked libraries
Collapse
Posted by Pavel Boghita on
apologies everybody, for contributing to the threads with so much garbage, but it was all MY MISTAKE.... in the run script, I typed -q (as in que ) and not -g (as in group) web...
All is well and now I can finally say that the docs are excellent and if one follows them attentively, one gets the desired result... and that makes 'two' of us very happy...;)