Forum OpenACS Q&A: AOL doesn't load postgres.so driver
I installed on linux mandrake 7.1, the rpm postgresql-7.0.2, compiled
the pgdriver1.1, AOLserver3.2.
But AOLserver can't load the postgres.so driver when I run it. The log
said:
[13/Dec/2000:11:23:42][3007.1024][-main-] Notice: modload: loading
'/home/aolserver/bin/postgres.so'
[13/Dec/2000:11:23:42][3007.1024][-main-] Warning: modload: failed to
load '/home/aolserver/bin/postgres.so': 'libplpgsql.so.1.0: cannot op
en shared object file: File o directory inesistente'
[13/Dec/2000:11:23:42][3007.1024][-main-] Error: dbdrv: failed to load
driver 'postgres'
As suggested for other similar questions, I tried to set up
LD_LIBRARY_PATH=/usr/lib/pgsql where the file libplpgsql.so is
located.
without success.
Can anybody help me ?
thank you
PS:
I followed step by step the instructions of Don Baccus paper: "Getting
started with openACS" using his sample configuration file for AOL:
(I post only the first part)
$Header: /cvsroot/aolserver/aolserver3/scripts/nsd.tcl,v 1.12
2000/04/12 15:52:37 kriston Exp $
#
# nsd.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.tcl: starting to read
config file..."
#
# Set some Tcl variables that are commonly
used throughout this file.
#
set httpport 8000
set httpsport 8443
set hostname
fedora.sinapsi.net.com
set address 10.10.10.58
set servername "oacspg"
set serverdesc "OpenACS Test
Server"
set homedir [file dirname
[ns_info config]]
set bindir [file dirname
[ns_info nsd]]
set pageroot /home/oacs/www
set directoryfile
index.adp,index.html,index.htm,index.tcl
ns_section "ns/db/drivers"
ns_param postgres "postgres.so"
ns_section "ns/db/driver/postgres"
ns_param datestyle "iso"
ns_section "ns/db/pool/main"
ns_param Driver "postgres"
ns_param Connections 4
ns_param MaxOpen 1000000000
ns_param MaxIdle 1000000000
ns_param User "oacs"
ns_param Verbose "On"
ns_param LogSQLErrors "On"
ns_param DataSource "localhost::oacs"
ns_section "ns/db/pool/subquery"
ns_param Driver "postgres"
ns_param Connections 4
ns_param MaxOpen 1000000000
ns_param MaxIdle 1000000000
ns_param User "oacs"
ns_param Verbose "On"
ns_param LogSQLErrors "On"
ns_param DataSource "localhost::oacs"
ns_section "ns/db/pool/log"
ns_param Driver "postgres"
ns_param Connections 4
ns_param MaxOpen 1000000000
ns_param MaxIdle 1000000000
ns_param User "oacs"
ns_param Verbose "On"
ns_param LogSQLErrors "On"
ns_param DataSource "localhost::oacs"
ns_section "ns/db/pools"
ns_param main "main"
ns_param subquery "subquery"
ns_param log "log"
ns_section "ns/parameters"
# nsssl: Only loads if keyfile.pem and
certfile.pem exist.
#set sslkeyfile
${homedir}/servers/${servername}/modules/nsssl/keyfile.pem
#set sslcertfile
${homedir}/servers/${servername}/modules/nsssl/certfile.pem
# nscp: Uncomment the sample password and log
in with "nsadmin", password "x",
# type "ns_crypt newpassword salt" and
put the new encrypted string below.
set nscp_user ""
#set nscp_user
"nsadmin:t2GqvvaiIUbF2:" ;# sample user="nsadmin", pw="x"
#
# Global server parameters
#
ns_section "ns/parameters"
ns_param home $homedir
ns_param debug false
ns_param mailhost
"smtp.pacifier.com"
#
# Thread library (nsthread) parameters
#
ns_section "ns/threads"
ns_param mutexmeter true ;#
measure lock contention
#ns_param stacksize [expr 128*1024] ;#
Per-thread stack size for hungry C modules.
#
# 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"
############################################################
#
# 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
#
# Server parameters
#
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 URLs to do stats on
ns_param enabletclpages true ;# Parse
tcl files in pageroot (dangerous)
# 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
# Database configuration
ns_section "ns/server/${servername}/db"
ns_param pools "*"
ns_param defaultpool "main"
# Private library
ns_section "ns/server/${servername}/tcl"
ns_param library "/home/oacs/tcl"
I solved the problem creating a link file /usr/lib/plpgsql.so.1.0
However, AOLserver gave another error:
Warning: modload: failed to load '/home/aolserver/bin/postgres.so': '/lib/libplpgsql.so.1.0: undefined symbol: CurrentMemoryContext'
Error: dbdrv: failed to load driver 'postgres'
Error: dbinit: no such default pool 'main'
I found that the library plpgsql (installed by rpm postgresql) had not symbols(??)
So I decided to uninstal the rpm, to download the source of postgresql and compile it.
Now everything works perfectly.
thanks and bye to everybody