Forum OpenACS Q&A: Virtual host installation

Collapse
Posted by G. Armour Van Horn on
I have OpenACS setup using the RPMs, or at least I did a few weeks ago before I found that I needed to replace the UPS. The system will be running at least four virtual sites by the end of the year, so I've been reading Jerry Asher's virtual host setup document closely.

My question is, since I gather that the installation paths from source vs RPM installs are different, do I need to have all my ACS installs run from source to make this work? Or can I use the current install as the master and install the virtuals from source?

It isn't a huge difference, as I have to learn to get it running from source in any case.

Collapse
Posted by Jerry Asher on
AOLserver's virtual hosting/reverse proxy solution, nsvhr, doesn't work well out of the box. So if you want to use it, you need to patch it, and the patches are patches to the source. Nsvhr runs only in the master, so in fact, to use nsvhr, you definitely need the master to be running from a source install.

There are other virtual hosting/reverse proxy technologies, including Apache, SQUID, and my understanding is, various mechanisms within various ACS versions. None of these solutions would require installing the source to AOLserver.

AOLserver itself isn't bug free, and the state of the art for AOLserver is for bug fixes to be released as source patches.

I would probably not install it both ways, especially if you're new to the system. It won't hurt, but it may be confusing.

Collapse
Posted by G. Armour Van Horn on
Exactly what I needed to know.

And damned impressive: in what commercial system could you get support from the program's development team in under an hour at 2 am on a Saturday?

Thanks.

Collapse
Posted by G. Armour Van Horn on
Jerry,

I'm going to go with your patches, I think that means using nssock on the master, and nsunix on the virtuals. It's all starting to make sense to me. I have RH7.1 and PostgreSQL 7.1.3 running and behaving themselves. For the least problems, which AOLserver and OpenACS releases should I grab?

Van

Collapse
Posted by Jerry Asher on
The version of OpenACS shouldn't matter.  I would pick that version based on your site's requirements, what it needs to do, when you need to launch, what resources will be available to develop and maintain it, etc., but there are others here who can tell you more about that.

The most recent nsvhr patches were developed with AOLserver 3.3ad13, the ArsDigita release patched and packaged by Rob Mayoff.  That version is available from the ArsDigita site: http://www.arsdigita.com/acs-repository/one-version?version_id=2081.

That's what I would recommend.

Collapse
Posted by G. Armour Van Horn on
I'm getting closer, I actually have AOLserver running on port 80. However, when I go in to run your (Jerry's) patch from /web/ad33.13/aolserver I get this:</p><br>
<pre>
[root@vox aolserver]# patch -p5 < /web/aolserver3.3-vhr.patch
missing header for context diff at line 7 of patch
can't find file to patch at input line 7
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Only in /web/ad33.13/aolserver/: .#Makefile.1.1.1.1
|Only in /web/ad33.13/aolserver/: CVS
|diff -c -x=*.so -x=*.o -x=CVS -x=tcl8.3.2 -x=tcl7.6 -I [$]Header: -I [$]Id: -r /web/foo/ad33.13/aolserver/ChangeLog
|/web/ad33.13/aolserver/ChangeLog
|*** /web/foo/ad33.13/aolserver/ChangeLogSat Mar 31 07:54:38 2001
|--- /web/ad33.13/aolserver/ChangeLogFri Aug 31 12:22:24 2001
--------------------------
File to patch:
</pre>
<p>And I have no idea what file it is looking for!</p>

<p>Van</p>

Collapse
Posted by Jerry Asher on
Hi Van,

Following the usual untar of the aolserver3.3ad13 sources you should cd to the root/aolserver directory. What's puzzling of course is that the excerpt you've included apparently shows that you are in that directory.

Here's what I just tried, and it seems to work for me. I don't really know what to suggest, except to ensure that you're in the right directory, and have the right patch file (mine shows a length of 240840 bytes.) (and perhaps to play with that "5" (in the p5)). Perhaps someone else can explain differences or problems with patch....?

[nsadmin@web p0rn]# cd /tmp
[nsadmin@web aolserver]# ls -l /web/tag/download/AOLserverVirtualHostingPatches/13.file 
-rw-r--r--   1 theasher web        240840 Sep 19 04:28 /web/tag/download/AOLserverVirtualHostingPatches/13.file
[nsadmin@web aolserver]# 
[nsadmin@web /tmp]# tar zxvf aol/aolserver33.ad13.src.tar.gz 
root/
root/aolserver/
root/aolserver/doc/
  .  .  . 
root/arsdigita-aol3/make-dist.sh
root/arsdigita-aol3/make-src-dist.sh
[nsadmin@web /tmp]# cd root/aolserver/
[nsadmin@web aolserver]# ls -F
ChangeLog	    DISTRIBUTION.txt  Makefile	doc/		   include/    nscgi/  nsd/    nslog/	nspd/	 nssock/  nsvhr/    tcl/     tcl8.3.2/	thread/  windows-nsd.tcl
DISTRIBUTION.patch  LICENSE.txt       README	encoding-doc.html  index.html  nscp/   nsext/  nsodbc/	nsperm/  nsunix/  scripts/  tcl7.6/  tests/	win32/
[nsadmin@web aolserver]# patch -p5 </web/tag/download/AOLserverVirtualHostingPatches/13.file 
patching file `ChangeLog'
patching file `Makefile'
patching file `include/ns.h'
patching file `nsd/config.c'
patching file `nsd/conn.c'
patching file `nsd/dbinit.c'
patching file `nsd/dbtcl.c'
patching file `nsd/drv.c'
patching file `nsd/log.c'
patching file `nsd/nsconf.c'
patching file `nsd/nsconf.h'
patching file `nsd/nsd.h'
patching file `nsd/request.c'
patching file `nsd/serv.c'
patching file `nsd/tclcmds.c'
patching file `nslog/nslog.c'
patching file `nssock/sock.cpp'
patching file `nsunix/nsunix.c'
patching file `nsvhr/nsvhr.c'
patching file `nsvhr/nsvhr.html'
patching file `tcl/form.tcl'
[nsadmin@web aolserver]# 
Collapse
Posted by S. Y. on
I dunno, but I tried the patch and got a couple of errors in patching some of the HTML documents. The patching of the actual code worked fine. Is it possible that there are some DOS-type carriage returns that's screwing up the patch file?
Collapse
Posted by Jerry Asher on
The only part of the patch that *should* have carriage returns in it, is the patch to nsvhr.html.  So long as no one edits the patch, I can't imagine how other CR's would creep in.

I installed the patches on a Red Hat 7.1 system one week ago following a fresh download of aolserver and the patches, and it patched fine there with no error messages.

If you want to let me login to your system, I can try the patch myself and try to figure out what's up.

Collapse
Posted by S. Y. on

Hmmm, my fault, I think. It appears that I inadvertently washed the patch through dos2unix and removed all the carriage returns from the nsvhr.html diff. I just downloaded another copy of v6 and patched AOLserver 3.3.1+ad13 successfully.

    [root@vendela aolserver]# patch -p5 < /var/tmp/aolserver3.3-vhr.patch 
    missing header for context diff at line 6 of patch
    patching file ChangeLog
    missing header for context diff at line 1542 of patch
    patching file Makefile
    patching file include/ns.h
    patching file nsd/config.c
    patching file nsd/conn.c
    patching file nsd/dbinit.c
    patching file nsd/dbtcl.c
    patching file nsd/drv.c
    patching file nsd/log.c
    patching file nsd/nsconf.c
    patching file nsd/nsconf.h
    patching file nsd/nsd.h
    patching file nsd/request.c
    patching file nsd/serv.c
    patching file nsd/tclcmds.c
    patching file nslog/nslog.c
    patching file nssock/sock.cpp
    patching file nsunix/nsunix.c
    patching file nsvhr/nsvhr.c
    patching file nsvhr/nsvhr.html
    patching file tcl/form.tcl
    [root@vendela aolserver]# 
    

The two "missing header" warnings are non-fatal.

Oh well, chalk up my error to overzealous DOS cleansing. I'm running Red Hat 7.1 with kernel 2.4.10 if that's of any help to anyone. Well, time for bed, I think.

Collapse
Posted by MK Tam on
Maybe off-topic, but it definitely related to nsunix...

I get this error message frequently in my server log when my OACS instance keeps running:

Error: nsunix: DrvSendFd unexpectedly, write returned -1!errno is 32 (Broken pipe) at fileoffset 55024 with towrite 6761784
    Notice: dbdrv: opening database 'postgres:localhost::video'

What does it mean?

Collapse
Posted by Jerry Asher on
Error: nsunix: DrvSendFd unexpectedly, write returned -1!errno is 32 (Broken pipe) at fileoffset 55024 with towrite 6761784 Notice: dbdrv: opening database 'postgres:localhost::video'
The error message from nsunix is one I put in a release or two ago when I added the handling of broken pipes and network waits to nsunix. I think I've taken it out, or lowered it to be a debug in the recent release. Basically it means that a connection was broken while your machine was transmitting data. Observationally I've determined that it means someone got bored with a long download, and clicked over to britneyspears.com. In other words, that's an ignorable error -- which is why I believe I have removed it.

I don't know the relationship of that message to the postgres message. Do they always show up in pairs?

Collapse
Posted by S. Y. on
I've determined that it means someone got bored with a long download, and clicked over to britneyspears.com...

That's the wrong URL. The correct web site is right here. 😉

Collapse
Posted by MK Tam on
Re Jerry: Not always related to Postgres.  Thanks for your reply.
Collapse
Posted by Jerry Asher on
Thanks for the link Sean.  Damn the dot-com implosion.  My favorite site for sysadmin and dba advice dispensed by supermodels vanished a few months back, revealing that sometimes the cup is half empty after all.