Forum OpenACS Q&A: Installation problem

Collapse
Posted by Stefan Bludszus on
Hi all,

I have a problem with installing OpenACS-4 with win2k. I use cygwin
with postgres 7.1.3, binary version of aol33ad13 and OpenACS-4
(4.2.0b2).

If I install the datamodel i get following error message from
aolserver:
#################################################################
[28/Jan/2002:15:24:21][1988.1720][-conn0-] Notice: dbinit: sql
(192.168.1.10::oacs): '
        select count(*) from pg_class
        where relname = lower('acs_objects') and
            relname !~ '^pg_' and relkind = 'r'
    '
[28/Jan/2002:15:25:53][1988.1720][-conn0-] Error: Error
sourcing /openacs-4/packages/acs-bootstrap-i
nstaller/installer/install-data-model.tcl:
psql:postgresql.sql:283: ERROR:  copy: line 160, CopyReadAttribute:
end of record marker corrupted
psql:postgresql.sql:283: PQendcopy: resetting connection
psql:acs-objects-create.sql:156: ERROR:  Function 'tree_next_key
(varchar)' does not exist
        Unable to identify a function that satisfies the given
argument types
        You may need to add explicit typecasts
psql:acs-relationships-create.sql:299: ERROR:  Function 'tree_next_key
(varchar)' does not exist
        Unable to identify a function that satisfies the given
argument types
        You may need to add explicit typecasts
#####################################################################

I started postgres with debug level 4 and get following message:

#####################################################################
DEBUG:  query: copy tree_encodings from stdin using delimiters '/' ;
DEBUG:  parse tree: { QUERY :command 5  :utility ?  :resultRelation
0 :into <> :isPortal false :isBi
nary false :isTemp false :hasAggs false :hasSubLinks false :rtable
<> :jointree <> :rowMarks () :tar
getList <> :groupClause <> :havingQual <> :distinctClause
<> :sortClause <> :limitOffset <> :limitCo
unt <> :setOperations <> :resultRelations ()}
DEBUG:  ProcessUtility: copy tree_encodings from stdin using
delimiters '/' ;
ERROR:  copy: line 160, CopyReadAttribute: end of record marker
corrupted
DEBUG:  AbortCurrentTransaction
FATAL 1:  Socket command type
unknown
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)
###################################################################

I extracted the statement "copy tree_encodings from stdin using
delimiters '/' ; ..." in a separated file and executed it with the
same result.

Is my postgres installation wrong or what happens? Postgres don't
recgonize the end marker.

p.s. excuse my bad english!

Collapse
Posted by Don Baccus on
That version's obsolete anyway, we've changed the tree sortkey representation entirely.

Yesterday I learned, to my disgust, that our nightly tarballs have been failing for about two months. I may have time later today to look into this, but until then your best bet is to use anonymous CVS to grab the sources. Try this:

nsadmin:/web$ cvs -d:pserver:anonymous@openacs.org:/cvsroot login
 (Logging in to anonymous@openacs.org) CVS Password: [just hit RETURN]
 nsadmin:/web$ cvs -z3 -d:pserver:anonymous@openacs.org:/cvsroot checkout acs-core

Collapse
Posted by Don Baccus on
Oops - use "openacs-4" not "acs-core" in the above checkout command to get the whole thing.
Collapse
Posted by Jon Griffin on
Which would also explain why etp stopped working ;(
Collapse
Posted by Don Baccus on
Ohhhh...I was going to ask you about that because ETP was working fine for me when I installed it yesterday.

From CVS, not a nightly tarball.

I've got to keep my eyes on those things from now on.  The updates weren't updating reliably nor was the checkout checking out reliably.

Weird.

I changed it to zap the old openacs-4 directory, do an export (gets rid of the CVS dirs, too), then build the tarball from that.  At least this way if it decides not to pull new files we'll have an empty rather than misleading tarball!

Collapse
Posted by Jon Griffin on
I just did a fresh install and still have problems with etp.

This was a fresh CVS/DB etc.

Query did not return any rows.
    while executing
"db_1row get_current_page_attributes "" -column_array pa"
    ("uplevel" body line 37)
    invoked from within
"uplevel {
    	  ad_page_contract {
    @author Luke Pond (dlpond@museatech.net)
    @creation-date 2001-06-04

    Displays all options for editing a..."
    (procedure "code::tcl::/home/mayuli/web/dev/packages/edit-this-page/www/..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {


Collapse
Posted by Stefan Bludszus on
Hi Don,

thanks you. With the new CVS source the installation works. But I don`t understand that I am the first with this problem. Hopefully I can help with other problems 😉.

Regards
Stefan Bludszus

Collapse
Posted by Jamie Rasmussen on
I noticed this problem as well, but the source changed and the problem was eliminated so I never bothered reporting it.

The problem is explained in the document Using PostgreSQL's COPY function effectively. In short, the carriage returns used in Windows line endings cause COPY to do unexpected things, like failing with the record marker corrupted message.

Collapse
Posted by Don Baccus on
Stefan, no, I wasn't assuming you were the first with the problem.  I just knew that the COPY statement disappeared when I rewrote the code that manages tree sort keys, and that the your problem would disappear if you got the new code.