Forum OpenACS Q&A: Problem with data model install for ACS 4.0

Can anyone help with this error message. The server is up and running
and serves the introductory OpenACS installer page. I click next and
the things stops in its tracks. The error in the server2.log file is
below but is basically 'could not execute psql'. Have examined file
permissions and have tested nsadmin's $PATH and $LD_LIBRARY_PATH
variables but cannot work it out:

[10/Jun/2002:23:55:16][1364.3076][-conn0-] Notice: Querying '
    select count(*) from pg_class
        where relname = lower('acs_objects') and
        relname !~ '^pg_' and relkind = 'r';'
[10/Jun/2002:23:55:16][1364.3076][-conn0-] Notice: dbinit: sql
(localhost::server2): '
    select count(*) from pg_class
        where relname = lower('acs_objects') and
        relname !~ '^pg_' and relkind = 'r'
    '
[10/Jun/2002:23:55:16][1364.3076][-conn0-] Error: Error
sourcing /web/server2/packages/acs-bootstrap-
installer/installer/install-data-model.tcl:
couldn't execute "psql": no such file or directory
    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 "/web/server2/packages/acs-bootstrap-
installer/installer/install-data-model.tcl" line 31)
    invoked from within
"source $__file "

Collapse
Posted by Jade Rubick on
Richard, it helps a lot if you put <pre> tags around your
logs.. Otherwise, it's about impossible to read.

Can you do psql from the command line?

Yes, as both nsadmin and as postgres.

Regards
Richard

Yes, as both nsadmin and as postgres.

Regards
Richard

Have formatted the logfile as per your instructions to make life easier, Regards Richard <
[10/Jun/2002:23:55:16][1364.3076][-conn0-] Notice: Querying 'select count(*) from pg_class where relname = lower('acs_objects') and relname !~ '^pg_' and relkind = 'r';[10/Jun/2002:23:55:16][1364.3076][-conn0-] Notice: dbinit: sql(localhost::server2): 'select count(*) from pg_class where relname = lower('acs_objects') and relname !~ '^pg_' and relkind = 'r'
[10/Jun/2002:23:55:16][1364.3076][-conn0-] Error: Error sourcing /web/server2/packages/acs-bootstrap-installer/installer/install-data-model.tcl:
couldn't execute "psql": no such file or directory
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 "/web/server2/packages/acs-bootstrap-installer/installer/install-data-model.tcl" line 31)
invoked from within
"source $__file "
Collapse
Posted by russ m on
That looks to me like the installer can't find psql to execute it. You might want to check that the pgbin parmeter in your init file is correct.
# section added for openacs 4.x - no longer needed ns_section ns/db/driver/postgres ns_param pgbin /opt/pgsql-7.1.2/bin/
Disregard the "no longer needed" comment in the init file... :)
Collapse
Posted by David Kuczek on
Do you really install ACS 4.0 or do you mean OACS 4.5? Just curious!
Fantastic, thankyou. Of course now you mention it it seems obvious because for the installer to work it must source an external program (rather as the sybase driver) rather than simply the internal postgres driver. This parameter was not in the AOLServer docs that I have and is not in the sample file openacs4.tcl.txt.

I will post a mention of this on the docs page.

Thanks for your help.

Richard

Collapse
Posted by Vinod Kurup on
Hi Richard,

Are you starting openacs with a nsd-postgres wrapper script as explained in the docs. If so, that should set add PG's bin directory to the PATH of the running aolserver, so that it should be able to find psql, without setting the parameter in the nsd.tcl file.