Forum OpenACS Q&A: Network configuration for home development

I have installed the various parts of OpenACS on a machine at home,
and it seems to be working as it should if I run the browser on the
server. When I access the system from another machine in my home,
many things break. For example, when I submit the login information,
I am logged in, but the next page doesn't load. I haven't tracked
down the exact reason, but I'm pretty sure it's how my network's
configured. Perhaps a better example: the file simple-tcl-page.tcl
(in the first problem set) causes an "Internal Server Error" at the
point where it uses ns_hostbyaddr to get the client's hostname.

Noone else seems to have posted problems with this, so I'm wondering
what boneheaded thing I've done here. Unfortunately, I have a lot to
learn about networking. I'm running a simple ("fake") TCP/IP network
consisting of two machines. There's obviously no DNS server running
in my humble home. Can ACS properly talk to another machine in this
type of situation?

Here's my network setup:

Server

IP Address: 10.10.10.10; Subnet mask: 255.255.255.0; hostname:
conrad.localdomain; [no gateways or DNS server specified}

2nd machine (running splendiferous Windows 98)

IP Address: 10.10.10.11; Subnet mask 255.255.255.0; [DNS disabled;
turning it on and specifying a hostname doesn't seem to help; not DNS
servers or gateways specified.]

Any ideas or suggestions? Thanks...

Collapse
Posted by Joerg Michael on
Do you have "host" files on both computers? They should have *some* way of resolving their names to ip addresses - since you don't have a name server, hosts would be your way to do this.

How did you set up the relevant parts of nsd.tcl/ini?

Collapse
Posted by Alex Sokoloff on
Thanks

On the server, /etc/hosts lists:

127.0.0.1    localhost.localdomain

10.10.10.10  conrad.localdomain

I added the other machine to /etc/hosts

10.10.10.11  laptop.localdomain

and now ns_hostbyaddr works, but other stuff remains broken: the page after login - register/user-login.tcl doesn't load, for example. I need to poke around some more, obviously...

Collapse
Posted by Nathan Reeves on
Alex

Just expanding on what Joerg wrote,  you'll want to edit the hosts file on you 98 box to include the name and address of your ACS server.  The file is usually located under C:/Windows/System,  and may be called hosts.sam.  You'll need to rename this file to 'hosts' and then edit itto include the IP Address and name of your acs server.  you should be able to drop to a command prompt and type 'ping acsservername' and receive a response, where acsservername is the name of the server.

What may be happening is that you are accessing the server by IP address initally which means you load the login page fine,  the user-login.tcl file actually uses the hostname of the ACS machine which  your 98 machine knows nothing about, and so when your browser tries to redirect to the hostname,  it fails giving you the errors you are seeing.

Hope this helps.

Cheers

Collapse
Posted by Alex Sokoloff on
Adding a hosts file to the windows machine did the trick: redirects sent to the browser now work. Thanks to Nathan and Joerg.

What confused matters a little was the fact that I could access pages using the url "conrad/page_name" even before I added a hosts file, but "conrad.localdomain/page_name" (the url that would be sent in a redirect) didn't work. It turned out that "conrad" was being linked to the IP address by SAMBA, because I chose "conrad" as a server name for SAMBA. Doh!

Alex,

You mention a windows machine.  Is it just a client for a unix box, or  are you running parts of the OpenACS on it?  I note in Roberto's new docs that he says that one can run Postgres on Windows, but I haven't tracked down the binaries or how to do so yet.  If someone can list good pointers to how to do this, I'd be grateful.  If not, I'll have to create them sometime...