Forum OpenACS Q&A: OpenACS 5.1.0 & Solaris Install problem

Hi,

Any idea?

Solaris 8
PG 7.4.1
aolserver_v40_r2 from CVS
openacs-5.1.0.tar.gz

Encounter the following error right after,

OpenACS Installation: Welcome <--page

Click on <Start Installation> button, next page display stops at,

Installing the OpenACS kernel data model...

In console the following error msg displayed:

ERROR:  relation "apm_package_db_types" does not exist

In error.log,

<snip> .....
[16/Jun/2004:13:38:07][17840.5][-sched-] Notice: sched: starting
[16/Jun/2004:13:38:07][17840.1][-main-] Notice: nssock: listening on 10.5.1\
3.231:8000
[16/Jun/2004:13:38:07][17840.12][-driver-] Notice: starting
[16/Jun/2004:13:38:07][17840.12][-driver-] Notice: driver: accepting connec\
tions
[16/Jun/2004:13:50:17][17840.7][-conn:service0::1] Error: Ns_PgExec: result\
status: 7 message: ERROR:  relation "apm_package_db_types" does not exist

[16/Jun/2004:13:50:17][17840.7][-conn:service0::1] Error: Error sourcing /v\
ar/lib/aolserver/service0/packages/acs-bootstrap-installer/installer/instal\
l.tcl:
Database operation "0or1row" failed (exception NSDB, "Query was not a state\
ment returning rows.")

ERROR:  relation "apm_package_db_types" does not exist

SQL:
        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]"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $a\
rgs]
                }
      ..."
    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 "

<snip>.....

Cheers
Ina

Collapse
Posted by Dirk Gomez on
Yes, most likely something with your OpenACS configuration file or your environment is wrong.

What are the database options in your OpenACS configuration file for PostgreSQL? Have you (manually!) created this database?

Are you starting the server with the proper environment? Check whether the pathnames in nsd-postgres are correct.

Collapse
Posted by azlina danyal on
Hi,

Thanks for the reply, inital creation of database works fine. I used the following cmd to create the db as instructed in "Prepare PostgreSQL for an OpenACS Service" procedure in the install manual:

[service0 service0]$ createdb -E UNICODE service0

and was sucessfully.

thus, inital startup of AOLsvr and OpenACS was o.k, errors persist only during start of Kernel Data Model installation as per my earlier posting, so I dun really think there was a problem with loading of nsd-postgres, the log file didn't show any erros I didn't make much changes on the config.tcl (only the necessary minor change as per the install instruction),  we had a couple of servers running live openacs sites on redhat9 but this is our 1st openacs on solaris 8.

<snip>....
[16/Jun/2004:13:38:02][17840.1][-main-] Notice: modload: loading '/usr/local/ao\
lserver/bin/nsdb.so'
[16/Jun/2004:13:38:02][17840.1][-main-] Notice: modload: loading '/usr/local/ao\
lserver/bin/nspostgres.so'
[16/Jun/2004:13:38:02][17840.1][-main-] Notice: PostgreSQL loaded.
[16/Jun/2004:13:38:02][17840.1][-main-] Notice: conf: [ns/server/service0]enabl\
etclpages = 0
[16/Jun/2004:13:38:02][17840.1][-main-] Notice: Loading OpenACS, rooted at /var\
/lib/aolserver/service0
[16/Jun/2004:13:38:02][17840.1][-main-] Notice: Sourcing /var/lib/aolserver/ser\
vice0/packages/acs-bootstrap-installer/bootstrap.tcl
<snip>....

<snip>
[16/Jun/2004:13:38:07][17840.5][-sched-] Notice: sched: starting
[16/Jun/2004:13:38:07][17840.1][-main-] Notice: nssock: listening on 10.5.13.23\
1:8000
[16/Jun/2004:13:38:07][17840.12][-driver-] Notice: starting
[16/Jun/2004:13:38:07][17840.12][-driver-] Notice: driver: accepting connection\
s
[16/Jun/2004:13:50:17][17840.7][-conn:service0::1] Error: Ns_PgExec: result sta\
tus: 7 message: ERROR:  relation "apm_package_db_types" does not exist

[16/Jun/2004:13:50:17][17840.7][-conn:service0::1] Error: Error sourcing /var/l\
ib/aolserver/service0/packages/acs-bootstrap-installer/installer/install.tcl:
Database operation "0or1row" failed (exception NSDB, "Query was not a statement\
returning rows.")

ERROR:  relation "apm_package_db_types" does not exist

SQL:
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_typ\
es
    while executing
<snip>

ciao..
ina

Collapse
Posted by Dirk Gomez on
Is this the first error in the log file? Can you drop and recreate the PostgreSQL database and see what happens then?

Does psql service0 work?

Collapse
Posted by azlina danyal on
hi dirk,

that was fast...yes that is the start of the error. It happens after I load the inital install page, fill-up the info, click the start installation button and the next page only display the 1st line as stated earlier, refresh brings me back to inital install page. I'd tried to drop and recreate the db many times, same error persist with a fresh db. yup, psql service0 works fine.

ina..

Collapse
Posted by Dirk Gomez on
Does this table exist "in psql"? (-> select * from apm_package_db_types)

is there anything in the logfile that suggests that one or more tables have been created successfully?

Collapse
Posted by azlina danyal on
1) Does this table exist "in psql"? (-> select * from apm_package_db_types)

execute the above select statement, nothing was return...

bash-2.03$ psql service0
Welcome to psql 7.4.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
      \h for help with SQL commands
      \? for help on internal slash commands
      \g or terminate with semicolon to execute query
      \q to quit

service0=# select * from apm_package_db_types
service0-#

2) Is there anything in the logfile that suggests that one or more tables have been created successfully?

doesn't seems so,

keep repeating the following error...

<snip>...
[16/Jun/2004:13:50:17][17840.7][-conn:service0::1] Error: Error sourcing /var/l\
ib/aolserver/service0/packages/acs-bootstrap-installer/installer/install.tcl:
Database operation "0or1row" failed (exception NSDB, "Query was not a statement\
returning rows.")

ERROR:  relation "apm_package_db_types" does not exist
<snip>...

Hi Anybody,

Reinstall from scratch, everything seems to work,(daemontools, pg start-up script, etc.., tested aol, tested psql) until the portion describe earlier.It just wont install the OpenACS kernel data model.  Anybody have sucessfully install on similar platform, versions.  Anyway here is the start of the error in my error.log, appreciate any comment.

[18/Jun/2004:02:05:41][25782.1][-main-] Notice: nssock: listening on 10.5.13.231:8000
[18/Jun/2004:02:05:41][25782.12][-driver-] Notice: starting
[18/Jun/2004:02:05:41][25782.12][-driver-] Notice: driver: accepting connections
[18/Jun/2004:02:08:19][25782.7][-conn:service0::1] Error: Ns_PgExec: result status: 7 message: ERROR:  relation "apm_package\
_db_types" does not exist

[18/Jun/2004:02:08:19][25782.7][-conn:service0::1] Error: Error sourcing /var/lib/aolserver/service0/packages/acs-bootstrap-\
installer/installer/install.tcl:
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  relation "apm_package_db_types" does not exist

SQL:
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_types
    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]"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
      ..."
    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 -dbn $dbn db {
        set selection [db_exec 0or1row $db $full_name $sql]
    }"
    (procedure "db_string" line 8)
    invoked from within
"db_string db_types_exists "
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_types""
    (procedure "install_do_data_model_install" line 16)
    invoked from within
"install_do_data_model_install"
    invoked from within
"if { ![install_good_data_model_p] } {
    install_do_data_model_install
} else {
    ns_write "Kernel data model already installed."
    # If kernel i..."
    (file "/var/lib/aolserver/service0/packages/acs-bootstrap-installer/installer/install.tcl" line 37)
    invoked from within
"source $__file "

cheers,
ina

Collapse
Posted by Dave Bauer on
Set debug true in your config file and see if that gives you more information in the error log.
Collapse
Posted by azlina danyal on
Hi,

error.log with debug true, I'm still not sure what's the problem here.

Thanks,
ina...

18/Jun/2004:03:08:42][3274.1][-main-] Notice: nssock: listening on 10.5.13.231:8000
[18/Jun/2004:03:08:42][3274.12][-driver-] Notice: starting
[18/Jun/2004:03:08:42][3274.12][-driver-] Notice: driver: accepting connections
[18/Jun/2004:03:10:33][3274.6][-conn:service0::0] Debug: NO FULLQUERY FOR dbqd.acs-tcl.tcl.00-database-procs.db_table_exists\
.table_count --> using default SQL
[18/Jun/2004:03:10:33][3274.6][-conn:service0::0] Notice: Querying '
                select count(*) from pg_class
                where relname = lower('apm_packages') and
                    relname !~ '^pg_' and relkind = 'r';'
[18/Jun/2004:03:10:33][3274.6][-conn:service0::0] Notice: dbinit: sql(localhost::service0): '
                select count(*) from pg_class
                where relname = lower('apm_packages') and
                    relname !~ '^pg_' and relkind = 'r'
            '
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Debug: NO FULLQUERY FOR dbqd.acs-tcl.tcl.00-database-procs.db_table_exists\
.table_count --> using default SQL
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Notice: Querying '
                select count(*) from pg_class
                where relname = lower('acs_objects') and
                    relname !~ '^pg_' and relkind = 'r';'
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Notice: dbinit: sql(localhost::service0): '
                select count(*) from pg_class
                where relname = lower('acs_objects') and
                    relname !~ '^pg_' and relkind = 'r'
            '
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Debug: NO FULLQUERY FOR dbqd.acs-bootstrap-installer.installer.install_do_\
data_model_install.db_types_exists --> using default SQL
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Notice: Querying '
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_types;'
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Error: Ns_PgExec: result status: 7 message: ERROR:  relation "apm_package_\
db_types" does not exist

[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Error: dbinit: error(localhost::service0,ERROR:  relation "apm_package_db_\
types" does not exist
): '
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_types'
[18/Jun/2004:03:11:36][3274.7][-conn:service0::1] Error: Error sourcing /var/lib/aolserver/service0/packages/acs-bootstrap-i\
nstaller/installer/install.tcl:
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  relation "apm_package_db_types" does not exist

SQL:
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_types
    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]"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
      ..."
    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 -dbn $dbn db {
        set selection [db_exec 0or1row $db $full_name $sql]
    }"
    (procedure "db_string" line 8)
    invoked from within
"db_string db_types_exists "
        select case when count(*) = 0 then 0 else 1 end from apm_package_db_types""
    (procedure "install_do_data_model_install" line 16)
    invoked from within
"install_do_data_model_install"
    invoked from within
"if { ![install_good_data_model_p] } {
    install_do_data_model_install
} else {
    ns_write "Kernel data model already installed."
    # If kernel i..."
    (file "/var/lib/aolserver/service0/packages/acs-bootstrap-installer/installer/install.tcl" line 37)
    invoked from within
"source $__file "

Did you tar or gtar?
Collapse
Posted by azlina danyal on
Hi,

I used gnu tar that I'd downloaded from sunfreeware.com.

ina..

Collapse
Posted by Don Baccus on
As far as this goes:

service0=# select * from apm_package_db_types
service0-#

You need to terminate the SQL command with a ";" in PSQL.

That's why it did nothing.

So could you execute that command, and also...

select count(*) from acs_objects;

and

select count(*) from sec_session_properties;