Forum OpenACS Q&A: ACS4.6 Kernel Installing Problems

Collapse
Posted by walter kubiak on
Hi,
I am installing ACS4.6 on RedHat8.0 with AOLserver/3.3.1+ad13.
I am having some strange problems with installing OpenAcs Kernel Data Model during the installation process. I followed the instructions from  Install Guide that  comes with the distribution. Somehow, when the html page shows up showing kernel installation, nothing happens. I am using inittab file to control Aolserver.

I included in my /etc/inittab this line:

nss1:2345:respawn:/usr/local/aolserver/bin/nsd-postgres -i -u nsadmin -g web -t /home/nsadmin/web/wide-open/nsd.tcl

My postgres log shows nothing, not even an attempt to connect to a database.
My aolserver error.log shows the following error which to me indicates that there is a problems with the access to my database leading to unabillity to create some of the initially needed data blocks.
[15/Feb/2003:06:50:03][1478.65545][-nssock-] Notice: nssock: accepting connections
[15/Feb/2003:06:53:54][1478.24580][-conn0-] Error: Ns_PgExec: result status: 7 message: ERROR:  Relation "apm_package_db_types" does not exist

[15/Feb/2003:06:53:54][1478.24580][-conn0-] Error: Error sourcing /home/nsadmin/web/wide-open/packages/acs-bootstrap-installer/installer/install-data-model.tcl:
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")
    while executing
"ns_pg_bind 0or1row nsdb0 {
    select case when count(*) = 0 then 0 else 1 end from apm_package_db_types}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec 0or1row $db $full_name $sql"
    invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
    set selection [db_exec 0or1row $db $full_name $sql]
    }"
    (procedure "db_string" line 7)
    invoked from within
"db_string db_types_exists "
    select case when count(*) = 0 then 0 else 1 end from apm_package_db_types""
    invoked from within
"set apm_db_types_exists [db_string db_types_exists "
    select case when count(*) = 0 then 0 else 1 end from apm_package_db_types"]"
    (file "/home/nsadmin/web/wide-open/packages/acs-bootstrap-installer/installer/install-data-model.tcl" line 40)
    invoked from within
"source $__file "

Strangely enough, when I use the same line from inittab file from my command prompt without the first few parameters, everything works like a charm.

That is the line:
/usr/local/aolserver/bin/nsd-postgres -i -u nsadmin -g web -t /home/nsadmin/web/wide-open/nsd.tcl

This way, I can get ACS4.6 going, but I would rather have it controlled by innittab to assure that server is always running.

Thanks for help.
Walter

Collapse
Posted by Don Baccus on
It looks to me as though somehow it's logging into Postgres as a different user, because the error is saying that the table apm_package_db_types does not exist.

So I'd look into my datapool definitions if I were you ...

Collapse
Posted by walter kubiak on
Thanks for such a quick response Don:
If I understand correctly, my datapool definitions describe my database users, their access rights, and some info about the database creating the pool. To be honest, I don’t know where to find this information on my PostgreSQL 7.2.3 installation. I checked the PostgreSQL 7.2.3 Help Files and couldn’t find anything about datapools definitions.
Could you elaborate more on where I could find more information on datapool definitions?
I completely agree with you on the fact that it's logging into Postgres as a different user. I also suspect that this user has no rights to crate needed tables. The apm_package_db_types table happens to be the first one that the system needs to continue to install the kernel, but it is not created, so it throws an error.

Walter

Collapse
Posted by Jade Rubick on
It looks like a path or permissions problem to me.

Try typing in the command as root. You'll probably get the same error (?)

Look at the nsd-postgres script. Make sure you have it in correctly.

Make sure you have group permissions open for the right files...

Collapse
Posted by walter kubiak on
I don’t think I solved this problem, but I followed the guide again and I noticed the first time around I followed this order:

Install OpenACS 4.6
1.    Downloading OpenACS
2.    Prepare PostgreSQL for OpenACS
3.    Configure AOLserver
4.    Keep AOLserver alive (only to Install deamontools)
5.    Using OpenACS Installer

The second time around, I followed to the guide more carefully, Using OpenACS Installer before Keep AOLserver alive, and everything worked fine. I also set up my Site-Wide-Search before making the server automated for startup and shutdown. Now, the system works fine, but I am afraid that to install more packages I will need to disable automated startup and get the server running manually to load the necessary data blocks.

Collapse
Posted by Jade Rubick on
Walter, I think this may be a permissions issue. You can watch the server logs while you start it up and see what's going on sometimes.

You should be able to run everything automated -- I wouldn't neglect getting this part set up. :)

Collapse
Posted by walter kubiak on
OK, I managed to find the problem with my installation. It appears to be even simpler then I thought. RedHat 8.0 has an option to install a database called Red Hat Database 2.1 when installing OS . "Red Hat Database is based on PostgreSQL" according to a RedHat 8.0 documentation. It is critical that this database is either not installed at all or uninstalled before installing openACS. If you neglect this you will run into all kinds of problems with PATH’s. That is exactly what happen to me- my aolserver was calling wrong psql to load the data blocks. The problem was that in my nsd-postgres file, the path was leading aolserver first to psql belonging to Red Hat Database and never reaching Postgresql psql.

This thread was more that helpful in solving this issue:
https://openacs.org/forums/message-view?message_id=33433