Forum OpenACS Q&A: package load and restart problems

Collapse
Posted by John Buol on
I tried adding new packages to my oACS 4.5 site.  However, when I get to the final package installation stage (packages-install-4.tcl) the install pukes, giving this error:

Installing packages...

Installing data model ...
Loading data model
HTTP/1.0 200 OK
Server: AOLserver/3.3.1+ad13
Content-Type: text/html; charset=iso-8859-1
MIME-Version: 1.0
Content-Length: 3249
Connection: close

Request Error

    couldn't execute "psql": permission denied
    while executing
"open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" "r""
    (procedure "db_source_sql_file" line 38)
  ...

I checked the oACS bboard and found a thread, "static-pages doesn't load data model" at https://openacs.org/forums/message-view?message_id=54392 discussing this very problem.

The recommendation was to check that the PATH is correct, or change db_get_pgbin, or add a parameter setting to the database driver configuration:  ns_param pgbin /path/to/your/new/psql so it returns the explicit path to the psql executable.

I confirmed the $PATHs in /usr/local/aolserver/bin/nsd-postgres was correct so I edited my config.tcl script (huntershooter.tcl)

After making the change I executed the restart-aolserver script at /web/{server}/bin to restart the server.

Then I attempted to restart aolserver:

$ /usr/local/aolserver/bin/nsd -i -t /usr/local/aolserver/huntershooter.tcl

[01/Mar/2003:01:45:06][26364.1024][-main-] Notice: nsd.tcl: starting to read config file...
[01/Mar/2003:01:45:06][26364.1024][-main-] Notice: nsd.tcl: finished reading config file.

$

But aolserver refuses to start.  I double checked my syntax with the AOLserver Command Line doc, at {doc-dir}/tech-ch1.htm#21012

Any suggestions?  Thanks!

John

Collapse
Posted by Don Baccus on
There should be errors logged in your server log file, could you dig them out and post here?
Collapse
Posted by John Buol on
I tried it again today and went through my AOLserver log, double checking settings (and referencing the docs to obtain a clue) from my Tcl configuration file.  I didn't think you wanted the *entire* log so here goes...

The log notes various ns{modules} loading successfully.  The only error prior to any oACS bootstrapping is:

[04/Mar/2003:10:05:13][21578.1024][-main-] Notice: nsopenssl: CA certificate file does not exist
[04/Mar/2003:10:05:13][21578.1024][-main-] Notice: nsopenssl: CA certificate directory does not exist

There are several of these, but I have not yet purchased or installed a certificate, so that should be right.

From there, AOLserver contacts PG and starts loading oACS packages, mapping, etc., all successfully.

The last part of the server log is the only thing that (to me) indicates an error.

[04/Mar/2003:10:05:26][21578.1024][-main-] Warning: keepalive: insufficient maxkeepalive 0: keepalive disabled
[04/Mar/2003:10:05:26][21578.1024][-main-] Notice: nsmain: AOLserver/3.3.1+ad13 running
[04/Mar/2003:10:05:26][21578.1024][-main-] Notice: nsmain: security info: uid=501, euid=501, gid=501, egid=501
[04/Mar/2003:10:05:26][21578.2051][-sched-] Notice: sched: starting
[04/Mar/2003:10:05:26][21578.1024][-main-] Notice: serv: waiting for warmup
[04/Mar/2003:10:05:27][21578.1024][-main-] Notice: serv: warmed up
[04/Mar/2003:10:05:27][21578.1024][-main-] Notice: socks: idle
[04/Mar/2003:10:05:27][21578.1024][-main-] Notice: sched: idle
[04/Mar/2003:10:05:27][21578.1024][-main-] Fatal: nsopenssl: could not listen on 207.142.4.134:443: Permission denied

Thanks for helping me,
John

Collapse
Posted by Tilmann Singer on
Are you sure you are starting aolserver as root?
Collapse
Posted by John Buol on
<blockquote>> Are you sure you are starting aolserver as root?
</blockquote>

And now that I got the server to run again, I tried my new config tcl file

I added an explicit path to psql in the Database drivers section (ns_section "ns/db/drivers")

ns_param pgbin  /usr/local/pgsql/bin/psql

But still get the same error when I try to add a package.  Is there some path/configuration/whatever I'm missing that makes the psql executable unreachable?

Thanks again,
John

Collapse
Posted by Tilmann Singer on
So you didn't start it as root before but now you do and that solved part of your problem or what? I have troubles figuring out what's going on according to your description.

Anyway, assuming that this is the case maybe the user that the process switches to after binding to port 80 simply doesn't have the rights to execute psql? What user do you specify in the -u option when starting nsd, and did you try to su to this user and execute /usr/local/pgsql/bin/psql from the shell as this user?

Collapse
Posted by John Buol on
<blockquote>> So you didn't start it as root before but now you do and that solved part of your problem...?
</blockquote>

Yes, sorry for not being clear.

<blockquote>> What user do you specify in the -u option when starting nsd,
</blockquote>

-u nsadmin

<blockquote>> and did you try to su to this user and execute /usr/local/pgsql/bin/psql from the shell as this
</blockquote>
user?

Yes.  nsadmin belongs to the web group.  The psql binary is owned by the postgres user and the web group.  When logged in as nsadmin I can run psql and use the PostgreSQL interactive terminal and access the very database oACS is using.

The permission was set at 755.  As an experiment, even though the error reads 'couldn't execute "psql"', I changed the permission from 755 to 775 to give the group full rights.  This didn't help either.

Thanks again for helping,
John