Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Context/Host Question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brook Davies  
View profile  
 More options Feb 16 2012, 3:33 am
From: Brook Davies <brooks...@gmail.com>
Date: Thu, 16 Feb 2012 00:33:41 -0800
Local: Thurs, Feb 16 2012 3:33 am
Subject: Context/Host Question

Hello,

Okay, so hours in and I can't figure this one out. I have a two Railo
servers  setup on windows 2008 with IIS7.5, and they hosts just one website
(and the admin site):

I've added the entry to server.xml for my site

<Host name="analytics.mywebsite.com" appBase="webapps">
         <Context path="" docBase="C:\inetpub\wwwroot\LF-MYWEBSITE\" />
         <Alias>89.34.199.13</Alias> <!--- this is the real server ip -->
         <Alias>89.34.199.57</Alias> <!-- this is the virtual load balanced
ip -->
 </Host>

Everything works great, if open a browser and go to the IP or domain, I get
the website as expected.

The problem is, the  load balancer (from loadbalancer.org) checks the real
ip for  a response from a health monitoring script. But the loadbalancer
request is getting handled differently and instead of:

C:\inetpub\wwwroot\LF-MYWEBSITE\health\monitor.cfm

its being sent to

C:\railo\tomcat\webapps\ROOT\health\monitor.cfm

But, I don't understand why, because it should be a normal http request on
port 80 from the load balancer. This is what is in the log:

Page /health/monitor.cfm [C:\railo\tomcat\webapps\ROOT\health\monitor.cfm]
not found
    at railo.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:140):140
    at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:759):759
    at
railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java: 179):179
    at
railo.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:8 3):83
    at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1991):1991
    at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1958):1958
    at
railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:297):29 7
    at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722):722
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:304):304
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:210):210
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:224):224
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:169):169
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16 8):168
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 0):100
    at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929):9 29
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:118):118
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) :405
    at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proc essor.java:964):964
    at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstra ctProtocol.java:515):515
    at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java :302):302
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source):-1
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1
    at java.lang.Thread.run(Unknown Source):-1

Anybody know how I might go about fixing this?

Brook


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AJ Mercer  
View profile  
 More options Feb 16 2012, 3:52 am
From: AJ Mercer <ajmer...@gmail.com>
Date: Thu, 16 Feb 2012 16:52:40 +0800
Local: Thurs, Feb 16 2012 3:52 am
Subject: Re: [railo] Context/Host Question

tra adding
<Alias> oadbalancer.org <http://loadbalancer.org/> </Alias> <!-- this is
the virtual load balanced by name -->

On 16 February 2012 16:33, Brook Davies <brooks...@gmail.com> wrote:

--

*AJ Mercer*
<webonix:net strength="Industrial" /> <http://webonix.net> | <webonix:org
community="Open" /> <http://webonix.org>
http://twitter.com/webonix
Railo Community Manager <http://www.getrailo.org/index.cfm/community/team/>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brook Davies  
View profile  
 More options Feb 16 2012, 1:39 pm
From: Brook Davies <brooks...@gmail.com>
Date: Thu, 16 Feb 2012 10:39:28 -0800
Local: Thurs, Feb 16 2012 1:39 pm
Subject: Re: [railo] Context/Host Question

Really? Loadbalancer.org are the makers of the load balancer. Sorry, Maybe
I didn't explain that right. The load balancer is making the request to
check 69.90.199.13.

I tried chaning the appbase attribute to "C:\inetpub\wwwroot\LF-MYWEBSITE"
and that actually worked, but then the application scope that the
monitor.cfm page expected no longer existed.

Brook


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jordan Michaels  
View profile  
 More options Feb 16 2012, 5:56 pm
From: Jordan Michaels <jor...@viviotech.net>
Date: Thu, 16 Feb 2012 14:56:12 -0800
Local: Thurs, Feb 16 2012 5:56 pm
Subject: Re: [railo] Context/Host Question
Protocol.

Tomcat's web server communicates in the HTTP protocol. If the incoming
request doesn't have typical HTTP request headers, then it's not a HTTP
request and Tomcat will not know how to resolve the request. Because
it's not a HTTP request, Tomcat will resolve it to the default host (the
same way apache would if you, for example, telnetted to Apache port 80
and didn't provide any HTTP headers).

The requests from your browser through the load balancers work because
they're communicating using the HTTP protocol. It doesn't sound like
your load balancers are communicating using HTTP.

Are your load balancers capable of performing a HTTP check that will
contain HTTP request headers? IE: a host name and a URI specifically?

Some load balancers are able to take this a step further and check the
content of a response for specific information. Vivio has load balancer
clients that use this feature and have their code run health checks when
their load balancer check point is hit. It's quite useful.

Bottom line, you need to find out exactly what kind of request your load
balancer is sending to your site. If your load balancers can perform a
HTTP check, great. If not, then you will need to configure Tomcat to
respond on the default host.

Warm Regards,
Jordan Michaels

On 02/16/2012 12:33 AM, Brook Davies wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brook Davies  
View profile  
 More options Feb 17 2012, 2:01 am
From: Brook Davies <brooks...@gmail.com>
Date: Thu, 16 Feb 2012 23:01:11 -0800
Local: Fri, Feb 17 2012 2:01 am
Subject: Re: [railo] Context/Host Question

The load balancer does exactly that,an http request and checks the response
on the page. My IIS 7.5 logs show that when I make a request, the file gets
served, but when the load balancer makes a request it generates a 404. I
can't figure this out. I checked for security related rules that might be
filtering out the libwww-perl agent but couldn't find any in IIS..

In the log snippet below, the 2 successul attempts were from me and the
others all from the load balancer.

012-02-17 06:53:44 69.90.199.12 GET /health/monitor.cfm - 80 - 69.90.199.58
libwww-perl/5.805 404 0 0 0
2012-02-17 06:54:00 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.59 libwww-perl/5.805 404 0 0 0
2012-02-17 06:54:23 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.58 libwww-perl/5.805 404 0 0 0
2012-02-17 06:54:25 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.58 libwww-perl/5.805 404 0 0 0
2012-02-17 06:54:41 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.59 libwww-perl/5.805 404 0 0 0
2012-02-17 06:54:49 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.12
Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:8.0.1)+Gecko/20100101+Firefox/8.0.1
200 0 0 202
2012-02-17 06:55:03 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.12
Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:8.0.1)+Gecko/20100101+Firefox/8.0.1
200 0 0 15
2012-02-17 06:55:03 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.58 libwww-perl/5.805 404 0 0 15
2012-02-17 06:55:05 69.90.199.12 GET /health/monitor.cfm - 80 -
69.90.199.58 libwww-perl/5.805 404 0 0 0

Are there rules restricing libwww-perl somewhere as a valid user agent?

Brook

On Thu, Feb 16, 2012 at 2:56 PM, Jordan Michaels <jor...@viviotech.net>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jordan Michaels  
View profile  
 More options Feb 17 2012, 1:41 pm
From: Jordan Michaels <jor...@viviotech.net>
Date: Fri, 17 Feb 2012 10:41:55 -0800
Local: Fri, Feb 17 2012 1:41 pm
Subject: Re: [railo] Context/Host Question
Alright, thanks for the additional information. This makes more sense now.

You said your host was setup as follows:

<Host name="analytics.mywebsite.com" appBase="webapps">
          <Context path="" docBase="C:\inetpub\wwwroot\LF-MYWEBSITE\" />
          <Alias>89.34.199.13</Alias>
          <Alias>89.34.199.57</Alias>
</Host>

But in your logs, I see these IP's:

69.90.199.12
69.90.199.59
69.90.199.58

Is 199.13 an additional load-balanced node?

You indicated 199.57 was the LB IP, but I'm guessing you're referring to
the floating gateway IP? Your networking will be different depending on
how your LB's are set up. From your description, it sounds like you're
using the LB's for both incoming and outgoing traffic.

In this kind of a setup, the floating IP for the LB's will not be seen
by Tomcat. It's used purely for routing.

Try this host config instead.

<Host name="analytics.mywebsite.com" appBase="webapps">
          <Context path="" docBase="C:\inetpub\wwwroot\LF-MYWEBSITE\" />
          <Alias>89.34.199.12</Alias>
          <Alias>89.34.199.13</Alias>
</Host>

... and see if you have better luck.

The values that you add to each <Alias> will be the IP's that the load
balancers hit to perform their checks.

Warm Regards,
Jordan Michaels

On 02/16/2012 11:01 PM, Brook Davies wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Amiri  
View profile  
 More options Feb 17 2012, 2:01 pm
From: Peter Amiri <bpam...@gmail.com>
Date: Fri, 17 Feb 2012 14:01:30 -0500
Local: Fri, Feb 17 2012 2:01 pm
Subject: Re: [railo] Context/Host Question

Brook,

I'm not familiar with this brand of loadbalancer so these are just suggestions. First of all make sure the LB check is an HTTP check and not a TCP check. Next I would check to see if I can make the manual connection from the LB and another machine on the same subnet as the LBs local link. Can you actually do a curl from the LB command line to the server in question? If the LB doesn't give you access to a local command line or curl then another machine on the same subnet may be fine.

Typically when you setup a LB in front of webservers. The servers will have internal ips and the lb will have an internal link and an external link. And depending on whether your LB is terminating the connection the Gateway of the webserver will either be set to the LB or another device on the network. But in your example you only mention public IPs. Depending on how your network is configured this may very well be a routing issue.

But it seems like the request is actually getting to the webserver it's just that the webserver doesn't know how to map the inbound request to the right web context to find the requested file. So I would try to capture more information on the 404 error. If you can actually setup a custom 404 page and log or email yourself with all the cgi variables. You need to see what the host header or host name of the request is and make sure that host name is in a <Alias> block.

Anyway I hope this gives you some ideas on where to go next.

--
Peter Amiri
Founder | Alurium Cloud Computing
949-338-3862 | pe...@alurium.com | http://www.alurium.com
LinkedIn: http://www.linkedin.com/in/peteramiri | IM bpamiri (AIM/MSN/Y!/GTLK/SKYPE)
Follow Us: http://twitter.com/AluriumCloud
Like Us: http://facebook.com/AluriumCloud

On Feb 17, 2012, at 2:01 AM, Brook Davies wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »