Home
The Toolkit for Online Communities
17228 Community Members, 1 member online, 1861 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : aolserver 3.3+ad13 on MacOS X: startup failure

Forum OpenACS Q&A: aolserver 3.3+ad13 on MacOS X: startup failure

Icon of envelope Request notifications

hello,

i'm still on my quest to get OACS running on my Macs...

thanks to the excellent instructions of markd [1] i got everything installed, but what's still keeping me from working with the installation is a failure of aolserver to start up.

the log file tells me:

nsthread(460) error: pthread_attr_setstacksize failed in NsThreadCreate: Invalid argument

does that sound familiar to anyone?

i really haven't done anything out of the ordinary. especially since the instructions for aolserver boil down to ./configure; make; make install;

i'm soo close now, i can just feel it ;-)

thanks for your input!

[1] http://borkware.com/rants/openacs/

Collapse
Posted by mark dalrymple on
It's really picky about the stack size.  Try making it an exact multiple of 4K.  If that doesn't work, try an exact multiple of 8K (so that it is an integral number of memory pages)
Collapse
Posted by Tom Lazar on
hi mark,

thanks for the hint: after commenting out the stacksize directive in my nsd.tcl it worked! (weird thing was, though, it had been set to 500000, which *is* divisable by four and eight...)

anyway, this whole thing is beginning to drive me outright crazy: now it's the postgres driver that's acting up!

if i include

  ns_param  postgres        ${bindir}/postgres.so  ;

in my nsd.tcl i get

[12/Apr/2003:00:17:51][788.-1610609172][-main-] Notice: modload: loading '/usr/local/aolserver/bin/postgres.so'
[12/Apr/2003:00:17:51][788.-1610609172][-main-] Fatal: modload: no such symbol '_ERR_get_error'

in my error log.

if i leave out the postgres-driver everything in the startup of aolserver goes fine, but then, of course, openacs won't run, since it can't access the db!

i'm running the 7.2.2 postgres binaries of marc liyanage, if that's any matter. macosx 10.2.4 / dec2002 devtools, etc. etc.

please help ;-)

t.

p.s. this is all *your* fault, of course *g*... it was your excellent article at macedition that brought me to openacs in the first place, so there you go ;-)

Collapse
Posted by Gabriel Ricard on
Jeeze, I just went through this a month or two ago and I'm trying to remember how I fixed that problem. Are you using the postgres driver that came with the all-in-one aolserver tarball? Or are you using the one from sourceforge?

I'm using the sourceforge postgres driver and it works fine on my powerbook. I believe I'm using postgresql 7.2.4 that I compiled myself though. Try using this driver:

http://prdownloads.sourceforge.net/aolserver/nspostgres-3.5.tar.gz?download

Collapse
Posted by Tom Lazar on
gabriel, this is getting weirder and weirder...

first i tried the sf version of the driver you mentioned, but nspostgres.so gave me the same trouble (i did change the reference in my nsd.tcl to nspostgres.so, and the log tells me that that's what it's loading, erm, *attempting* to load...)

then, out of a whim, i tried to compile the 7.2.4 sources of postgresql (for the fifth time) and what do you know? *all of a sudden* they compile! i have no idead what's happening here. perhaps my update to 10.2.5?

anyway, i still get the same error when  starting up openacs, so i switched back to postgres.so (the one included in marks tarball) but still nothing but

[12/Apr/2003:11:34:13][509.-1610609172][-main-] Notice: modload: loading '/usr/local/aolserver/bin/postgres.so'
[12/Apr/2003:11:34:13][509.-1610609172][-main-] Fatal: modload: no such symbol '_ERR_get_error'

perhaps some header files are not right? my head? i'm close to giving up...

Collapse
Posted by mark dalrymple on
(weird thing was, though, it had been set to 500000, which *is* divisable by four and eight...)

Not 4 and 8, but 4K and 8K. 500000 / (1024 * 4) is 122.07031, which isn't an even multiple :-) Try 499712 and see if that works (122 * 1024 * 4)

Collapse
Posted by Tom Lazar on
markd: thanks, got it... ;)
Collapse
Posted by Gabriel Ricard on
Ok, I think I figured it out. I hopped into /usr/lib and did the following shell command:

for c in `ls *dylib*`; do echo $c; nm $c | grep ERR_get_error; done

Looks like the ERR_get_error symbol is in libcrypto. Try adding '-lcrypto' to the MODLIBS line of nspostgres's Makefile and see if that helps.

Collapse
Posted by Tom Lazar on
hi gabriel,

thanks for the hint; i actually got it to work w/o the /usr/lib/ modifications you suggest: it turned out that i was mixing binaries between my two machines (dual ghz and 500 tibook).

when i repeated the whole procedure from scratch on my desktop machine, the db driver loaded fine.

of course, that still didn't mean that anything worked (bus error when accessing the site in the browser) but i eventually managed to get it to work by slimming down my startup .tcl to a bare minimum...

hint to markd: perhaps you'll want to post a slimmer version of your startup-file?

now i can run a local testbed version of my 'production site', yippi.

one thing remains, though (perhaps i did too much slimming down...) when trying to access the sitemap i get the following error, perhaps one of you knows what this means?

Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  Function 'tree_ancestor_keys(varbit)' does not exist
        Unable to identify a function that satisfies the given argument types
        You may need to add explicit typecasts

SQL:
            select s2.node_id,
                  s2.name,
                  s2.directory_p,
                  tree_level(s2.tree_sortkey) as level,
                  acs_object__name(s2.object_id) as obj_name,
                  acs_permission__permission_p(s2.object_id, '2121', 'admin') as admin_p
            from (select tree_ancestor_keys(site_node_get_tree_sortkey('2115')) as tree_sortkey) parents,
                site_nodes s2
            where s2.tree_sortkey = parents.tree_sortkey
            order by level

    while executing
"ns_pg_bind select nsdb0 {
            select s2.node_id,
                  s2.name,
                  s2.directory_p,
                  tree_level(..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec select $db $full_statement_name $sql"
    invoked from within
"set selection [db_exec select $db $full_statement_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
        set selection [db_exec select $db $full_statement_name $sql]

        set counter 0
        while { [db_getrow $db $selection] } {
            incr co..."
    (procedure "db_foreach" line 35)
    invoked from within
"db_foreach path_select {} {
  if {$node_id != $root_id && $admin_p == "t"} {
    doc_body_append "<a href=.?[export_url_vars expand:multiple root_id=$..."
    ("uplevel" body line 65)
    invoked from within
"uplevel {
          ad_page_contract {

    @author rhs@mit.edu
    @author bquinn@arsidigta.com
    @creation-date 2000-09-09
    @cvs-id $Id: index.tcl..."
    (procedure "code::tcl::/Volumes/Data/tomster/Projects/tomster.org/tomste..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
        $handler
      } ad_script_abort val {
        # do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
        rp_serve_abstract_file "$root/$path"
        set tcl_url2file([ad_conn url]) [ad_conn file]
        set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

once again, thanks for your support!

Collapse
Posted by Gabriel Ricard on
just out of curiosity, have you already gone through the install process for OpenACS's data model?
Collapse
Posted by Tom Lazar on
aah, openacs.org is up again ;)

good point, gabriel. see, what i was trying to do, was to transfer my live oacs installation (on a hosted linux box 'out there') onto my local machine for testing and playing. so i simply dumped the db and made a tgz of my web directory, copied it onto my machine and got the aforementioned result.

i've meanwhile resorted to a clean install of oacs (indluding the data-model init) and simply copied the modified .adp and .tcl files into the new location.

so now i have a fresh and working version of my homepage at home to play around with, alas! without the content. oh well ;)