Forum OpenACS Q&A: Unable to get ACS working

Collapse
Posted by Pradeep Kumar on
Hi Everybody,


I need help..........

My AOL Server is OK .
ACS is Started fine.
Postgres is also running

But when i tried to access at:

lynx <i.p.address>:8000

it gives the following error

Looking up <i.p.address> first.
Looking up <i.p.address>:8000.
Making HTTP connection to <i.p.address>:8000.
Sending HTTP request.
HTTP request sent; waiting for response.
HTTP/1.0 302 Found
Data transfer complete
HTTP/1.0 302 Found
Looking up ACS:8000.
Making HTTP connection to ACS:8000.
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://ACS:8000/';
Alert!: Unable to access document.

Server log gives the following error:

[11/Jun/2001:03:00:20][26677.1024][-main-] Notice: nsmain:
AOLserver/3.4
startin
...skipping...
ERROR:  Relation 'dual' does not exist
): 'select nextval('sec_id_seq') from dual'
[11/Jun/2001:14:39:00][28096.4101][-conn0-] Error: Filter
sec_read_security_info
returned error #1: Database operation "1row" failed (exception
NSDB, "Query
was
not a statement returning rows.")
[11/Jun/2001:14:39:00][28096.4101][-conn0-] Error: tclop: invalid
return
code fr
om filter proc 'Critical filter sec_read_security_info failed.': must
be
filter_
ok, filter_return, or filter_break

As I am on Local Network, I am able to resolve name by doing nslookup

Please Help Me.

Regards,
--Pradeep

Collapse
Posted by Todd Gillespie on
Did you load the data model?  (via 'psql <dbname> -f load-data-model.sql')  It looks as though you have not, given that 'dual' is undefined.  Because of that, an ACS security filter failed and aborted your HTTP request.

Do that first.  We'll be here after you check it.

Collapse
Posted by Pradeep Kumar on
While in directory

/home/acs/openacs-3.2.5/www/doc/sql
when i give the command 'psql acs -f load-data-model.sql'

<<here acs is my database name>>

it gives the following errors:

permitted to create a function in the 'C' language.
      2        Others may use the 'sql' language or the created procedural languages.
      3 psql:postgres.sql:18: ERROR:  Only users with Postgres superuser privilege are permitted to create procedural languages
      4 psql:postgres.sql:27: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
      5        Recognized languages are sql, C, internal, and created procedural languages.
      6 psql:postgres.sql:38: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
      7        Recognized languages are sql, C, internal, and created procedural languages.
      8 psql:postgres.sql:44: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
      9        Recognized languages are sql, C, internal, and created procedural languages.
    10 psql:postgres.sql:52: ERROR:  Function 'sysdate()' does not exist
    11        Unable to identify a function that satisfies the given argument types
    12        You may need to add explicit typecasts

****************************************
****************************************
****************************************

_idx' already exists
  2499 psql:photodb.sql:286: ERROR:  Cannot create index: 'ph_prest_photo_by_photo_idx' already exists
  2500 psql:photodb.sql:296: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
  2501        Recognized languages are sql, C, internal, and created procedural languages.
  2502 psql:photodb.sql:301: NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
  2503 psql:photodb.sql:301: ERROR:  Relation 'ph_presentation_user_map' already exists
  2504 psql:photodb.sql:303: ERROR:  Cannot create index: 'ph_prest_user_by_present_idx' already exists                                                          2505 psql:photodb.sql:304: ERROR:  Cannot create index: 'ph_prest_user_by_user_idx' already exists                                                              2506 psql:photodb.sql:314: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.                                                            2507        Recognized languages are sql, C, internal, and created procedural languages.

psql:photodb.sql:323: ERROR:  Relation 'dual' does not exist
psql:photodb.sql:329: ERROR:  Relation 'dual' does not exist

Some of errors can be ignored as i am running that command 2nd time.

Expecting your help soon.

Regards,
--Pradeep

Collapse
Posted by James Harris on
I would suggest that some (if not all) of your problems are related to permissions after seeing this:

ERROR: Only users with Postgres superuser privilege are permitted to create procedural language

Are you logged on as a user with Postgres superuser privileges?  The other errors look like they are related to not having psql available, and from already having created some of the data model.

Try logging on as a Postgres superuser, dropping the database, and rerunning the data model.

Collapse
Posted by Pradeep Kumar on
Hello....

While logged in as a postgres the following are the sequence of command given by me:

[postgres@ACS postgres]$ createuser acs
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER

[postgres@ACS postgres]$ createdb acs
CREATE DATABASE

[postgres@ACS postgres]$ createlang plpgsql acs
createlang: cannot find the file ':/usr/local/pgsql/lib/plpgsql.so'

This file contains the call handler for PL/pgSQL.  By default,
only PL/pgSQL is built and installed; other languages must be
explicitly enabled at configure time.

To install PL/Tcl, make sure the option --with-tcl is given to
configure, then recompile and install.  To install PL/Perl use
--with-perl.

Then after logging as a acs user on my machine( a system account on my machine & also added as database user with same password.) i have given following command:

[acs@ACS acs]$cd /openacs-3.2.5/www/install
[acs@ACS acs]$ ./load-geo-tables >& data.log
[acs@ACS acs]$ grep ERROR data.log

I found no errors.Then..

[acs@ACS acs]$ cd ../doc/sql
[acs@ACS acs]$ psql -f load-data-model.sql >& model.log

[acs@ACS acs]$ grep ERROR *.log

I found the following errors:

******************
********************
  *********************
psql:sdm.sql:671: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:sdm.sql:686: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:sdm.sql:702: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:sdm.sql:740: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:15: ERROR:  Function 'administration_group_add(unknown, unknown, unknown, unknown, unknown, unknown)' does not exist
psql:photodb.sql:146: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:239: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:250: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:276: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:296: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:314: ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
psql:photodb.sql:323: ERROR:  Relation 'dual' does not exist
psql:photodb.sql:329: ERROR:  Relation 'dual' does not exist

Please Help Me.................

Regards,
--Pradeep

Collapse
Posted by Jonathan Ellis on
Follow the installation guide

- Login as 'postgres' (the PostgreSQL super user) and create a user for AOLserver in PostgreSQL. If your AOLserver runs as 'nsadmin' , that should be the user to create with the command createuser nsadmin. In PG 6.5, you will be asked if the user is a super user and allowed to create dabatases, respond YES (y) to both. In PG 7 it will ask you if this user is allowed to create databases and if this user is allowed to create new users, respond YES (y) to both as well.

From now on, become the user AOLserver will connect to PostgreSQL as (e.g. nsadmin).

...
Collapse
Posted by javier wilson on
I had to edit some .sql files (those at www/doc/sql/)
because they used "/usr/local/pgsql/lib" and my postgres
installation uses "/usr/lib/pgsql"

This happened particulary in two files:
/www/doc/sql/postgres.sql and /www/doc/sql/postgres-pgtcl.sql

I hope this helps.