Forum OpenACS Q&A: new-file-storage problem...

Collapse
Posted by David Kuczek on
I tried to get new-file-storage running side by side file-storage.

So I changed the database concerning differences between
file-storage.sql and new-file-storage.sql.

Then I copied new-file-storage-defs.tcl to my shared tcl library and
moved file-storage-defs.tcl.off.

I restarted the aolserver and went to /new-file-storage/ and it
worked. But as I wanted to upload a file at upload-new.tcl I got the
following error:

[03/May/2001:18:40:56]
    Error: Ns_PgOpenDb(postgres):  Could not connect to
localhost::arasis:  The Data Base System is in recovery mode

[03/May/2001:18:40:57]
    Error: dbinit: error(localhost::arasis,pqReadData() -- backend
closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
    ): 'select file_title as folder,
                                  fs_files_tree.file_id as new_parent,

lpad('x',fs_level_gen(fs_files_tree.file_id,1),'x') as spaces
        from  fs_files fs_files_tree
        where folder_p='t'
        and owner_id=5
            and public_p = 't'
            and group_id is null
        and deleted_p = 'f'
            order by fs_connect_by(file_id)'

[03/May/2001:18:40:57]
    Error: Database operation "select" failed (exception NSDB, "Query
was not a statement returning rows.")
    Database operation "select" failed (exception NSDB, "Query was not
a statement returning rows.")
        while executing
    "ns_db select $db $sql_query"
        invoked from within
    "set selection [ns_db select $db $sql_query]..."
        (procedure "fs_folder_def_selection" line 86)
        invoked from within
    "fs_folder_def_selection $db $user_id $group_id $public_p ""
$current_folder"
        invoked from within
    "set page_content "
    [ad_header $title]

    <h2>$title</h2>

    $navbar

    <hr>

    <form enctype=multipart/form-data method=POST action=upload-new-2>

    [export_for ..."
        (file "/web/server1/www/new-file-storage/upload-new.tcl" line
99)
        invoked from within
    "source $ad_conn(file)"
        invoked from within
    "if { $extension == ".tcl" } {
        # Tcl file - use source.
        source $ad_conn(file)
        } elseif { $extension == ".adp" } {
        # ADP file - parse and return  ..."
        (procedure "ad_handle_abstract_url" line 65)
        invoked from within
    "ad_handle_abstract_url cns14 {}"
    Notice: Querying 'select * from referer_log_glob_patterns;'
    NOTICE:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backend died
abnormally and possibly corrupted shared memory.
        I have rolled back the current transaction and am going to
terminate your database system connection and exit.
        Please reconnect to the database system and repeat your query.

[03/May/2001:18:40:57]
    Error: Ns_PgOpenDb(postgres):  Could not connect to
localhost::arasis:  The Data Base System is starting up

[03/May/2001:18:40:57]
    Error: dbinit: error(localhost::arasis,pqReadData() -- backend
closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
    ): 'select * from referer_log_glob_patterns'

[03/May/2001:18:40:57]
    Error: Filter ad_referer_filter returned error #1: Database
operation "select" failed (exception NSDB, "Query was not a statement
returning rows.")
    Notice: Querying 'select ad_group_member_p(5,
system_administrator_group_id()) from dual;'
    NOTICE:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backend died
abnormally and possibly corrupted shared memory.
        I have rolled back the current transaction and am going to
terminate your database system connection and exit.
        Please reconnect to the database system and repeat your query.

So I killed -INT postgres and restarted it. I restarted aolserver. And
my site was up and running.

I have two questions now:

1.) Why did postgres crash? How do I fix this so I can use
new-file-storage?

2.) when I wanted to access the database via su nsadmin and then psql
mydb a familiar error came up:

psql: error in loading shared libraries: libpq.so.2.1: cannot open
shared object file: No such file or directory

But postgres was running. I just couldn't open it in a shell...

Any suggestions?

Collapse
Posted by David Kuczek on
oooh forgot something.

so I shut down aolserver and postgres again, restarted my box started postgres, started aolserver....

And I could access postgres via shell "psql mydb" again.

Strange?!

Collapse
Posted by David Kuczek on
funny,

concerning my second question: I try to "psql mydb" in the same shell where I killed and restarted postgres --> error

I open up a new shell do "su nsadmin" type "psql mydb" --> it works fine and postgres opens in that shell...

😊

Collapse
Posted by David Kuczek on
Okay,

traped that bug... actually Mr. Ericsson (Dan) did it in September of 2000. On my own question - how embarrassing 😊

Check out this thread

I will put it into SDM...