A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

999 views
Skip to first unread message

Hatem Jaber

unread,
Jul 27, 2010, 10:35:11 AM7/27/10
to Railo
Continuously getting this error on the ajp reverse proxy, not sure why
it's happening. I even tried upgrading to Tomcat7 to see if that will
fix it but it didn't. Looks like the resources keep running out
between the proxying, becasue I can access the site(s) on 8080 which
is the port tomcat is using and not able to access via apache.

Todd Rafferty

unread,
Jul 27, 2010, 10:36:57 AM7/27/10
to ra...@googlegroups.com
But, that's not the port that ajp reverse proxy uses. I believe it uses port 8009.
--
~Todd Rafferty ** Volunteer Railo Open Source Community Manager ** http://getrailo.org/

Hatem Jaber

unread,
Jul 27, 2010, 10:39:12 AM7/27/10
to Railo
I was trying it to see if it was working on tomcat and it works fine,
but when the reverse ajp on 8009, it's not working for some reason

On Jul 27, 10:36 am, Todd Rafferty <t...@getrailo.org> wrote:
> But, that's not the port that ajp reverse proxy uses. I believe it uses port
> 8009.
> --
> ~Todd Rafferty ** Volunteer Railo Open Source Community Manager **http://getrailo.org/
>
>
>
> On Tue, Jul 27, 2010 at 10:35 AM, Hatem Jaber <3...@7079.net> wrote:
> > Continuously getting this error on the ajp reverse proxy, not sure why
> > it's happening. I even tried upgrading to Tomcat7 to see if that will
> > fix it but it didn't. Looks like the resources keep running out
> > between the proxying, becasue I can access the site(s) on 8080 which
> > is the port tomcat is using and not able to access via apache.- Hide quoted text -
>
> - Show quoted text -

Hatem Jaber

unread,
Jul 27, 2010, 10:51:33 AM7/27/10
to Railo
I just tested the page again and it works fine on port 8080 without
proxying, but when proxying it takes too long and timesout in the end.
i'm not sure if there are any other settings that need to be tweaked.

Jordan Michaels

unread,
Jul 27, 2010, 1:56:25 PM7/27/10
to ra...@googlegroups.com
8809 is the correct AJP port. Do you have it firewalled by chance? Maybe
anti-virus software blocking it? Can you telnet to 8009?

--
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions

denstar

unread,
Jul 27, 2010, 2:00:23 PM7/27/10
to ra...@googlegroups.com
What does the AJP connector deal in the server.xml file (IIRC) look
like? Maybe you changed the ports?

And since you know the HTTP is good, maybe try a HTTP proxy to 8080,
just to verify some communication-ness between the two?

The telnet idea is a good one too.

:Den

--
The writer may very well serve a movement of history as its
mouthpiece, but he cannot of course create it.
Karl Marx

Hatem Jaber

unread,
Jul 27, 2010, 4:42:42 PM7/27/10
to Railo
So the problem with the AJP turned out to be that it was doing a dns
lookup outside the server and trying to access the domain.com:8009 by
the ip address that it was pointed to initially. After some time it
would eventually resolve correctly. So the solution, thank you Jamie
Krug, was to use a <virtualhost *:80> and to set the domains in the
etc/host file to point to the domain so that it didn't have to look
outside to resolve, 127.0.0.1 domain.com. That seemed to get rid of
the error and everything is smoothly working on the server! Also,
inside the vhost for apache, we would ProxyPassReverse to ajp://localhost:8009/
since ProxyPreserveHost was set to On which according to Jamie would
preserve the host name, which it did. An example of a vhost that
reverse ajp to a mura site on tomcat looks like this:

<VirtualHost *:80>

ServerAdmin em...@email.com
DocumentRoot "C:/wwwroot/mura"
ServerName mura.mysite.com
ErrorLog logs/mura-error_log
CustomLog logs/mura-access_log common

<Directory "C:/wwwroot/mura">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<Proxy *>
Allow from 127.0.0.1
</Proxy>

ProxyPreserveHost On
ProxyPassReverse / ajp://localhost:8009/

RewriteEngine On

# Forbid access to Railo Admin URLs:
RewriteRule ^/railo-context/admin/(.*) - [F]

# Proxy "secret" Railo Admin URLs to "real" Railo Admin URLs on
Tomcat:
RewriteRule ^/SOMETHING-DIFFICULT-TO-GUESS/admin/(.*\.cf[cm])$
ajp://localhost:8009/railo-context/admin/$1 [P]

# If it's a CFML (*.cfc or *.cfm) request, just proxy it to
Tomcat:
RewriteRule ^(.+\.cf[cm])(/.*)?$ ajp://localhost:8009$1$2 [P]

# If trailing slash and real directory, then append index.cfm and
proxy it to Tomcat/Railo:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^(.+/)$ ajp://localhost:8009%{REQUEST_URI}index.cfm
[P]

# If it's a real file (and we haven't proxied to Tomcat, so it
must be static), just serve it:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
RewriteRule . - [L]

# NOTE: Everything else must be a CMS URL path (letters/numbers/
hyphens/slashes only), or a 404...

# Require trailing slash at this point, if otherwise valid CMS
URL:
RewriteRule ^([a-zA-Z0-9/-]+[^/])$ $1/ [R=301,L]

# Valid CMS URL path is proxied to Tomcat/Railo:
# MUST COME AFTER ANY OTHER FIXED/EXPECTED REWRITES!
RewriteRule ^([a-zA-Z0-9/-]+)$ ajp://localhost:8009/index.cfm%{REQUEST_URI}
[NE,P]

# Anything else must be a 404 error:
RewriteRule . ajp://localhost:8009/index.cfm/this-will-force-a-404/
[NE,P]
</VirtualHost>

Jamie did advise me that he will be blogging "a slightly simplified
VirtualHost and Apache setup, in general" that will be simpler than
the example i pasted above, but for now it can't hurt to have this
example as it was what he originally provided us on his blog.

I hope this helps anyone else that runs into the same problem, looks
like it is resolved with the tweaks!

Thank you for the responses everyone!
Reply all
Reply to author
Forward
0 new messages