Forum OpenACS Q&A: Can't load postgres.so

Collapse
Posted by Tom Brown on
Following instructions at https://openacs.org/doc/unix-install.html. I think the instructions are incomplete. I'm compiling from source.

. Slackware 8.1
. aolserver-3.5.6
. postgresql-7.3.2
. postgresql-driver
. tcl-8.4.2
. tk-8.4.2

I'm at the point of "Configuring Aolserver" in https://openacs.org/doc/openacs.html

My server error log shows problems beginning when "/usr/local/aolserver/bin/nsd-postgres -t /usr/local/aolserver/freegeek.tcl" can't load postgres.so.

"Warning: modload: failed to load '/usr/local/aolserver/bin/postgres.so':'/usr/local/aolserver/bin/postgres.so: cannot open shared object file: No such file or directory'

This causes dbdrv and dbinit problems. And later fails to load '/usr/local/aolserver/bin/nssha1.so'. This last error is fatal.

Collapse
Posted by Tilmann Singer on
LD_LIBRARY_PATH set wrongly in the caller's environment? Try running nsd in the foreground from the shell with -f and see what happens.
Collapse
Posted by Cathy Sarisky on
I'd also check that the permissions on the library files are ok.  Specifically, the user you're running aolserver as needs to have permissions on the files typically installed at /usr/local/pgsql/lib.

Oh, I see you're using 7.3.2.  There are some compatibility issues with 7.3.2 and OpenACS4.6.x.  (You didn't say which OpenACS you're using?)  You probably want to back up to 7.2.x if this is your first OpenACS install.

You might also want to get AOLserver from http://uptime.openacs.org/aolserver-openacs/ - that's the patched for OpenACS version (see the note at the top about file names being different).  I'd suggest sticking pretty closely to those install docs for versions for a first install.  Perhaps someone else will comment on whether AOLserver 3.5.6 works out of the box (er... tarball?) or whether patching is required.

(If this is your upteenth million install, please accept my apologies for assuming otherwise. :)

Collapse
Posted by Tom Brown on
nsadmin is invoking nsd from /usr/local/aolserver. The LD_LIBRARY_PATH is /usr/local/pgsql/lib. Had already used -ft switches. Sorry didn't mention it.

Permissions for /usr/local/pgsql/lib (40755):
. rwx for owner
. rx for group
. rx for others

World readable and writable so all should be well.

This is my first OpenACS install, using v3.5.6. Thought I'd stay away from latest version to make things easier. <g>

Best course is to remove current installation, download the pre-patched sources and try again.

Collapse
Posted by Tom Brown on
Sorry. World executable.
Collapse
Posted by Vinod Kurup on
Hi Tom,

Warning: modload: failed to load '/usr/local/aolserver/bin/postgres.so':'/usr/local/aolserver/bin/postgres.so: cannot open shared object file: No such file or directory'

AOLserver can't find /usr/local/aolserver/bin/postgres.so. Does it exist? The postgres driver used to be called postgres.so, but has recently been renamed to nspostgres.so. If you have nspostgres.so in that directory, then you need to edit your freegeek.tcl config file to point to nspostgres.so instead of postgres.so.

Collapse
Posted by Tom Brown on
Hi Vinod,

Visually inspected directories below and saw no nspostgres.so or postgres.so.

Nothing in:
. /usr/local/aolserver/bin
. /usr/lib
. /lib
. /usr/local/aolserver/lib
. /usr/local/pgsql/lib

Found missing step in instructions -- no make or make install for /usr/local/src/aolserver/nspostgres. I assumed the ./conf would handle that. But it didn't. Mat's notes don't mention it either, but the makefile in the driver directory has helpful comments.

The missing step created the nspostgres.so driver. I changed freegeek.tcl as you suggested.

That worked! Now on to installing OpenACS.

Collapse
Posted by Tom Brown on
Dead in the water again.

Started browser and pointed to http://slack1:8000/. Got the Welcome page, no errors reported. "Your Postgresql driver is correctly installed and configured." I clicked Next.

The data model install has been idle for 20+ minutes (says I should have faith). No next button. The page stalled on:

(1 row)
DROP FUNCTION
CREATE FUNCTION
DROP FUNCTION
acs_object_new
---------------
            -3
(1 row)
INSERT 26736 1
acs_privilege_create_privilege
-------------------------------
                              0
(1 row)
acs_privilege_add_child
------------------------
                      0
(1 row)

Collapse
Posted by Tom Brown on
Oops. Reloaded page in desperation and got the next button. Now its installing OpenACS Core Services. If it stalls again, I'll reload.
Collapse
Posted by Tom Brown on
Really dead. Reloaded three times.

Browser shows:
http://slack1/8000/packages-install?

Page displays:
OpenACS Installation: Installing OpenACS Core Services
. Completing install sequence.
    CREATE FUNCTION
    DROP FUNCTION