Forum OpenACS Q&A: Starting the ACS

Collapse
Posted by Chari Daignault on
Not to sound like too much of a dummy...
I'm attempting to install this on an Intranet. So, unfortunately, no
one can take a look. At this point, I've gotten the AOLServer up and
running, and have stopped it, The newly compiled postgres.so is in
place in the AOLServer's bin directory. I've gotten all of the .ini
and .tcl files written correctly (I hope). My problem appears to be
that the AOLServer is ignoring the auxconfigdir parameter, and is not
starting up the ACS.
Help! Please keep in mind that I'm just a hacker with this, and have
little to no experience with pgsql and virtual servers. Also -- I'm
running an apache server on the same machine (at port 80) so the
AOLServer is running on port 8000. They don't appear to be stepping
on each other.
Any ideas? What else do you need me to provide?
Thanks,
Chari
Collapse
Posted by Roberto Mello on
What version of AOLserver are you running ?

If you are running AS 3, make sure to use the .ini file and to start the servers with nsd -c /path/to/nsd.ini and that you have AuxConfigDir=/path/to/your/ad.ini in your nsd.ini.

Collapse
Posted by Don Baccus on
What leads you to believe that the auxconfigdir's being ignored?

What happens when you hit port 8000 at the IP you've specified as page root?  Can you get AOLserver to return a static page from the directory?

If so, what happens when you hit index.tcl in that directory?  Does the login window come up?  Are you getting errors in server.log?

There are a bunch of possible failure points when you're setting stuff up, thus all the questions.  You may well have diagnosed the problem correctly, but it doesn't hurt to ask given that you're new with the whole suite of software.

Collapse
Posted by Chari Daignault on
I'm running the latest 3.x version of AOLserver.

The main reason I knew it was ignoring the auxconfigdir was due to the fact that AOL server's main startup page was showing at :8000, and not the ACS pages.

I've since gotten it to run, and have pointed it to the correct TCL libraries in the ACS. However, no TCL scripts or pages will load or run correctly. They come up as text. ADP and HTML pages come up correctly.

BTW, instead of using the nsd.ini file with AOL server, I took the nsd.tcl file and used the translate utility to create a .ini file with it, added the necessary parameters, etc. , and then ran the other translate utility to recreate a nsd.tcl file. Maybe that's what is keeping it from working?

Thanks for the quick responses!
Chari

Collapse
Posted by Ben Adida on
You need to use the .ini format for running the ACS because the auxconfigdir parameter doesn't get read by the .tcl format.

Make sure you have the latest version of AOLserver 3.0beta (currently beta 6.1) and your Tcl files should execute correctly.

Collapse
Posted by Justin A on
On the tcl pages:
you need to add
ns_param enabletclpages on

The only reason i figured this out was by looking at
file.tcl in modules/

Other than that im in the same boat as you.  Would you
mind sending me your nsd.tcl that you used to get it at
least that far?
Justin
mailto:hax0r@ductape.net

Collapse
Posted by Clif Flynt on
I'm in roughly the same boat as Chari. My solution to the auxconfigdir problem was adding this code to the nsd.tcl file:

set auxconfigdir /web/noucorp/parameters

foreach f  [glob $auxconfigdir/*.tcl] {
    source $f
}
Nothing is working yet, but I'm actually beginning to feel like I'm making some headway. Thanks for the 'ns_param enabletclpages on' tidbit. It would have taken me weeks to find that.
Collapse
Posted by Roberto Mello on
If you are running ANY AOLserver version prior to Release Candidate 1 (in the 3 series of course), the AuxConfigDir parameter simply didn't exist for nsd.tcl file. That's why you needed a .ini instead of a .tcl file. And you had to start the server with something like ./nsd -c ../nsd.ini

What I always do to make sure my ACS stuff is being loaded is start the server in the foreground, so I see all messages passing by my eyes: ./nsd -fc ../nsd.ini

In Release Candidate 1, ns_para auxconfigdir was added, thanks to Markd at ArsDigita, so now it should work. I haven't tested though. I keep using nsd.ini.

Collapse
Posted by Angel Hernandez on
Ok, for the latest version of AOLserver (3.0rc1), here's what you need to do:

In your nsd.tcl file make sure your pageroot is set to where the ACS web files are. My setting looks like this...

set pageroot               /web/angels_web/www
Then as far as auxconfigdir parameters, make sure the variable server is set. Again here's my setting...

set server                 "angels_web"

Make sure to replace the names I used with whatever your server name is 😊 You have to set this variable because it's used later. Under ns_section "ns/parameters add the following...
ns_param   auxconfigdir     "/web/${server}/parameters"

My whole ns/parameters section looks like this...

ns_section "ns/parameters"
ns_param   home             $home
ns_param   auxconfigdir     "/web/${server}/parameters"

There's many other options, but those are the only two in the ns/parameters section that you need to get started. Then in your parameter directory, just make sure that your .ini file has the same name as your service name. So if your service name is "free_love" then your .ini file should be "free_love.ini"

If anyone would like to see my working nsd.tcl file, feel free to take a look.

Hope this helps.

Collapse
Posted by Angel Hernandez on
To expand on what Roberto was saying, here's a few AOLserver 3rc1 commands. Most are in the AOLserver documentation, but they've also left out a few things (like how to turn on Tcl pages).

The following commands assume that you're in the AOLserver directory.

  • Start the server in the foreground

    ./bin/nsd8x -ft ./nsd.tcl

    Hit control-c to kill the server after starting in foreground.

  • Start the server in background

    ./bin/nsd8x -t ./nsd.tcl

  • Stop the server

    ./bin/nsd8x -Kt ./nsd.tcl

    Then to enable Tcl pages, and prevent them from being served as text, under ns_section "ns/server/${server}" add...

    ns_param   enabletclpages  on

    Lastly, AOLserver 3rc1, will not run as root. So to get the server running on port 80, you need to specify a user when starting. Just add argument -u nsadmin (or whatever user) to the normal start command. You end up with...

    ./bin/nsd8x -t ./nsd.tcl -u nsadmin

    That should do it...hopefully this will make getting started a little easier.

  • Collapse
    Posted by Smooth Operator2 on
    I have not installed ACS because I am waiting for the security update, but I went and ahead and installed AOL server (first "make"; then "make install" as root), and did not see any error messages.  I am currently running apache, so after that was done, I typed the following command, as given in the documentation:

    set host t2mn.com
    set httpport 80

    No error messages.  In /aolserver/aolserver3_0/ I typed the following:

    nsd -t nsd.tcl -u mynonrootusername

    and got the following:

    bash: nsd: command not found

    so I tried:

    ./nsd -t nsd.tcl -u nguarner

    and got the following:

    bash: ./nsd: is a directory

    I then typed the following:

    ./bin/nsd8x -ft ./nsd.tcl

    and got the following:

    bash: ./bin/nsd8x: No such file or directory

    O.K. now I feel like a retard.  The documentation that came in the installation archive talks about "extensive online documentation" at the AOLServer site but I could not find anything, just kinda went around in circles.

    How do I:

    1. get it running in place of Apache
    2. test to make sure that it is AOLServer running my pages and not Apache
    3. test to make sure it is working O.K.
    4. make it to where AOLServer permanently caches my little web site (estimated 30 to 50 megabytes for pages, thumbnails, and medium-sized pictures) within the 256 megabytes of RAM that no one is using.

    I know you people are very busy but any help for this newbie would be greatly appreciated.

    Collapse
    Posted by Smooth Operator2 on
    I found the AOLServer 3.0 release notes... I'm going to see what I can do on my own.