Forum OpenACS Q&A: newbie: can't get correct path in nsadmin profile

Hi,

I am at "Prepare PostgreSQL for OpenACS" and trying to create a db for open acs but I can't access the '/usr/local/pgsql/ directory.

here is my .bash_profile:
PATH=$PATH:$HOME/bin export PATH=$PATH:/usr/local/pgsql/bin # For PostgreSQL # export PATH=$PATH:/usr/local/pgsql/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib unset USERNAME
I followed the installation instructions in the documentation but I am stuff at this stage.

Collapse
Posted by edwin ho on
I just chmod 775 to my pgsql directory and now it works, is that the correct of solving this?
Collapse
Posted by edwin ho on
new problem:
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: nsmain: AOLserver/3.3.1+ad13 starting
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: nsmain: security info: uid=502, euid=502, gid=502, egid=502
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: nsmain: max files: FD_SETSIZE = 1024, rl_cur = 1024, rl_max = 1024
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: return: redirecting '404' to 'global/file-not-found.html'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: return: redirecting '403' to 'global/forbidden.html'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/postgres.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Warning: modload: failed to load '/usr/local/aolserver/bin/postgres.so': '/usr/local/aolserver/bin/p
ostgres.so: cannot open shared object file: No such file or directory'
[26/Aug/2002:15:12:54][1539.1024][-main-] Error: dbdrv: failed to load driver 'postgres'
[26/Aug/2002:15:12:54][1539.1024][-main-] Error: dbinit: no such default pool 'pool1'
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: dbinit: no configured pools
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: adp: mapped /*.adp
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nssock.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: modload: initializing module 'nssock'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nslog.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: nslog: opened '/usr/local/aolserver/log/edwinx.log'
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: modload: initializing module 'nslog'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nssha1.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: modload: initializing module 'nssha1'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nscache.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: nscache module version @VER@
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: modload: initializing module 'nscache'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsrewrite.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: modload: initializing module 'nsrewrite'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsxml.so'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: nsxml module starting
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: modload: initializing module 'nsxml'
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: conf: [ns/server/edwinx]enabletclpages = 0
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Loading OpenACS, rooted at /www/edwinx
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Sourcing /www/edwinx/packages/acs-bootstrap-installer/bootstrap.tcl
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Bootstrap: sourcing /www/edwinx/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Bootstrap: sourcing /www/edwinx/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Bootstrap: sourcing /www/edwinx/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.t
cl
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Bootstrap: sourcing /www/edwinx/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Bootstrap: sourcing /www/edwinx/packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-
procs.tcl
[26/Aug/2002:15:12:54][1539.1024][-main-] 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"
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Sourcing files for postload...
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Done.
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: Executing initialization code blocks...
[26/Aug/2002:15:12:54][1539.1024][-main-] Notice: QD=Postload files to load: /www/edwinx/www/index-oracle.xql /www/edwinx/www/index-postgresql
.xql /www/edwinx/www/index.xql
[26/Aug/2002:15:12:54][1539.1024][-main-] Debug: QD_LOGGER = Loading /www/edwinx/www/index-oracle.xql

I think one of the problems is not having the postgres module for aolserver. I've downloaded but I don't know how to install it. Which page of the installation documentation teaches me how to compile it and use it with aolserver?

Collapse
4: my system info (response to 1)
Posted by edwin ho on
Sorry, here is my system info.

RH 7.3
Postgres 7.2.1

I solved the permissions thing by su into root and changing the permissions manually.  Previously, I just followed the instructions on this site.

and that sample profile was from nsadmin.

Earlier, I followed the instructions and the instructions referenced "/web" as the web directory but on my system I was using "/www" instead, so I back tracked and repeated those steps that involve creating the creating the user and groups without deleting the previously created user and groups. I don't know if that will have any impact in the future.

Hi Edwin,

For your second problem, it looks like postgres.so is missing, or at least hiding somewhere other than where your birdnotes.tcl file says it is?

Collapse
Posted by edwin ho on
oh and I am using "Mat's AOLServer distribution" as the documentation recommended.

The file is supposed to be "${bindir}/postgres.so" but I've checked and I couldn't find the file.  I have the source for the driver but how would I compile it?

thanks.
edwin

In the source distribution look in logs/postgres.log your postgres.so
doesn't appear to have been built.

The log file will tell you what the error was.

Collapse
Posted by edwin ho on
my 'source distribution' is my usr/local/src?

I've finally gotten aolserver to run on port 8080, it works fine! but then when I start the installation of oacs, it dies there. I checked the log and nsadmin does not have permissions.

this is what I see from my error logs:

[25/Aug/2002:21:57:23][1560.6151][-conn3-] Error: Error sourcing /www/edwinx/packages/acs-bootstrap-installer/installer/install-data-model.tcl:
couldn't execute "psql": permission denied
    while executing
"open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" "r""
    (procedure "db_source_sql_file" line 38)
    invoked from within
"db_source_sql_file -callback apm_ns_write_callback "acs-kernel-create.sql""
    (file "/www/edwinx/packages/acs-bootstrap-installer/installer/install-data-model.tcl" line 31)
    invoked from within
"source $__file "
[26/Aug/2002:00:00:00][1560.2051][-sched-] Notice: nslog: closing '/usr/local/aolserver/log/edwinx.log'
[26/Aug/2002:00:00:00][1560.2051][-sched-] Notice: nslog: opened '/usr/local/aolserver/log/edwinx.log'

should I delete all the users and re-create them again? Where should I start looking now? thanks

Collapse
Posted by edwin ho on
nevermind, I forgot to run "nsd-postgres"

I got the installation to work now.