Forum OpenACS Q&A: Error: nsd.tcl: invalid set id:""

Collapse
Posted by Grant Schofield on
I'm presently stuck on the following error on 2 machines in trying to get the acspg up and running. AOLServer won't start up but gives the following message in the logs...

[18/Apr/2000:08:28:37][4139.1024][-main-] Error: nsd.tcl: 
invalid set id: ""
    while executing
"ns_set size $all_the_redirects"
    invoked from within
"if !$ad_redirects_installed_p {
    # we haven't done this already
    set ad_redirects_installed_p 1

    # we could use ad_parameter_section (define..."
    (file "/web/pacs/tcl/ad-redirect.tcl" line 12)
[18/Apr/2000:08:28:37][4139.1024][-main-] Notice: nsd


Any ideas?

Grant
Collapse
Posted by Daniel Wickstrom on
You're getting an empty string back from this section of code:

set server_name [ns_info server]
append config_path "ns/server/" $server_name "/acs/redirect"
set all_the_redirects [ns_configsection $config_path]
ns_log Notice "/tcl/ad-redirect.tcl has found [ns_set size $all_the_redirects] redirects specified in $config_path"

Which indicates that your server name is not set correctly. Did you
rename and configure service-name.ini and ad.ini?

Collapse
Posted by Grant Schofield on
Daniel..

The service is unoriginally called 'pacs', the ini file is 'pacs.tcl', and the ini file in /web/pacs/parameters is called 'pacs.ini'.

When I telnet localhost 9999 and log in as nsadmin, I type in 'ns_info server' and 'pacs' is returned. 

Could it be the order of the .ini/.tcl files? I am modifying one I borrowed from a working Oracle based system.

grant
Collapse
Posted by Daniel Wickstrom on
Telnet to 9999 and type ns_configsection "ns/server/pacs/acs/redirect". What do you get back?
Collapse
Posted by Grant Schofield on
Nada... not a thing.
Collapse
Posted by Daniel Wickstrom on
How are you starting aolserver. Try bin/nsd -fkc path_to_your_ini_file/pacs.ini

Make sure that auxconfigdir is defined to point to /web/pacs/parameters and that /web/pacs/parameters/pacs.tcl has a section as follows:

ns_section "ns/server/${server}/acs/redirect"
ns_param Pattern "/pvt/address-book|/address-book"

Collapse
Posted by Daniel Wickstrom on
I just converted my .ini files to .tcl and tried it with nsd -fkt ... and I get the same error.  Does anybodly else know if it works to use mixed .tcl and .ini files.  I think I saw something about this a while back, but I can't remeber where.  Up to now, I've always used the .ini files for configuration.
Collapse
Posted by Grant Schofield on
The output from the /bin/nsd -fck /$pacs.tcl command is

Fatal: no server specified: give -s switch or have ns/servers
section in config file
I have subsequently gone through my config file line by line entry by entry and it exactly matches the examples in the documentation. How does that figure?

Regarding /pacs/parameters/pacs.ini, all the lines you mentioned are present. The only difference is that the values are written
Pattern=/pvt/address-book/etc.....
I know the answer has got to be really simple, but I just can't figure out what's going on. Perhaps its time for a re-install from scratch...
Collapse
Posted by Grant Schofield on
Voila!!!!!

Thanks Daniel - a simple translation of pacs.tcl into pacs.ini achieved the desired effect. I now have a running acs/pg system ready for acceptance tests. Most interesting.... wonder whats the problem with the .tcl format?

Thanks

grant
Collapse
Posted by Ben Adida on
One quick point: let's try to move everything to all Tcl. I have a parameter file check in for that (ad.tcl), and it allows much better abstraction of the ACS root location and other such things. So, we'll keep supporting .ini for a little while, but if you can try the all-Tcl approach, that would be really great.
Collapse
Posted by Don Baccus on
I've spent the morning having fun with the machine that's doomed to be  my production server (dual P450, 256MB RAM, SCSI disks RAID 1, blah blah, fun stuff).

Since Ben mentions the ad.tcl file, I thought I'd point out that I've managed to get AOLserver 3 and the latest ACS 3.2 source up and running using ad.tcl and nsd.tcl.  Not a .ini file in sight!

I'm also running the latest Postgres snapshot, which is very close to what will be released.  So far, works fine.

Collapse
Posted by Grant Schofield on
Don, what OS are you using?

I am using SuSE Linux 6.3 and 6.4 respectively on different machines. I cannot for the life of me get either of them to recognise a .tcl initialisation file for ACS/pg.

AolServer works great using the standard nsd.tcl initialisation file - it loads the postgres driver and everything works. When I install the ACS/pg, and use the recommended .tcl file in /home/nsadmin, it all goes to hell on me.

The /parameters/$server.tcl file that comes with the latest release works fine.

Collapse
Posted by Don Baccus on
I'm running RH 6.1.  I hacked together my own .tcl file from nsd.tcl.

What errors are you getting?  You must be very close if you can get the nsd.tcl file working and set up db pools, etc.

Collapse
Posted by Grant Schofield on
On one machine I am pretty sure that the problem is that the 'auxconfigdir=/web/pacs/parameters' is not being recognised. I'm sure it's something dead simple...

Seeing two of the machines are in different places, I need to go and check whether this is also the problem with the other machine, i.e. when I use a customised nsd.tcl file, does it find /web/${server)/parameters...

Collapse
Posted by Grant Schofield on
Sorted Don. I can now join you in a fully working system using all nsd.tcl/ad.tcl.