Re: [AOLSERVER] simple db start-up problem

2001-12-12 Thread Darren Ferguson

Look in the nsd.log file for the server and make sure that the modules
have loaded correctly. This will give you the best indication if something
is wrong.

Darren

Darren Ferguson
Software Engineer
Openband

On Wed, 12 Dec 2001, Paul Warner wrote:

 Hello,

 I'm new to aolserver administration.   I adjusted some parameters in
 hrs.tcl (not related to the database as far as I know), restarted the
 server, and began to get these errors:

 command ns_db is not enabled

 I stopped the server, shut Postgres down, restarted it, then restarted
 the Aolserver.  But the error isn't going away.

 What do I do?

 Thanks,
 Paul Warner




Re: [AOLSERVER] simple db start-up problem

2001-12-12 Thread Scott Goodwin

I think the ns_db command will work if the database cannot be connected to.
At start time, nspostgres is loaded and reads it's section from the nsd.tcl
file. If there is an error in that section (typo, not configured properly
etc.) then nspostgres fails to load and ns_db is disabled. Paul has an
error in his nsd.tcl file.

nspostgres does not to my knowledge try to connect to the database until
the first sql statement you issue, so it'll start up properly even if your
database isn't around.

/s.


 On Wednesday, December 12, 2001, at 01:16 PM, Scott Goodwin wrote:
  Take a close look at your server log where the db stuff is initialized
and
  nspostgres is loaded. ns_db is disabled if nspostgres can't connect to
the
  database. You should have some info there. You may need to turn on
debug.
 I haven't yet had the opportunity to work with the nspostgres driver.  Is
 it true that it will leave ns_db disabled if it can't connect to the DB at
 startup?  I'd like to suggest that behavior is a little drastic; I'd think
 that faulty database connectivity might be recoverable (maybe the DB
 server is temporarily down), and disabling ns_db prevents the AOLserver
 from recovering without being restarted.  Personally, I'd prefer to do
 catches around my ns_db open calls, and give reasonable failure messages
 until the connection succeeds.  Then when the DB server comes back up,
 stuff should just start working again.  I know the Sybase driver works
 this way -- as long as the libraries get loaded, the module is OK, and
 ns_db should be available; if the DB is down, that's a separate issue.





Re: [AOLSERVER] simple db start-up problem

2001-12-12 Thread prince nwobi

=
prince [EMAIL PROTECTED]@[EMAIL PROTECTED]:234 
82 222418   :234 82 441544

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com



Re: [AOLSERVER] simple db start-up problem

2001-12-12 Thread Peter M. Jansson

On Wednesday, December 12, 2001, at 01:38 PM, Scott Goodwin wrote:
 nspostgres does not to my knowledge try to connect to the database until
 the first sql statement you issue, so it'll start up properly even if your
 database isn't around.
Makes sense.  Thanks.



[AOLSERVER] Reminder: AOLserver weekly chat tomorrow

2001-12-12 Thread mayoff

The AOLserver weekly chat takes place tomorrow, 2001-12-13, and
every Thursday. Common topics include AOLserver, Tcl, SQL, ACS,
and general web-related questions.

The place: AIM chatroom AOLserver on exchange 4
The time: 20:00 UTC

During the summer, that time is
4 PM US/Eastern
3 PM US/Central
2 PM US/Mountain
1 PM US/Pacific

During the winter, that time is
3 PM US/Eastern
2 PM US/Central
1 PM US/Mountain
Noon US/Pacific

The URL for the chat room:

aim:GoChat?RoomName=AOLserver

Note: you do NOT need to be an AOL subscriber to access the chat room.

If you need more help getting on AIM or getting into the chat room,
please see http://dqd.com/~mayoff/aolserver/weekly-chat.html.

--
end of message



Re: [AOLSERVER] simple db start-up problem

2001-12-12 Thread Paul Warner

Scott,

Thanks for your help.  One of my coworkers took a look and noticed that I
hadn't sourced the right files before starting the server (and therefore
hadn't set LD_LIBRARY_PATH).  Setting that variable fixed it.   Sorry for the
trouble.

Thanks,
Paul

Scott Goodwin wrote:

 Your nsd.tcl file looks fine.

 I was able to duplicate the problem:

 [12/Dec/2001:13:47:55][30217.1024][-main-] Error: dbdrv: failed to load
 driver 'nspostgres'
 [12/Dec/2001:13:47:55][30217.1024][-main-] Error: dbinit: no such default
 pool 'main'

 This happens when the server literally cannot find nspostgres.so. Check
 your aolserver bin directory; make sure permissions are correct (it should
 be owned by the user and group the server runs as. Also, check the name of
 the module. You should have 'postgres.so'; I'm now maintaining the postgres
 module in AOLserver's sourceforge area and it's now called 'nspostgres.so',
 so ensure you have it in the right place with the name that matches in your
 nsd.tcl file.

 /s.

  Scott,
 
  My nsd file looks different than yours.  It has been untouched since
  October 23, and when I diffed it with its backup (which is working on
  another of our machines) - it's the same, except for hostname and ip.
  I'm reluctant to make wholesale changes, because we want to use this
  machine for a demo tomorrow. Take a look if you have time and let me
  know what you think.  Thanks again for your help.
 
  ns_section ns/db/drivers
  ns_param   postgres  ${bindir}/postgres.so
 
  ns_section ns/db/driver/driver/postgres
  ns_param   datestyle  iso
 
  ns_section ns/db/pool/main
  ns_param   Driver postgres
  ns_param   Connections4
  ns_param   MaxOpen10
  ns_param   MaxIdle10
  ns_param   DataSource localhost::HRS
  ns_param   User   user
  ns_param   Password   password
  ns_param   VerboseOn
  ns_param   LogSQLErrors   On
  ns_param   ExtendedTableInfo  On
 
  ns_section ns/db/pool/subquery
  ns_param   Driver postgres
  ns_param   Connections4
  ns_param   MaxOpen10
  ns_param   MaxIdle10
  ns_param   DataSource localhost::HRS
  ns_param   User   user
  ns_param   Password   password
  ns_param   VerboseOn
  ns_param   LogSQLErrors   On
  ns_param   ExtendedTableInfo  On
 
  ns_section ns/db/pool/log
  ns_param   Driver postgres
  ns_param   Connections4
  ns_param   MaxOpen10
  ns_param   MaxIdle10
  ns_param   DataSource localhost::HRS
  ns_param   User   user
  ns_param   Password   password
  ns_param   VerboseOn
  ns_param   LogSQLErrors   On
  ns_param   ExtendedTableInfo  On
 
  ns_section ns/db/pools
  ns_param   main   main
  ns_param   subquery subquery
  ns_param   log   log
 
  ns_section ns/server/hrs/db
  ns_param   Pools  *
  ns_param   DefaultPoolmain
 
 
  Thanks,
  Paul