Forum OpenACS Q&A: Installation on mac OSX10.2

Collapse
Posted by Dis Continued on
Hi, Trying to install OpenACS on my ibook but I'm getting the following error
message when starting up...

17/Sep/2002:15:57:28][708.-1610609172][-main-] Notice: nsd.tcl: starting to
read config file...
[17/Sep/2002:15:57:28][708.-1610609172][-main-] Fatal: config: script error:
invalid command name "/www/webmail/java"
    while executing
"/www/webmail/java "

Can anyone help this newbie please......?

Thanks

Collapse
Posted by Jeff Davis on
You probably have a typo in your .tcl config file.
post the bit a few lines around /www/webmail/java and
we can tell you what's wrong.
Collapse
Posted by Dis Continued on
Thanks Jeff - is this it?

ns_section ns/server/${server}/module/nsjava
    ns_param  EnableJava        on  ;# Set to on to enable nsjava.
    ns_param  VerboseJvm        off  ;# Same as command line -debug.
    ns_param  LogLevel          Notice
    ns_param  DestroyJvm        off  ;# Destroy jvm on shutdown.
    ns_param  DisableJITCompiler off
    ns_param  ClassPath          /usr/local/jdk/jdk118_v1/lib/classes.zip:/usr/
local/aolserver/bin/nsjava.jar:/home/nsadmin/mirror/$

/www/webmail/java

Collapse
Posted by Jeff Davis on
It looks like you classpath is spread across multiple lines.  It should either be on one line or be on multiple lines continued by  (a single backslash, in case bboard eats them)
In either case you should have no spaces.
Collapse
Posted by Dis Continued on
Thank you very much - it works! Aha, aha .....
Collapse
Posted by Walter McGinnis on
Michael,

Good to hear that OpenACS is working on OSX10.2.  I'm curious what installation instructions you followed.  Did you use Russell's binaries or something else?  A rundown on what you did posted here and as a comment to https://openacs.org/new-file-storage/one-file?file_id=217&group_id=&owner_id=&source= would be great.

I hear that 10.2.1 should be out any minute...

Thanks,

Collapse
Posted by Dis Continued on
I'm not quite there yet as for me most of this is as about as comprehensible as Urdu. Although I am out of my depth here, I have postgres 7.2 (http:// www.entropy.ch/software/macosx/postgresql/) and aol server 3.3 installed and running - now it's about finding instructions on how to install/configure/ integrate/run openacs.........If I get there, I'll post the route........
Collapse
Posted by Dis Continued on
Hi  - Following Walter's guide for OSX (https://openacs.org/new-file-storage/download/openacs4-mac-os-x.html?version_id=378) have got even closer
and now have the OpenACS welcome page

@system_name@ @focus@

Congratulations!
------------------------------------------------------------------------
You have successfully installed the OpenACS Community System version
@acs_version@.

....however,  all internal links are broken - any ideas on what I may have done
wrong in the configuration? Many thanks, Michael

"Not Found
The requested URL was not found on this server.

AOLserver/3.3.1+ad13 on http://localhost:8080"

Collapse
Posted by Ben Adida on
The problem there is that you're not sourcing the Tcl library and thus the main
template page is being returned without the ACS templating system (and
without any data model installed, in fact).

Make sure that your Tcl library is set correctly in your configuration file to
source <ACS_HOME>/tcl (making sure to substitute your proper
ACS_HOME).

Collapse
Posted by Dis Continued on
Thanks - I thought I'd fixed but now get this.....aghh

Request Error
Server startup failed: Error during bootstrapping

invalid command name "db_qd_load_query_file"
    while executing
"db_qd_load_query_file $file"
    (procedure "apm_bootstrap_load_queries" line 26)
    invoked from within
"apm_bootstrap_load_queries acs-tcl"

AOLserver/3.3.1+ad13 on http://localhost:8080

Collapse
Posted by Ben Adida on
Look further up in your log file and find out where Tcl evaluation stopped
(some error along the way), possibly DB connectivity (although that's usually
nicely reported via the web page). Look carefully, it's sometimes hard to find :)
Collapse
Posted by Walter McGinnis on
Hmm.  Someone else had a similar looking problem in the past (see posts by Mischa in this thread https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0002mP&topic_id=OpenACS&topic=11).  Supposedly the problem had been patched.  How are you getting OpenACS (i.e. is it a cvs checkout of the development branch or a download of the 4.5 distribution)?

Walter

Collapse
Posted by Dis Continued on
Firstly - Thank you for your patience and I apologise for being out of my depth
here. My interest in OpenACS is as a potential user for CMS/community stuff --
not as a developer.

Anyway, this is part of the terminal output -- including error messages. Does
this help?

-su-2.05b$ whoami
nsadmin
-su-2.05b$ cd /usr/local/aolserver
-su-2.05b$ bin/nsd -ft openacs4.tcl
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: nsd.tcl: starting to
read config file...
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Warning: nsd.tcl: nsssl
not loaded because key/cert files do not exist.
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: nsd.tcl: finished
reading config file.
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: nsmain:
AOLserver/3.3.1+ad13 starting
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: nsmain: security
info: uid=506, euid=506, gid=20, egid=20
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: nsmain: max files:
FD_SETSIZE = 1024, rl_cur = 0, rl_max = 1024
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Error: pidfile: failed to
open pid file '/usr/local/aolserver/log/nspid.openacs4': 'Permission denied'
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: return: redirecting
'404' to 'global/file-not-found.html'
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: return: redirecting
'403' to 'global/forbidden.html'
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: modload: loading
'/usr/local/aolserver/bin/postgres.so'
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: PostgreSQL
loaded.
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: adp: mapped /*
.adp
[18/Sep/2002:13:25:57][1079.-1610609172][-main-] Notice: modload: loading
'/usr/local/aolserver/bin/nssock.so'

and more........

18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: Loading
packages/acs-tcl/tcl/xml-1-dom-procs.tcl...
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: Loading
packages/acs-tcl/tcl/xml-2-procs.tcl...
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Error: Server startup
failed: Error during bootstrapping
invalid command name "db_qd_load_query_file"
    while executing
"db_qd_load_query_file $file"
    (procedure "apm_bootstrap_load_queries" line 26)
    invoked from within
"apm_bootstrap_load_queries acs-tcl"
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: Sourcing files for
postload...
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: Done.
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: Executing
initialization code blocks...
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: QD=Postload files
to load: /usr/local/web/openacs4/www/index-oracle.xql /usr/local/web/
openacs4/www/index-postgresql.xql /usr/local/web/openacs4/www/index.xql
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Error:
invalid command name "db_qd_load_query_file"
    while executing
"db_qd_load_query_file $file"
    ("foreach" body line 2)
    invoked from within
"foreach file $files {
        db_qd_load_query_file $file
    }"
    ("foreach" body line 6)
    invoked from within
"foreach dir $dirs {
    set files [glob -nocomplain "${oacs_root}/$dir/*.xql"]

    ns_log Notice "QD=Postload files to load: $files"

    foreach..."
    (file "/usr/local/web/openacs4/tcl/zz-postload.tcl" line 37)
[18/Sep/2002:13:26:03][1079.-1610609172][-main-] Notice: tcl: generating
interp init script
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Warning: keepalive:
insufficient maxkeepalive 0: keepalive disabled
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Notice: nsmain:
AOLserver/3.3.1+ad13 running
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Notice: nsmain: security
info: uid=506, euid=506, gid=20, egid=20
[18/Sep/2002:13:26:04][1079.3895856][-sched-] Notice: sched: starting
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Notice: serv: waiting for
warmup
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Notice: serv: warmed up
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Notice: socks: idle
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Notice: sched: idle
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Error: nssock: failed to
listen on 127.0.0.1:8080: Address already in use
[18/Sep/2002:13:26:04][1079.11821360][-nssock-] Notice: nssock: starting
[18/Sep/2002:13:26:04][1079.11821360][-nssock-] Notice: nssock: accepting
connections
[18/Sep/2002:13:26:04][1079.11821360][-nssock-] Notice: exiting

Collapse
Posted by Jeff Davis on
[18/Sep/2002:13:26:04][1079.-1610609172][-main-] Error: nssock: failed o 
listen on 127.0.0.1:8080: Address already in use
This means somethings is already using port 8080 on localhost.

On linux I would do (as root)

lsof | grep LISTEN
If it was not obvious, but I don't know if you have that on OSX10.2. You could also change the port in the config.tcl file to something else (8000 is common as well).
Collapse
Posted by Janine Ohmer on
OS X does have lsof.  But I bet what's going on here is that Michael has got multiple copies of nsd running.  Michael, if you're the only one messing with nsd on this box, run "killall nsd" and then try starting it again.

I don't quite see why not being able to grab the port would cause the db_ errors you're seeing, but certainly nothing is going to work until you fix the port problem anyway.

Collapse
Posted by Walter McGinnis on
There is also a permissions error when nsd tries to open the pid file.  Check the permissions for /usr/local/aolserver/log and if it looks like someone besides nsadmin owns anything in /usr/local/aolserver/log do this:

chown -R nsadmin.web /usr/local/aolserver/log

You may need to do the above as root (i.e. when you run the command you get a permissions error).  If so prepend the command with "sudo".  Actually, it shouldn't hurt to cut the above to /usr/local/aolserver

As Janine points out, using killall before starting a nsd process by hand (if there should only be one aolservers on the box) is a good idea.  Of course, it may be a very bad idea if there are supposed to be multiple aolservers running...

Walter

Collapse
Posted by Janine Ohmer on
I think (but am not certain) that he's getting the permisions error on the PID file because it's already open by another process.  Michael, if you get down to only one nsd running and you still see that error then Walter's instructions are just what you need.

I haven't run nsd on OS X myself - Walter, when he does a ps should he see one process ala Solaris, or one per thread ala Linux?  We should make this clear so he knows whether he's got only one running or not.

Collapse
Posted by Walter McGinnis on
Couldn't tell you at the moment, but my suspicion is that he only means to have one aolserver running on his box, so having anything show up with ps is a bad sign.

Oh yeah, man ps from the command line should tell you whether its like Linux or Solaris, really its probably like FreeBSD.

One other thing, OS X has a handy GUI process monitor (like top).  Its found under /Applications > Utilities.  Can't remember the exact name, but it probably has the word process in it.  You can sort by User.  Check for nsadmin, root, etc.  That should allow you to kill the offending process too.

Walter

Collapse
Posted by Dis Continued on
Thank you all very much for your help. Some of the problems have been fixed - yes I did have more than one nsd running (Sigh...I'm learning the rules and that you just don't do things like this) - but I think this is ok now.
-bash-2.05b$  sudo lsof | grep LISTEN
Password:
netinfod  245     root    6u   inet 0x0141dd1c        0t0      TCP localhost:1033 
(LISTEN)
cupsd     290     root    0u   inet 0x0141cfac        0t0      TCP localhost:ipp 
(LISTEN)
postgres  417 postgres    3u   inet 0x0141c79c        0t0      TCP *:5432 
(LISTEN)
nsd8x     582  nsadmin    9u   inet 0x0141da6c        0t0      TCP localhost:8080 
(LISTEN)
-bash-2.05b$ 
Following Walter, I have fixed the permissions error, which occurred when nsd tried to open the pid file. Then, with great anticipation:
-bash-2.05b$ whoami
ms
-bash-2.05b$ su - nsadmin
Password:
-su-2.05b$ cd /usr/local/aolserver/
-su-2.05b$ bin/nsd -ft openacs4.tcl
No error or server conflicts - wow -- but then:-
19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Loading packages/
acs-tcl/tcl/utilities-procs.tcl...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Loading packages/
acs-tcl/tcl/widgets-procs.tcl...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Loading packages/
acs-tcl/tcl/xml-0-sgml-procs.tcl...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Loading packages/
acs-tcl/tcl/xml-1-dom-procs.tcl...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Loading packages/
acs-tcl/tcl/xml-2-procs.tcl...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Error: Server startup failed: 
Error during bootstrapping
invalid command name "db_qd_load_query_file"
    while executing
"db_qd_load_query_file $file"
    (procedure "apm_bootstrap_load_queries" line 26)
    invoked from within
"apm_bootstrap_load_queries acs-tcl"
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Sourcing files for 
postload...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Done.
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: Executing 
initialization code blocks...
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: QD=Postload files 
to load: /usr/local/web/openacs4/www/index-oracle.xql /usr/local/web/
openacs4/www/index-postgresql.xql /usr/local/web/openacs4/www/index.xql
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Error: 
invalid command name "db_qd_load_query_file"
    while executing
"db_qd_load_query_file $file"
    ("foreach" body line 2)
    invoked from within
"foreach file $files {
        db_qd_load_query_file $file
    }"
    ("foreach" body line 6)
    invoked from within
"foreach dir $dirs {
    set files [glob -nocomplain "${oacs_root}/$dir/*.xql"]
    
    ns_log Notice "QD=Postload files to load: $files"

    foreach..."
    (file "/usr/local/web/openacs4/tcl/zz-postload.tcl" line 37)
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: tcl: generating 
interp init script
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Warning: keepalive: 
insufficient maxkeepalive 0: keepalive disabled
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: nsmain: 
AOLserver/3.3.1+ad13 running
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: nsmain: security 
info: uid=506, euid=506, gid=20, egid=20
[19/Sep/2002:10:18:55][582.3895856][-sched-] Notice: sched: starting
[19/Sep/2002:10:18:55][582.-1610609172][-main-] Notice: serv: waiting for 
warmup
[19/Sep/2002:10:18:56][582.-1610609172][-main-] Notice: serv: warmed up
[19/Sep/2002:10:18:56][582.-1610609172][-main-] Notice: socks: idle
[19/Sep/2002:10:18:56][582.-1610609172][-main-] Notice: sched: idle
[19/Sep/2002:10:18:56][582.-1610609172][-main-] Notice: nssock: listening 
on 127.0.0.1:8080
[19/Sep/2002:10:18:56][582.11821360][-nssock-] Notice: nssock: starting
[19/Sep/2002:10:18:56][582.11821360][-nssock-] Notice: nssock: accepting 
connections
                                
pointing my browser to http://127.0.0.1:8080/
Request Error
Server startup failed: Error during bootstrapping


invalid command name "db_qd_load_query_file"
    while executing
"db_qd_load_query_file $file"
    (procedure "apm_bootstrap_load_queries" line 26)
    invoked from within
"apm_bootstrap_load_queries acs-tcl"

AOLserver/3.3.1+ad13 on http://localhost:8080
This last (?) remaining problem is the same discussed mentioned by Walter. https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0002mP&topic_id= OpenACS&t opic=11). I am using a http download of the Open ACS 4.5 distribution. How involved is the process of installing "a cvs checkout of the development branch"..... Thanks again..........
Collapse
Posted by Walter McGinnis on
Yeah.  I'm not sure if that fix was before or after the official 4.5 release.  Its not hard to use cvs to checkout a copy of openacs.  Take a look at the old Mac OS X Howto.  It should have directions on how to do it.  There is also a standalone document in openacs.org/new-file-storage on how to use cvs.  I'm curious if this problem will persist...

It could be a incompatibility with the version of Postgresql you have and may need to be fixed again.  We'll see.

Good luck,

Collapse
Posted by Dis Continued on
FAN-BLOODY-TASTIC! I downloaded the CVS Openacs-core and it works like a dream on my ibook, running OS10.2 and postgres7.2 - Thank you all for your help - what a great community! Michael
Collapse
Posted by Walter McGinnis on

That's great news. Its nice to hear that someone has gotten OpenACS 4x to work with 10.2!

We need to update our docs for 10.2, so it would be extremely helpful if you could take a few moments to outline what documents you used to get things running and point out anything that you had to do differently (i.e. software version numbers, different links, etc).

The best place to share your notes is probably as a comment left at https://openacs.org/new-file-storage/one-file?file_id=217&group_id=&owner_id=&source= and as a post here.

Doesn't come with bash now?

Thanks and enjoy!

Collapse
Posted by Dis Continued on
Hi Walter, I've also left a comment at the above url... What was different in this installation?
(i) I needed a Jaguar compatible package of postgres server (7.2) and this was grabbed from here:- http://www.entropy.ch/ software/macosx/postgresql/. The pathway
/usr/local/pgsql/binin the configuration file 
openacs4.tcl
needs to be changed to
/usr/local/pgsql/bin

(ii) I used CVS to checkout a copy of openacs-core - the OpenACS 4.5 download distribution has a problem as far as Mac OSX is concerned, as someone else has also discovered. https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0002mP&topic_id=OpenACS&topic=11. Because my knolwedge of unix etc is elementary, installation took a while however, it was well worth the effort. The packages that I am interested in and am now exploring are CR/ETP.........the aim being to port over a currently static website to openacs at some point in the future.
Collapse
Posted by Dis Continued on
Sorry, that should be.......the pathway
/usr/local/pgsql/bin
in the configuration file
openacs4.tclneeds to be changed to 
/usr/local/bin
Collapse
Posted by Walter McGinnis on
Thanks for the report back.

Did you install bash too (as the Howto documents) or was it
preinstalled on your system?

Collapse
Posted by Dis Continued on
I installed bash exactly as described in the "HowTo" documents.

Regards

Michael

Collapse
Posted by Carl Robert Blesius on

I have not gotten around to installing on 10.2 yet (will have more time to enjoy it at the end of the coming month... just in time for 4.6), but here is some info (in a form that could be used for the documentation) on bash for OS 10.2 (which is now included).


Bash is included with Mac OS 10.2, but it defaults to using the tcsh shell. The niutil command can be used to change the default shell for Terminal:

sudo niutil -createprop / /users/$USER shell /bin/bash

After entering your admin password you can make sure the change was successful by opening a new terminal window. You should get something like this (bash version number may vary):

Welcome to Darwin!
bash-2.05a$

Hope that helps some.
Collapse
Posted by Walter McGinnis on
Thanks for the update Carl.  You can also change your default
shell via the NetInfo Manager app for those who want to go the
GUI route.