Forum OpenACS Q&A: Error: return: failed to redirect '404': exceeded recursion limit of 3

Hi

I just installed OpenACS 4.5 according to the step by step instructions posted in OpenACS 4.5 documentation. I was able to run aolserver and see html pages before installing OACS. However, after loading OACS, I get the following message upon attempting to access the same URL I was previously able to view simple HTML on:

Error: return: failed to redirect '404': exceeded recursion limit of 3

I have searched the net and found only a few postings, referring to something about filters causing this. I am new to AOLServer (maybe coming over from Apache if it works!) and OACS. I heard OACS was a great framework and simple to get started on.

What am I missing? I would like to be able to test OACS to determine if it is something we can use for community site development. The documentation on installing thus far, however, has several oversites and bugs in it:(

PLEASE HELP!

thanks.

OACS is not distributing the global/ directory anymore.
Add your 404 and etc. pages there and it will stop that.
Thank you:)
That worked but now I get my new "not found" page instead of the expected (according to the documentation) "OpenACS Installation: Welcome" page. It's also disturbing that if I try to load the page via the url http://localhost/www/index.tcl I see tcl code and if I load the url http://localhost/index.adp, I see the content with lots of @some-variable@ tags in it. Shouldn't source code not be delivered to the browser via some means?!

thanks again:)

Seems like something in the configuration file is not set the way it should. Do you have set the parameter enabletclpages to On? Adp parser set to 'fancy'?

Something comparable to that:

ns_section "ns/server/${servername}"
...
ns_param  enabletclpages  On

ns_section "ns/server/${servername}/adp"
ns_param  map            "/*.adp"  ;# Extensions to parse as ADP's.
ns_param  DefaultParser  fancy

I don't know the installation instructions for 4.5 but I would guess there is an example configuration file for aolserver somewhere.

Collapse
Posted by tammy m on
Thanks. Added the enabletclpages to my config and set it to TRUE. The adp configuration params you sent were already set as such in my config.

Now the tcl page gives an error "The requested url cannot be accessed due to a system error on this server."

The adp page still shows html content and @some-variable@ tags.

My biggest worry is that I still get "page not found" when loading the default/root URL for OACS on my server. There is no "index.*" there. Should there be?! What am I  missing from the OACS 4.5 install doc, that says I should just be able to access my server root and see the OACS "welcome/install" page?

more thanks...

Collapse
Posted by Tilmann Singer on
To clarify: when everything is set up correctly no source code should be revealed. Check for example https://openacs.org/index.adp - it displays its custom not-found page.

Is the pageroot parameter set correctly? It should point to the www directory beneath the OpenACS root directory, e.g. /web/myservice/www, comparable to this:


ns_section "ns/server/${servername}"
...
ns_param   pageroot        /web/myservice/www

Also make sure you restart the server and inspect the error log for interesting messages during startup (e.g. load it in emacs and search backwards for the word 'ERROR') and when calling the page that returns the error. The location of your error log depends on the value of the ServerLog parameter in your config file.

Collapse
Posted by Tilmann Singer on
By the way, if you don't have a particular reason to use 4.5 then you might want to start right away with the highly recommended, very-soon-to-be-released version 4.6. Instructions how to check it out from CVS are here: https://openacs.org/4/checkout.
ARGH. Install another version, from scratch? I don't even have 4.5 working yet. Install 4.6. Hmmpphhhffff. Maybe if I get 4.5 working and like it!

So I had pageroot as /somepath/${servername} without /www on the end. I don't recall that in the instructions, maybe I missed it:(

So now I get a server error on accessing my root url.

In the error log I see:

[04/Dec/2002:16:55:29][2471.7176][-conn4-] Error: invalid command name "ad_page_contract"
invalid command name "ad_page_contract"
    while executing
"ad_page_contract {

    OpenACS main index page.  This is the standard page that is used to allow users
    to login to the site.  You can customize t..."
    (file "/www/nsroot/OrganicRomantic/www/index.tcl" line 1)
    invoked from within
"source $file"
    invoked from within
"ns_sourceproc cns0 {}"

More help please! Thanks:)
BTW, you guys sure are helpful and fast.

It doesn't seem that much effort to me - you don't need to reinstall aolserver or posgresql to start with 4.6 instead (if you are using the required versions), just checkout the oacs-4-6 to the place where you currently have unpacked the 4.5 tarball (backup before if you modified something there).

Anyway, your current error looks like a configuration issue again. Check the 'library' parameter:

ns_section "ns/server/${servername}/tcl"
ns_param library "/web/${servername}/tcl"

Did you look for an example nsd config file that is referenced from the OpenACS documentation? This stuff should be mentioned in there.

Ok.

You have convinced me. I will try 4.6. I don't have much to lose as you point out. The thought of downloading/installing one more thing just frustrated me at that point. When will 4.6 be released as the latest version anyway?

I am using the config file from the install docs. I had the tcl library param set. It pointed to the wrong place though.

It is working now except that the postgres library postgres.so cannot be loaded because libpq.so cannot be opened. It says libpq.so is not found but it is in /usr/local/pgsql/lib and has readable permissions.
I will work on this, hopefully, last bug tomorrow. Then I can play with functionality.

Is there a doc anywhere that summarizes the packages available with OACS and their functions/features?

thanks again for all the help:)

Hi Tammy,

libpq.so is not found error is likely caused by the fact your postgres is probably the tarball.  Since libpq.so is likely located on /usr/local/pgsql/lib which is not in the library path of your OS.

A solution to do this is add LD_LIBRARY_PATH to your env.  You can either use a shell script similar to this.

export LD_LIBRARY_PATH=/usr/local/pgsql/lib:PUT_YOUR_OTHER_PATHS_HERE

$NSD_HOME/bin/nsd -t yourconfig.tcl -u nsadmin

You can also do the above on your shell before making the shell script.  Similar stuff must be done for daemontools.

If you have done this its and its not working check out if /usr/local/pgsql/lib has the correct rights.  I have encountered this problem too when the dir was set to 750.  Eventhough root was the user I used to run it, it did not seem to find the lib.

Good luck and welcome to OpenACS.

Collapse
Posted by tammy m on
Hi + Thanks.

I had LD_LIBRARY_PATH set properly and was running a shell script to launch nsd this way.

I checked the permissions on /usr/local/pgsql/lib and they are 755.

I then added /usr/local/pgsql/lib to my /etc/ld.so.conf  and ran ldconfig. (I'm on RedHat 7.3 with kernel 2.4.19 + ac4 patch).

When I run "ldconfig -v | grep pg" I see all the other postgres libraries in /usr/local/pgsql/lib BUT the one I need, libpq.so!

Take a look:
<blockquote> ldconfig -v | grep pg
</blockquote>
/usr/local/pgsql/lib:
        libpgtcl.so.2 -> libpgtcl.so.2.2
        libpgeasy.so.2 -> libpgeasy.so.2.2
        libecpg.so.3 -> libecpg.so.3.3.0

What am I missing? I installed postgresql-7.2.3.tar.gz from the  postgres site.

Collapse
Posted by tammy m on
Hi

Thanks again to everyone who helped me.

I installed postgresql 7.3 (I had 7.2.3) and it now works! I am not sure what the problem was before.

One thing I did notice was that the postgres driver in /usr/local/aolserver/bin was owned by root.root with permissions 755. I don't know if this had anything to do with it. But on installing 7.3, it was owned by nsadmin. Who should own the darn thing?! And did this have anything to do with the problem or did 7.3 solve it in other, mysterious ways?!

I don't know but it is working!!

thanks again.

Hi Tammy,

I am unsure if PG 7.3 will work 100% with OpenACS see this thread

https://openacs.org/forums/message-view?message_id=64527

Also the owner of the pg driver should not cause the problem.  Atleast based from my experience, since sometimes I use root to compile and install the driver.  Anyway should you need to go back to 7.2.x maybe the pg driver was not compiled properly.

Hi

Thanks again:) I already ran into some of these. I actually started walking through errors and fixing them. The int4/bit casting, etc. Guess it makes more sense to use the version of postgres that is known to work with OACS... I have this horrible need to use the latest version of everything I install... so I can wait longer to upgrade in my mind;( There is flaw in that logic I know.
Thanks for reminding me the goal was to try out OACS! I am downgrading to postgres 7.2.x today:)

Hold of further work on OpenACS to make it PG 7.3 compatible.

  1. PG 7.3 has a bug that requires a patch to PG. As a result of this bug, complex queries such as the site-map query fail. Better to wait for PG 7.3.1.
  2. I've completed a set of patches to OpenACS that make it compatible to PG 7.3. These patches will soon be committed to the HEAD of the OpenACS CVS.

/Bart

Collapse
17: Re: libpq.so.2 not found (response to 14)
Posted by tammy m on
Well I re-installed postgres 7.2.3 from source and am back to the original problem of libpq.so.2 not being found when aolserver is started up.

If I remove 7.2.3 and re-install postgres 7.3, this problem goes away. But then as already discussed, postgres 7.3 does not work with OACS 4.5 yet.

SO what is causing this problem with 7.2.3? It is incredibly frustrating.

I installed nspostgres 3.5 today with POSTGRES=/path/to/pgsql and INST=/path/to/aolserver (install directories, not source directories. I assume this to be correct as nspostgres.so is installed in the correct place.) and ACS=1 all set.

When I run ldconfig with "-p" I see that libpq.so and libpq.so.2 are both in ldconfig cache.

Yet when I start aolserver, I see "libpq.so.2: cannot open shared object file: No such file or directory."

I'm on RedHat 7.3 with kernel 2.4.19 + ac4 patch installed.

Can someone please tell me why this is happening?!!!

thanks.

In your startup script for AOLserver you might try adding:

export LD_LIBRARY_PATH=/path/to/plsql/lib
Thanks. I had this in my aolserver startup script already. I have the required entry in ldconfig's config file and it's in the cache as well. It is certainly not obvious what the problem is here:(
Any other ideas for me?
Getting the billion little things all straightened out can be very frustrating.  If your goal is a working OACS, and you're willing to walk away from your partial work (and your committment to the newest release of everything), try http://aufrecht.org/openacs-4.5-quick-guide, the "Instant Gratification Install."  I wrote it because I was tired of running into problems like yours.  It should take you 2-3 hours to have a working OACS server.