Home
The Toolkit for Online Communities
17117 Community Members, 0 members online, 2013 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Error: nsd.db: no such default pool: main

Forum OpenACS Q&A: Error: nsd.db: no such default pool: main

Icon of envelope Request notifications

I've been slowly but surely plodding along. I read the server.log,
shut the server down, and then clear the log so I get clean, clear
readings each time.

Got it this far... tried to edit the nsd.tcl to include the pools
mentioned in the installation procedure (main, subquery, and log).
However, I don't think I've gotten them set up properly.

Is there some step I've missed for postgres for creating these pools?
Or is there a parameter I need to put into the nsd.tcl/ini to tell
AOL server where to find them and how they're configured?

Thanks for the help!

Chari

Collapse
Posted by Ben Adida on
You need to create three pools: main, subquery, and log. We'll put up a sample .ini file on the site very soon. In the meantime, read the ACS/pg installation docs which should mention everything that needs to be done.
Collapse
Posted by Roberto Mello on
I am not sure, but don't you have to use .ini file instead of a .tcl file because ACS uses AuxConfigDir ? I am using a .ini file and it works just fine.

With AS 2.3 it was easy to configure something when you did not know the exact syntax of a certain parameter because we had the setup server. I used the nsd.ini I had for AS 2.3 and did some slight changes to work with AS 3 and it worked fine.

Collapse
Posted by Chari Daignault on
Unfortunately, I can't seem to find *where* it explains how to create the three pools. It does mention as I'd said above, that they are required...

A few assumptions as to my level of experience might be made here, and as I've mentioned before, I really don't have any when it comes to postgres or ACS or AOL server. I'm learning bit by bit. If you could email a copy of a sample ini file, that would probably speed things along for me.

Again, thank you for any help!
Chari

Collapse
Posted by Roberto Mello on

I've put my nsd.ini available for you at my Linux Club page. I just upgraded our ACS/pg to the latest version last night and it went smoother than I thought (we were running the 2.4 alpha-alpha). I lost the news and calendar items because I didn't notice the datamodel for those tables changed, but I'll reinsert them later. Everything else is working great.

Notice that this is an .ini file for AOLserver 2.3.3, but it should mostly work for AOLserver 3b6.1. I used it at my home development server and it worked but your mileage may vary. The pools should be the same.

Let us know how it goes please.

Collapse
Posted by Roberto Mello on
Oops... forgot the <a href> tag does not get sent to emails, so thr URL is http://linux.usu.edu/nsd.txt

One more thing... each pool has authenticating stuff for postgres. I removed my password for obvious reasons, so make sure you have an user created for AOLserver to use on PostgreSQL.

Collapse
Posted by Don Baccus on
You'll need to make sure the Postgres Postmaster is running, first. This is the process that forks a Postgres backend when AOLserver (or any other application, including PSQL) initiates a backend connection. I've got my .ini file configured so idle connections never get released by AOLserver, so this forking happens only once per connection per lifetime of the server.

Here's the command I use to run Postmaster from my /etc/rc.d/init.d/postgresql script:

 su -l postgres -c '/usr/local/pgsql/bin/postmaster -B 1000 -o "-S 2000" -S -D/usr/local/pgsql/data"

Note that I've installed Postgres in the normal Postgres place rather than the RH RPM place, so I've had to make other modifications to the script (you can run it from the RH RPM place, of course, but since I update frequently from the Postgres source tree it is easier for me to do things their way).

Some explanations - "-B 1000" tells it to allocate 1000 blocks of shared memory (rather than the default 64, which is way puny). I've compiled my copy of postgres with a 16K blocksize, so this is 16MB of shared memory space, i.e. the most postgres will use without a kernel recompile. If you've compiled with the default 8K blocksize, "-B 2000" will work. You needn't do this for testing, but for an active system helps a lot.

The '-o "-S 2000" ' tells each backend to use up to 2 MB (2000 x 1KB) of RAM for sorting, etc before spilling to disk.

The other "-S" (to the postmaster itself, don't confuse with the above where -o is used to pass flags to forked backends) tells it to run "silently", in the background.

-D is used to pass the path to the database which you've hopefully already run initdb on, etc, if you've followed Roberto's excellent installation instructions.

After the postmaster is running, do an su --login to the account you intend to run the ACS from, and do a "psql". If you've followed Roberto's instructions you should end up with a prompt after a couple of messages indicating that it has successfully connected with the database. Once you're certain you can connect from the account via psql, you should have no problem connecting via AOLserver.

If you run the postmaster without -i, as above, you connect via localhost, like this:

[ns/db/pool/main]
Driver=postgres
Connections=4
MaxOpen=1000000000
MaxIdle=1000000000
User=donb
Verbose=On
LogSQLErrors=On
ExtendedTableInfo=On
DataSource=localhost::acs
(acs is the name of the database I run the acs in)

Note there's no port 5432 in the datasource.

Collapse
Posted by Chari Daignault on
Ok - thank you everyone! I've pretty much gotten it up and running! However, I am now having the same problem as the gentleman in the thread following this one. I'll post there to save space and time, and to close this thread!

Thanks!
Chari