Forum OpenACS Q&A: Virtual IP addresses

Collapse
Posted by David Richards on
I've leased a server from Digital Nation to serve openACS based web
pages.  I get one primary IP address, and 4 virtual addresses that
have been linked to my ethernet card already.  I have checked in
netstat -i for the interfaces, and there are 4 virtual IP addresses
configured against my ethernet card

I have installed Postgres, AOLserver, and the openACS.  I believe
everything is correctly set up with these.  At least I can start
AOLserver without any errors.  When AOLserver starts, I can read
through the server log and see that it initialized the openACS stuff
without any errors as well.

My problem is that AOLserver won't serve any pages.

I believe my Linux configuration is correct, because when I try and
access the site, the access log contains an entry for the attempt.
However, I get the error that the server has refused my connection.

I did change the directory /usr/local/etc/httpd to
/usr/local/etc/httpd.hide.  As far as I can see, this is only used
with Apache.  I also killed the Apache processes that had those ports
tied up.

I believe AOLserver is talking correctly to postgres because it has
many instances in the initialization of the openACs of querying the
database.  Again, there are no errors from those processes.

I believe the issue isn't tcl, because it won't serve index.html or
index.tcl.  It does log both attempts in the access log.  index.html
is a very simple, legal html document.

So, that leaves me with one suspsect.  Possibly something's not jiving
in my nsd.tcl file.  I set the following two lines:

set address      216.167.114.244

#set address      [ns_info address]

I'm not really sure what I could've messed up with that one.  It was a
gues in the first place.  All I know is that I can't have
216.167.107.223, which is the actual IP address of the server.  That's
why I guessed with the above correction to nsd.tcl.

So, did I do something wrong with this configuration?  Has anyone had
any experience with this.  Do you need any more information?

Thank you,

David Richards

Collapse
Posted by Roberto Mello on
My guess is that there's something wrong with your or DigitalNation's network config because I was able to reach your server via telnet:

roberto@brasileiro:~$ telnet 216.167.114.244 80
Trying 216.167.114.244...
Connected to 216.167.114.244.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: text/html
Set-Cookie: ad_browser_id=3; Path=/; Expires=Fri, 01-Jan-2010 01:00:00 GMT
Set-Cookie: ad_session_id=4,0,v1F8hkwFlMHNM49PnwqVRusZKtUcS/8N,961471934; Path=/; Max-Age=86400
...

But when I tried accessing davecubed.com (to which that IP resolves) I got a "We registered our domain with VERIO" page. Trying to access the IP returned a "connection refused by linux1162.dn.net" error, which could indicate DNS problems.

Collapse
Posted by David Richards on
That's interesting.  I tried that exact telnet test, but couldn't get a response.  I must have mistyped something.

As for the davecubed stuff, Verio's being a dog at getting my name out of their DNS.  I requested it to be done last Thursday, but they didn't get it right.  They're trying to bill me for supporting a domain name.  Isn't that crazy?

However, all my tests are directly to the IP address, (e.g. 216.167.114.244/index.html).  Since the request does log in the AOL access log, I figured that the Linux box got the request to the right process.  That's why I concluded that Linux and the DNS aren't the problem (even though I could ring Verio's necks for not getting something so simple right.)

I guess a more productive question might be what exactly does the tcl command "set address [ns_info address]" mean?

And, please know Roberto, that I'm terribly grateful to you for looking into that.  In reading my response, I'm afraid that the tone is a bit brusk.  I'm actually elated that you would take a few minutes to look into this problem.

David Richards

Collapse
Posted by David Richards on
I got it!!! (for now.  I still need some help)

I put the set address [ns_info address] back in the nsd.tcl.  The virtual IP address wouldn't work, but the primary one does.  It redirects me to Linux1162.dn.net.  So, that's where I'm at, until I get Verio to act with my DNS entry.

For now, that's going to be fine.  I can get things done, and move forward.  Anyone have any ideas how to get things working on the alternate IP address?  Thanks,

David Richards

Collapse
Posted by Don Baccus on
How are these alternative IPs set up?  I've done a handful of multi-IP  hosting on a single NIC in Linux with no problem, but I've had full control.  The IPs are real, I just bind several of them to a single NIC, then fire up AOLservers to listen on that IP, and all works hunky -dory.

To some extent, you may be the victim of getting service rather than a bare box.  At least with a bare box, you know you can configure it right (even if it takes our help!)  Don't get me wrong, folks like Verio ought to be able to deliver meaningful service, but you're already seeing one snafu on their part.  They wouldn't charge you less for less service, so they probably don't have any real motivation to help you fix your problems...

Collapse
Posted by David Richards on
I actually do have the bare box--unless they've done something terribly tricky that has me fooled.  My netstat -i shows no information for the alternate IP addresses.  (eth0:  1500  0  --no statistics available--  BRU).  My hosts file shows 216.167.114.244  216.167.114.244-generic.

If I were to rebuild, I'm assuming I'd ifdown and ifconfig the ip address.  Can you give me more advice than that?

Collapse
Posted by Don Baccus on
Check out ifup-aliases in /etc/sysconfig/network-scripts if you're running RedHat.  Follow the instructions and define an ifcfg-eth0-range0 file with the block of aliases you want defined for eth0 in addition to the address defined in ifcfg-eth0.

Then ifconfig eth0 down, ifconfig eth0 up and you should be set.  The ifup-aliases script does all the work of setting up the routes etc that are needed to make multiple IPs on a single NIC work.  If you do an ifconfig eth0 you'll see eth0:1 eth0:2 etc in addition to eth0, with the proper IPs, if ifconfig up worked properly.

Collapse
Posted by David Richards on
Bless you!  I'll be working on a lot of the ideas you've offered today in a few hours.  I need at least a few hours of sleep.  I just wanted to thank you before I go to bed.  Thank you all!
Collapse
Posted by David Richards on
OK, I just got back to this issue. I got out there to ifconfig, and everything's set up correctly--so it seems. I then went to nsd.tcl and adjusted the hostname and address to davecubed.com and 216.167.114.244 respectively. Now, if I jump into the pages, I can get right to davecubed. The problem is in the login process. On line 17 of /register/user-login.tcl, there is the following:
set selection [ns_db 0or1row $db "select user_id, user_state, converted_p from users where upper(email)=upper('$QQemail')"]
This query is returning more than one row, which errors out. I'm trying to figure out how configuring my box with a virtual IP address effects this, and I can't. But, it was the only thing I changed since I broke everything. I've gone out to the users table to see if it was corrupt. It looks fine--just one row per email address. I messed with the syntax, and looked at original beta 3 code to make sure I haven't broken anything. I can't find anything there. I'm stumped. Any ideas?
Collapse
Posted by David Richards on
OK, tonight is some time for some humble pie.  I changed empty_string_p, asked you folks if you thought it was a good idea, took a walk and read through some discussion forum stuff here, and then changed the virtual host.  I forgot what I had done to empty_string_p, and that was the culprit.  So, I put empty_string_p back, and now I'm up again.  Sorry for the false alarm.  I did spend about an hour trying to trace the problem before I asked for help, however.