Forum OpenACS Q&A: aolserver startup freezes

Collapse
Posted by Mitchel Humpherys on
So this is my first time trying to install openacs and I'M SO CLOSE!!! I've gotten to the point where I need to startup aolserver. When I run the 'run' script it just freezes. Here's my output:

root@galgle:/home/mgalgs# /var/lib/aolserver/textmeagain/etc/daemontools/run
[22/Dec/2007:12:06:33][4336.3083814592][-main-] Notice: nsd.tcl: starting to read config file...
[22/Dec/2007:12:06:33][4336.3083814592][-main-] Notice: nsd.tcl: using threadsafe tcl: 1
[22/Dec/2007:12:06:33][4336.3083814592][-main-] Notice: nsd.tcl: finished reading config file.
[22/Dec/2007:12:06:33][4336.3083814592][-main-] Notice: encoding: loaded: utf-8

I thought that the problem might just be because in the installation instructions we were doing stuff in /var/lib/aolserver40r10/ but I tried modifying the /var/lib/aolserver40r10/$OPENACS_SERVICE_NAME/etc/config.tcl file (just as I had done before, only in the aolserver directory) and it does the same thing.

Sorry I'm kind of a newbie at this stuff. I do web application development with openacs at work but I've never actually installed it and I'm finding that they are two totally different worlds!
Thanks in advance for any help!

Collapse
Posted by David Arroyo Menéndez on
May you show us the aolserver log?
Collapse
Posted by Mitchel Humpherys on
Here's the error.log (I've included what I figure are the most important parts, just let me know if that was a dumb idea :) The rest of it is just like "Notice: loading whatever")

[22/Dec/2007:22:29:11][6166.3083835072][-main-] Notice: Database API: The following pools are available for OpenACS: pool2 pool3 pool1
[22/Dec/2007:22:29:11][6166.3083835072][-main-] Notice: dbdrv: opening database 'postgres:localhost:5432:textmeagain'
[22/Dec/2007:22:29:11][6166.3083835072][-main-] Notice: Opening textmeagain on localhost
[22/Dec/2007:22:29:11][6166.3083835072][-main-] Error: Ns_PgOpenDb(postgres): Could not connect to localhost:5432:textmeagain: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

[22/Dec/2007:22:29:11][6166.3083835072][-main-] Error: dbdrv: failed to open database 'postgres:localhost:5432:textmeagain'
[22/Dec/2007:22:29:11][6166.3083835072][-main-] Warning: Database API: couldn't allocate a handle from database pool "pool2".
[22/Dec/2007:22:29:11][6166.3083835072][-main-] Error: Database API: RDBMS type could not be determined for any pool.
[22/Dec/2007:22:29:11][6166.3083835072][-main-] Notice: Bootstrap: Loading acs-tcl
[22/Dec/2007:22:29:12][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/00-database-procs.tcl
[22/Dec/2007:22:29:12]

...a bunch of stuff...

-node-object-map-procs.tcl
[22/Dec/2007:22:29:12][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/site-nodes-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/sql-statement-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/stack-trace-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/table-display-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/tcl-documentation-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/tdom-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/text-html-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/user-extensions-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/utilities-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/whos-online-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/widgets-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/xml-0-sgml-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/xml-1-dom-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Loading acs-tcl/tcl/xml-2-procs.tcl
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Error: Bootstrap:

The following database pools generated errors:

  • OpenACS could not allocate a handle from database pool "pool2".

Possible causes might include:

  • The database is not running.
  • The database driver has not been correctly installed.
  • The datasource or database user/password are incorrect.
  • You didn't define any database pools.

[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Bootstrap: database problem found; Sourcing the installer.
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Sourcing files for postload...
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Done.
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: Executing initialization code blocks...
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: nsmain: AOLserver/4.0.10 running
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: nsmain: security info: uid=1001, euid=1001, gid=1001, egid=1001
[22/Dec/2007:22:29:13][6166.3075029936][-sched-] Notice: sched: starting
[22/Dec/2007:22:29:13][6166.3083835072][-main-] Notice: nssock: listening on 127.0.0.1:80
[22/Dec/2007:22:29:13][6166.3063626672][-driver-] Notice: starting
[22/Dec/2007:22:29:13][6166.3063626672][-driver-] Notice: driver: accepting connections

Collapse
Posted by Don Baccus on
Well, is Postgres running? Can you log in as the user running AOLserver and connect by typing "psql textmeagain", using no command-line options? "No", is my guess, in which case you need to start the postmaster, making sure it's configured to accept connections on the default port and that the database textmeagain exists.

Once you can connect to the database using the psql command, AOLserver should be able to connect without a problem.

You can look to see if postmaster (the master process for postgres) is running using ps, also.

Collapse
Posted by Tom Jackson on
You also need to connect using the same environment and user.group as your AOLserver process. But it looks like your database is not running.

$ ps axww|grep post
12560 ? S 0:00 multilog t /var/log/postgres
32654 ? S 0:00 postmaster -D /usr/local/pgsql/data
32656 ? S 0:16 postgres: writer process
32657 ? S 0:00 postgres: stats buffer process
32658 ? S 0:00 postgres: stats collector process

You should probably have all of these except maybe not the first.

Collapse
Posted by Mitchel Humpherys on
Well postgres is running (I think) because I can do
su - textmeagain
psql textmeagain
to get into the postgres interactive terminal and it all works just fine, all the database operations work perfectly, but when I do ps axwww|grep post like you said Tom, I don't have that first one. Here's what I get:

mgalgs@galgle:~$ ps axwww|grep post
3943 ? S 0:00 /usr/lib/postgresql/8.1/bin/postmaster -D /var/lib/postgresql/8.1/main -c unix_socket_directory=/var/run/postgresql -c config_file=/etc/postgresql/8.1/main/postgresql.conf -c hba_file=/etc/postgresql/8.1/main/pg_hba.conf -c ident_file=/etc/postgresql/8.1/main/pg_ident.conf
3946 ? S 0:00 postgres: writer process
3947 ? S 0:00 postgres: stats buffer process
3948 ? S 0:00 postgres: stats collector process

Collapse
Posted by Don Baccus on
Yes, then, the database isn't running, but you don't have your environment set up correctly in the account you're running AOLserver from.

Log into *that* account, and try psql, and it will fail, I'm sure.

You need to set some environment variables before it will work. You can do something like printenv from the textmeagain linux account and look for the PG* environment variables to get some idea as to what needs to be set (export PG*=value) in the aolserver environment for the PG connection to work.

Good luck! It sounds like you're close.