Forum OpenACS Q&A: Re: aolserver startup freezes

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.